From 7398804b7145fb9e128a17cf9df3600ee1744656 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Sat, 4 Nov 2023 09:45:24 +0100 Subject: [PATCH] Use PSR-12 code styling --- src/Traits/Getter.php | 2 +- src/Traits/Queue.php | 4 ++-- src/Traits/Setter.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Traits/Getter.php b/src/Traits/Getter.php index 81053da..961a1d8 100644 --- a/src/Traits/Getter.php +++ b/src/Traits/Getter.php @@ -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) diff --git a/src/Traits/Queue.php b/src/Traits/Queue.php index 8efd9e7..beecc5b 100644 --- a/src/Traits/Queue.php +++ b/src/Traits/Queue.php @@ -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; } diff --git a/src/Traits/Setter.php b/src/Traits/Setter.php index fe03e18..1d24284 100644 --- a/src/Traits/Setter.php +++ b/src/Traits/Setter.php @@ -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)