diff --git a/src/Traits/Getter.php b/src/Traits/Getter.php index 9fa98e9..68a5d21 100644 --- a/src/Traits/Getter.php +++ b/src/Traits/Getter.php @@ -34,8 +34,8 @@ use InvalidArgumentException; * first letter). * * > Example: If the property is named `$fooBar`, the "magic" method has to be - * > `_magicGetFooBar()`. This method is then called when `$fooBar` is read - * > from outside the class context. + * > `_magicGetFooBar()`. This method is then called when `$fooBar` is read in + * > a context where it normally would not be accessible. * * @author Sebastian Meyer * @package Basics\Traits @@ -49,9 +49,7 @@ trait Getter * * @return mixed The class property's current value * - * @throws InvalidArgumentException if the property does not exist - * - * @internal + * @throws InvalidArgumentException if the property or getter method do not exist */ public function __get(string $property): mixed { @@ -75,8 +73,6 @@ trait Getter * @param string $property The class property to check * * @return bool Whether the class property is set and not empty - * - * @internal */ public function __isset(string $property): bool { diff --git a/src/Traits/OverloadingGetter.php b/src/Traits/OverloadingGetter.php index 01c200c..a1a858e 100644 --- a/src/Traits/OverloadingGetter.php +++ b/src/Traits/OverloadingGetter.php @@ -29,7 +29,7 @@ namespace OCC\Basics\Traits; * Internally it reads the protected `$_data` array whose keys are interpreted * as property names. * - * > Example: Reading `Foo->bar` will return the value of `Foo->_data['bar']`. + * > Example: Reading `Foo->bar` will return the value of `$_data['bar']`. * * @author Sebastian Meyer * @package Basics\Traits @@ -46,13 +46,11 @@ trait OverloadingGetter protected array $_data = []; /** - * Read data from an inaccessible property. + * Read data from an overloaded property. * * @param string $property The class property to get * * @return mixed The property's current value or NULL if not set - * - * @internal */ public function __get(string $property): mixed { @@ -60,13 +58,11 @@ trait OverloadingGetter } /** - * Check if an inaccessible property is set and not empty. + * Check if an overloaded property is set and not empty. * * @param string $property The class property to check * * @return bool Whether the class property is set and not empty - * - * @internal */ public function __isset(string $property): bool { diff --git a/src/Traits/OverloadingSetter.php b/src/Traits/OverloadingSetter.php index 8828de6..c78e01e 100644 --- a/src/Traits/OverloadingSetter.php +++ b/src/Traits/OverloadingSetter.php @@ -29,7 +29,7 @@ namespace OCC\Basics\Traits; * Internally it writes the protected `$_data` array whose keys are interpreted * as property names. * - * > Example: `Foo->bar = 42` will set `Foo->_data['bar']` to `42`. + * > Example: `Foo->bar = 42;` will set `$_data['bar']` to `42`. * * @author Sebastian Meyer * @package Basics\Traits @@ -46,14 +46,12 @@ trait OverloadingSetter protected array $_data = []; /** - * Write data to an inaccessible property. + * Write data to an overloaded property. * * @param string $property The class property to set * @param mixed $value The new value of the property * * @return void - * - * @internal */ public function __set(string $property, mixed $value): void { @@ -61,13 +59,11 @@ trait OverloadingSetter } /** - * Unset an inaccessible property. + * Unset an overloaded property. * * @param string $property The class property to unset * * @return void - * - * @internal */ public function __unset(string $property): void { diff --git a/src/Traits/Setter.php b/src/Traits/Setter.php index 8f35683..77c8a99 100644 --- a/src/Traits/Setter.php +++ b/src/Traits/Setter.php @@ -35,7 +35,7 @@ use InvalidArgumentException; * * > Example: If the property is named `$fooBar`, the "magic" method has to be * > `_magicSetFooBar()`. This method is then called when `$fooBar` is written - * > to from outside the class context. + * > to in a context where it normally would not be accessible. * * @author Sebastian Meyer * @package Basics\Traits @@ -50,9 +50,7 @@ trait Setter * * @return void * - * @throws InvalidArgumentException if the property does not exist - * - * @internal + * @throws InvalidArgumentException if the property or setter method do not exist */ public function __set(string $property, mixed $value): void { @@ -76,8 +74,6 @@ trait Setter * @param string $property The class property to unset * * @return void - * - * @internal */ public function __unset(string $property): void { diff --git a/src/Traits/Singleton.php b/src/Traits/Singleton.php index 797537c..01b988a 100644 --- a/src/Traits/Singleton.php +++ b/src/Traits/Singleton.php @@ -83,8 +83,6 @@ trait Singleton * @return void * * @throws LogicException when trying to clone the singleton object - * - * @internal */ final public function __clone() {