Use PSR-12 code styling

This commit is contained in:
Sebastian Meyer 2023-11-04 09:45:24 +01:00
parent ef1f8ba8ef
commit 7398804b71
3 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ trait Getter
*/
public function __get(string $property): mixed
{
$method = '_get' . ucfirst($property);
$method = 'magicGet' . ucfirst($property);
if (
property_exists(get_called_class(), $property)
&& method_exists(get_called_class(), $method)

View File

@ -108,7 +108,7 @@ trait Queue /* implements \ArrayAccess, \Countable, \SeekableIterator */
'max_range' => count($this->queue) - ($allowAppend ? 0 : 1)
]
];
return (filter_var($offset, FILTER_VALIDATE_INT, $options) !== false);
return filter_var($offset, FILTER_VALIDATE_INT, $options) !== false;
}
/**
@ -271,7 +271,7 @@ trait Queue /* implements \ArrayAccess, \Countable, \SeekableIterator */
*
* @return array The list of the queue's allowed element types
*/
protected function _getAllowedTypes(): array
protected function magicGetAllowedTypes(): array
{
return $this->allowedTypes;
}

View File

@ -42,7 +42,7 @@ trait Setter
*/
public function __set(string $property, mixed $value): void
{
$method = '_set' . ucfirst($property);
$method = 'magicSet' . ucfirst($property);
if (
property_exists(get_called_class(), $property)
&& method_exists(get_called_class(), $method)