Use PSR-12 code styling
This commit is contained in:
parent
ef1f8ba8ef
commit
7398804b71
|
@ -41,7 +41,7 @@ trait Getter
|
||||||
*/
|
*/
|
||||||
public function __get(string $property): mixed
|
public function __get(string $property): mixed
|
||||||
{
|
{
|
||||||
$method = '_get' . ucfirst($property);
|
$method = 'magicGet' . ucfirst($property);
|
||||||
if (
|
if (
|
||||||
property_exists(get_called_class(), $property)
|
property_exists(get_called_class(), $property)
|
||||||
&& method_exists(get_called_class(), $method)
|
&& method_exists(get_called_class(), $method)
|
||||||
|
|
|
@ -108,7 +108,7 @@ trait Queue /* implements \ArrayAccess, \Countable, \SeekableIterator */
|
||||||
'max_range' => count($this->queue) - ($allowAppend ? 0 : 1)
|
'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
|
* @return array The list of the queue's allowed element types
|
||||||
*/
|
*/
|
||||||
protected function _getAllowedTypes(): array
|
protected function magicGetAllowedTypes(): array
|
||||||
{
|
{
|
||||||
return $this->allowedTypes;
|
return $this->allowedTypes;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ trait Setter
|
||||||
*/
|
*/
|
||||||
public function __set(string $property, mixed $value): void
|
public function __set(string $property, mixed $value): void
|
||||||
{
|
{
|
||||||
$method = '_set' . ucfirst($property);
|
$method = 'magicSet' . ucfirst($property);
|
||||||
if (
|
if (
|
||||||
property_exists(get_called_class(), $property)
|
property_exists(get_called_class(), $property)
|
||||||
&& method_exists(get_called_class(), $method)
|
&& method_exists(get_called_class(), $method)
|
||||||
|
|
Loading…
Reference in New Issue