From ebcac8bf315e1f05c0db80ac1bd22b457ffcdd81 Mon Sep 17 00:00:00 2001 From: Inhere Date: Thu, 8 Feb 2024 13:30:58 +0800 Subject: [PATCH] chore: update class comments for all file --- .gitignore | 2 ++ src/Arr.php | 5 +---- src/Arr/ArrBuffer.php | 2 -- src/Arr/ArrayHelper.php | 2 -- src/Arr/Traits/ArrayMergeTrait.php | 2 -- src/Arr/Traits/ArrayValueGetSetTrait.php | 2 -- src/Helper/DataHelper.php | 2 -- src/Helper/Format.php | 2 -- src/Helper/JsonHelper.php | 2 -- src/Helper/NetHelper.php | 2 -- src/Helper/PhpHelper.php | 2 -- src/Json.php | 2 -- src/Math.php | 2 -- src/Num.php | 2 -- src/OS.php | 2 -- src/Obj.php | 2 -- src/Obj/AbstractMap.php | 2 -- src/Obj/BaseObject.php | 8 +++----- src/Obj/Configurable.php | 2 -- src/Obj/DataObject.php | 2 -- src/Obj/Exception/ContainerException.php | 2 -- src/Obj/Exception/GetPropertyException.php | 2 -- src/Obj/Exception/NotFoundException.php | 2 -- src/Obj/Exception/PropertyException.php | 2 -- src/Obj/Exception/SetPropertyException.php | 2 -- src/Obj/ObjectBox.php | 2 -- src/Obj/ObjectHelper.php | 2 -- src/Obj/Traits/ArrayAccessByGetterSetterTrait.php | 1 - src/Obj/Traits/ArrayAccessByPropertyTrait.php | 1 - src/Obj/Traits/ObjectPoolTrait.php | 1 - src/Obj/Traits/QuickInitTrait.php | 1 - src/Obj/Traits/SingletonPoolTrait.php | 1 - src/Obj/Traits/SingletonTrait.php | 1 - src/Obj/Traits/StdObjectTrait.php | 1 - src/Php.php | 2 -- src/Str/HtmlHelper.php | 2 -- src/Str/StrBuffer.php | 2 -- src/Str/StrHelper.php | 2 -- src/Str/StringHelper.php | 2 -- src/Str/Traits/StringCaseHelperTrait.php | 2 -- src/Str/Traits/StringCheckHelperTrait.php | 1 - src/Str/Traits/StringConvertTrait.php | 1 - src/Str/Traits/StringLengthHelperTrait.php | 1 - src/Str/Traits/StringTruncateHelperTrait.php | 1 - src/Str/UrlHelper.php | 1 - src/Type.php | 1 - src/Util/AutoLoader.php | 1 - src/Util/Contract/PipelineInterface.php | 1 - src/Util/PhpDoc.php | 2 -- src/Util/PhpDotEnv.php | 1 - src/Util/PhpError.php | 1 - src/Util/PhpException.php | 1 - src/Util/Pipeline.php | 1 - 53 files changed, 6 insertions(+), 90 deletions(-) diff --git a/.gitignore b/.gitignore index 07a6cea..71556a0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,7 @@ composer.lock *.log *.pid *.cache +.phpdoc/ +phpdoc/ *.patch .DS_Store diff --git a/src/Arr.php b/src/Arr.php index 60f7234..1b06b61 100644 --- a/src/Arr.php +++ b/src/Arr.php @@ -12,10 +12,7 @@ use Toolkit\Stdlib\Arr\ArrayHelper; /** - * Class Arr - * - alias of the ArrayHelper - * - * @package Toolkit\Stdlib + * Class Arr - alias of the ArrayHelper */ class Arr extends ArrayHelper { diff --git a/src/Arr/ArrBuffer.php b/src/Arr/ArrBuffer.php index 137f6bb..994288b 100644 --- a/src/Arr/ArrBuffer.php +++ b/src/Arr/ArrBuffer.php @@ -11,8 +11,6 @@ /** * Class ArrBuffer - * - * @package Toolkit\Stdlib\Arr */ final class ArrBuffer { diff --git a/src/Arr/ArrayHelper.php b/src/Arr/ArrayHelper.php index 5b24448..acf1be2 100644 --- a/src/Arr/ArrayHelper.php +++ b/src/Arr/ArrayHelper.php @@ -33,8 +33,6 @@ /** * Class ArrayHelper - * - * @package Toolkit\Stdlib\Arr */ class ArrayHelper { diff --git a/src/Arr/Traits/ArrayMergeTrait.php b/src/Arr/Traits/ArrayMergeTrait.php index b4c3543..401a53f 100644 --- a/src/Arr/Traits/ArrayMergeTrait.php +++ b/src/Arr/Traits/ArrayMergeTrait.php @@ -17,8 +17,6 @@ /** * Trait ArrayMergeTrait - * - * @package Toolkit\Stdlib\Arr\Traits */ trait ArrayMergeTrait { diff --git a/src/Arr/Traits/ArrayValueGetSetTrait.php b/src/Arr/Traits/ArrayValueGetSetTrait.php index c3dd9ca..a9ac7b8 100644 --- a/src/Arr/Traits/ArrayValueGetSetTrait.php +++ b/src/Arr/Traits/ArrayValueGetSetTrait.php @@ -23,8 +23,6 @@ /** * Trait ArrayValueGetSetTrait - * - * @package Toolkit\Stdlib\Arr\Traits */ trait ArrayValueGetSetTrait { diff --git a/src/Helper/DataHelper.php b/src/Helper/DataHelper.php index 0fadcb6..da2d723 100644 --- a/src/Helper/DataHelper.php +++ b/src/Helper/DataHelper.php @@ -23,8 +23,6 @@ /** * Class DataHelper - * - * @package Toolkit\Stdlib\Helper */ class DataHelper { diff --git a/src/Helper/Format.php b/src/Helper/Format.php index 0e6c53e..45a27ef 100644 --- a/src/Helper/Format.php +++ b/src/Helper/Format.php @@ -24,8 +24,6 @@ /** * Class Format - * - * @package Toolkit\Stdlib\Helper */ class Format { diff --git a/src/Helper/JsonHelper.php b/src/Helper/JsonHelper.php index 9996236..e51921e 100644 --- a/src/Helper/JsonHelper.php +++ b/src/Helper/JsonHelper.php @@ -31,8 +31,6 @@ /** * Class JsonHelper - * - * @package Toolkit\Stdlib */ class JsonHelper { diff --git a/src/Helper/NetHelper.php b/src/Helper/NetHelper.php index 88a6b3a..9388867 100644 --- a/src/Helper/NetHelper.php +++ b/src/Helper/NetHelper.php @@ -19,8 +19,6 @@ /** * Class NetHelper - * - * @package Toolkit\Stdlib\Helper */ class NetHelper { diff --git a/src/Helper/PhpHelper.php b/src/Helper/PhpHelper.php index 123a0b7..cd42327 100644 --- a/src/Helper/PhpHelper.php +++ b/src/Helper/PhpHelper.php @@ -49,8 +49,6 @@ /** * Class PhpHelper - * - * @package Toolkit\PhpKit */ class PhpHelper { diff --git a/src/Json.php b/src/Json.php index 7c2ccda..4706f51 100644 --- a/src/Json.php +++ b/src/Json.php @@ -13,8 +13,6 @@ /** * Class Json - * - * @package Toolkit\Stdlib */ final class Json extends JsonHelper { diff --git a/src/Math.php b/src/Math.php index 9779779..8c678b8 100644 --- a/src/Math.php +++ b/src/Math.php @@ -13,8 +13,6 @@ /** * Class Math - * - * @package Toolkit\Stdlib */ class Math extends NumHelper { diff --git a/src/Num.php b/src/Num.php index cdcbd7b..de42ff2 100644 --- a/src/Num.php +++ b/src/Num.php @@ -13,8 +13,6 @@ /** * Class Num - * - * @package Toolkit\Stdlib */ class Num extends NumHelper { diff --git a/src/OS.php b/src/OS.php index 74adeca..9593aad 100644 --- a/src/OS.php +++ b/src/OS.php @@ -37,8 +37,6 @@ /** * Class OsEnv - * - * @package Toolkit\PhpKit\OS */ class OS { diff --git a/src/Obj.php b/src/Obj.php index c5b7af6..bc7ed26 100644 --- a/src/Obj.php +++ b/src/Obj.php @@ -16,8 +16,6 @@ /** * Class Obj * alias of the ObjectHelper - * - * @package Toolkit\Stdlib\Obj */ class Obj extends ObjectHelper { diff --git a/src/Obj/AbstractMap.php b/src/Obj/AbstractMap.php index 6c619fe..18e6e2e 100644 --- a/src/Obj/AbstractMap.php +++ b/src/Obj/AbstractMap.php @@ -14,8 +14,6 @@ /** * Class AbstractMap - * - * @package Toolkit\Stdlib\Obj */ abstract class AbstractMap implements JsonSerializable { diff --git a/src/Obj/BaseObject.php b/src/Obj/BaseObject.php index c0a8ce4..36e46a4 100644 --- a/src/Obj/BaseObject.php +++ b/src/Obj/BaseObject.php @@ -16,8 +16,6 @@ /** * Class AbstractObj - * - * @package Toolkit\Stdlib\Obj */ abstract class BaseObject implements JsonSerializable { @@ -40,13 +38,13 @@ public function __construct(array $data = []) if ($data) { $this->load($data); } - $this->init(); + $this->afterNew(); } /** - * will call init() after constructor. + * will call it after constructor. */ - protected function init(): void + protected function afterNew(): void { // do something... } diff --git a/src/Obj/Configurable.php b/src/Obj/Configurable.php index ef1dad1..6eeeced 100644 --- a/src/Obj/Configurable.php +++ b/src/Obj/Configurable.php @@ -13,8 +13,6 @@ /** * Class Configurable - * - * @package Toolkit\Stdlib\Obj */ abstract class Configurable { diff --git a/src/Obj/DataObject.php b/src/Obj/DataObject.php index 4775c84..a37d2e7 100644 --- a/src/Obj/DataObject.php +++ b/src/Obj/DataObject.php @@ -20,8 +20,6 @@ /** * Class DataObject - * - * @package Toolkit\Stdlib\Obj */ class DataObject extends ArrayObject implements JsonSerializable { diff --git a/src/Obj/Exception/ContainerException.php b/src/Obj/Exception/ContainerException.php index f4deae0..4eff84b 100644 --- a/src/Obj/Exception/ContainerException.php +++ b/src/Obj/Exception/ContainerException.php @@ -14,8 +14,6 @@ /** * Class ContainerException - * - * @package Toolkit\Stdlib\Obj\Exception */ class ContainerException extends RuntimeException implements ContainerExceptionInterface { diff --git a/src/Obj/Exception/GetPropertyException.php b/src/Obj/Exception/GetPropertyException.php index 286d4e7..239dd1f 100644 --- a/src/Obj/Exception/GetPropertyException.php +++ b/src/Obj/Exception/GetPropertyException.php @@ -13,8 +13,6 @@ /** * Class GetPropertyException - * - * @package Toolkit\Stdlib\Obj\Exception */ class GetPropertyException extends RuntimeException { diff --git a/src/Obj/Exception/NotFoundException.php b/src/Obj/Exception/NotFoundException.php index 0dbe1e0..6faf1bf 100644 --- a/src/Obj/Exception/NotFoundException.php +++ b/src/Obj/Exception/NotFoundException.php @@ -14,8 +14,6 @@ /** * Class NotFoundException - * - * @package Toolkit\Stdlib\Obj\Exception */ class NotFoundException extends RuntimeException implements NotFoundExceptionInterface { diff --git a/src/Obj/Exception/PropertyException.php b/src/Obj/Exception/PropertyException.php index 4c70481..28104fc 100644 --- a/src/Obj/Exception/PropertyException.php +++ b/src/Obj/Exception/PropertyException.php @@ -13,8 +13,6 @@ /** * Class PropertyException - * - * @package Toolkit\Stdlib\Obj\Exception */ class PropertyException extends RuntimeException { diff --git a/src/Obj/Exception/SetPropertyException.php b/src/Obj/Exception/SetPropertyException.php index 6675c27..0a910ca 100644 --- a/src/Obj/Exception/SetPropertyException.php +++ b/src/Obj/Exception/SetPropertyException.php @@ -13,8 +13,6 @@ /** * Class SetPropertyException - * - * @package Toolkit\Stdlib\Obj\Exception */ class SetPropertyException extends RuntimeException { diff --git a/src/Obj/ObjectBox.php b/src/Obj/ObjectBox.php index cf5f313..f931bf6 100644 --- a/src/Obj/ObjectBox.php +++ b/src/Obj/ObjectBox.php @@ -28,8 +28,6 @@ * An simple object containers implements * * NOTICE: require the `psr/container` package. - * - * @package Toolkit\Stdlib\Obj */ class ObjectBox implements ContainerInterface { diff --git a/src/Obj/ObjectHelper.php b/src/Obj/ObjectHelper.php index 1bfe607..9825c52 100644 --- a/src/Obj/ObjectHelper.php +++ b/src/Obj/ObjectHelper.php @@ -45,8 +45,6 @@ /** * Class ObjectHelper - * - * @package Toolkit\Stdlib\Obj */ class ObjectHelper { diff --git a/src/Obj/Traits/ArrayAccessByGetterSetterTrait.php b/src/Obj/Traits/ArrayAccessByGetterSetterTrait.php index 6c41127..9cbe24b 100644 --- a/src/Obj/Traits/ArrayAccessByGetterSetterTrait.php +++ b/src/Obj/Traits/ArrayAccessByGetterSetterTrait.php @@ -15,7 +15,6 @@ /** * Class TraitArrayAccess * - * @package Toolkit\Stdlib\Obj\Traits * ``` * class A implements \ArrayAccess * { diff --git a/src/Obj/Traits/ArrayAccessByPropertyTrait.php b/src/Obj/Traits/ArrayAccessByPropertyTrait.php index aabfb50..ff25164 100644 --- a/src/Obj/Traits/ArrayAccessByPropertyTrait.php +++ b/src/Obj/Traits/ArrayAccessByPropertyTrait.php @@ -14,7 +14,6 @@ /** * Class TraitArrayAccess * - * @package Toolkit\Stdlib\Obj\Traits * ``` * class A implements \ArrayAccess * { diff --git a/src/Obj/Traits/ObjectPoolTrait.php b/src/Obj/Traits/ObjectPoolTrait.php index b998553..5f30d4f 100644 --- a/src/Obj/Traits/ObjectPoolTrait.php +++ b/src/Obj/Traits/ObjectPoolTrait.php @@ -20,7 +20,6 @@ /** * Class ObjectPoolTrait * - * @package Toolkit\Stdlib\Obj\Traits */ trait ObjectPoolTrait { diff --git a/src/Obj/Traits/QuickInitTrait.php b/src/Obj/Traits/QuickInitTrait.php index c21c712..9d6a601 100644 --- a/src/Obj/Traits/QuickInitTrait.php +++ b/src/Obj/Traits/QuickInitTrait.php @@ -14,7 +14,6 @@ /** * Trait QuickInitTrait * - * @package Toolkit\Stdlib\Obj\Traits */ trait QuickInitTrait { diff --git a/src/Obj/Traits/SingletonPoolTrait.php b/src/Obj/Traits/SingletonPoolTrait.php index 5f9fa3c..abafe6b 100644 --- a/src/Obj/Traits/SingletonPoolTrait.php +++ b/src/Obj/Traits/SingletonPoolTrait.php @@ -12,7 +12,6 @@ /** * Trait SingletonPoolTrait * - * @package Toolkit\Stdlib\Obj\Traits */ trait SingletonPoolTrait { diff --git a/src/Obj/Traits/SingletonTrait.php b/src/Obj/Traits/SingletonTrait.php index 40bc896..1811a40 100644 --- a/src/Obj/Traits/SingletonTrait.php +++ b/src/Obj/Traits/SingletonTrait.php @@ -14,7 +14,6 @@ /** * Trait SingletonTrait * - * @package Toolkit\Stdlib\Obj\Traits */ trait SingletonTrait { diff --git a/src/Obj/Traits/StdObjectTrait.php b/src/Obj/Traits/StdObjectTrait.php index 5a650fd..7c81904 100644 --- a/src/Obj/Traits/StdObjectTrait.php +++ b/src/Obj/Traits/StdObjectTrait.php @@ -21,7 +21,6 @@ /** * Class StdObjectTrait * - * @package Toolkit\Stdlib\Obj\Traits */ trait StdObjectTrait { diff --git a/src/Php.php b/src/Php.php index ca0c29f..b0cc878 100644 --- a/src/Php.php +++ b/src/Php.php @@ -13,8 +13,6 @@ /** * Class PHP - * - * @package Toolkit\Stdlib */ class Php extends PhpHelper { diff --git a/src/Str/HtmlHelper.php b/src/Str/HtmlHelper.php index f75572f..a65a03b 100644 --- a/src/Str/HtmlHelper.php +++ b/src/Str/HtmlHelper.php @@ -24,8 +24,6 @@ /** * Class HtmlHelper - * - * @package Toolkit\Stdlib\Str */ class HtmlHelper { diff --git a/src/Str/StrBuffer.php b/src/Str/StrBuffer.php index 4da476d..262e160 100644 --- a/src/Str/StrBuffer.php +++ b/src/Str/StrBuffer.php @@ -17,8 +17,6 @@ /** * Class StrBuffer - * - * @package Toolkit\Stdlib\Str */ class StrBuffer implements Stringable { diff --git a/src/Str/StrHelper.php b/src/Str/StrHelper.php index 0dd2ca5..6b50a21 100644 --- a/src/Str/StrHelper.php +++ b/src/Str/StrHelper.php @@ -11,8 +11,6 @@ /** * Class StrHelper - * - * @package Toolkit\Stdlib\Str */ class StrHelper extends StringHelper { diff --git a/src/Str/StringHelper.php b/src/Str/StringHelper.php index 492ae00..b72f4d1 100644 --- a/src/Str/StringHelper.php +++ b/src/Str/StringHelper.php @@ -57,8 +57,6 @@ /** * Class StringHelper - * - * @package Toolkit\Stdlib\Str */ abstract class StringHelper { diff --git a/src/Str/Traits/StringCaseHelperTrait.php b/src/Str/Traits/StringCaseHelperTrait.php index e38d745..daac479 100644 --- a/src/Str/Traits/StringCaseHelperTrait.php +++ b/src/Str/Traits/StringCaseHelperTrait.php @@ -32,8 +32,6 @@ /** * Trait StringCaseHelperTrait - * - * @package Toolkit\Stdlib\Str\Traits */ trait StringCaseHelperTrait { diff --git a/src/Str/Traits/StringCheckHelperTrait.php b/src/Str/Traits/StringCheckHelperTrait.php index 120c513..d4282b7 100644 --- a/src/Str/Traits/StringCheckHelperTrait.php +++ b/src/Str/Traits/StringCheckHelperTrait.php @@ -28,7 +28,6 @@ /** * Trait StringCheckHelperTrait * - * @package Toolkit\Stdlib\Str\Traits */ trait StringCheckHelperTrait { diff --git a/src/Str/Traits/StringConvertTrait.php b/src/Str/Traits/StringConvertTrait.php index a5ab203..71a6c5e 100644 --- a/src/Str/Traits/StringConvertTrait.php +++ b/src/Str/Traits/StringConvertTrait.php @@ -36,7 +36,6 @@ /** * Trait StringSplitHelperTrait * - * @package Toolkit\Stdlib\Str\Traits */ trait StringConvertTrait { diff --git a/src/Str/Traits/StringLengthHelperTrait.php b/src/Str/Traits/StringLengthHelperTrait.php index 4236094..eba8192 100644 --- a/src/Str/Traits/StringLengthHelperTrait.php +++ b/src/Str/Traits/StringLengthHelperTrait.php @@ -22,7 +22,6 @@ /** * Trait StringLengthHelperTrait * - * @package Toolkit\Stdlib\Str\Traits */ trait StringLengthHelperTrait { diff --git a/src/Str/Traits/StringTruncateHelperTrait.php b/src/Str/Traits/StringTruncateHelperTrait.php index 76a8c68..040ed7d 100644 --- a/src/Str/Traits/StringTruncateHelperTrait.php +++ b/src/Str/Traits/StringTruncateHelperTrait.php @@ -32,7 +32,6 @@ /** * Trait StringTruncateHelperTrait - * @package Toolkit\Stdlib\Str\Traits */ trait StringTruncateHelperTrait { diff --git a/src/Str/UrlHelper.php b/src/Str/UrlHelper.php index 63c8d3f..110e4ad 100644 --- a/src/Str/UrlHelper.php +++ b/src/Str/UrlHelper.php @@ -37,7 +37,6 @@ /** * Class UrlHelper * - * @package Toolkit\Stdlib\Str */ class UrlHelper { diff --git a/src/Type.php b/src/Type.php index 235d006..6fe2b06 100644 --- a/src/Type.php +++ b/src/Type.php @@ -15,7 +15,6 @@ /** * Class Type - php data type * - * @package Toolkit\Stdlib * @see \gettype() */ class Type diff --git a/src/Util/AutoLoader.php b/src/Util/AutoLoader.php index ff93bc9..265bd52 100644 --- a/src/Util/AutoLoader.php +++ b/src/Util/AutoLoader.php @@ -35,7 +35,6 @@ * ]); * ``` * - * @package Toolkit\Stdlib\Util */ class AutoLoader { diff --git a/src/Util/Contract/PipelineInterface.php b/src/Util/Contract/PipelineInterface.php index 18ee028..07532c8 100644 --- a/src/Util/Contract/PipelineInterface.php +++ b/src/Util/Contract/PipelineInterface.php @@ -14,7 +14,6 @@ /** * Interface PipelineInterface * - * @package Toolkit\Util */ interface PipelineInterface { diff --git a/src/Util/PhpDoc.php b/src/Util/PhpDoc.php index e4f24fb..8326761 100644 --- a/src/Util/PhpDoc.php +++ b/src/Util/PhpDoc.php @@ -22,8 +22,6 @@ /** * Class PhpDoc - * - * @package Toolkit\PhpKit */ class PhpDoc { diff --git a/src/Util/PhpDotEnv.php b/src/Util/PhpDotEnv.php index 5dfa6e2..0245058 100644 --- a/src/Util/PhpDotEnv.php +++ b/src/Util/PhpDotEnv.php @@ -43,7 +43,6 @@ * env('APP_ENV', 'pdt'); * ``` * - * @package Toolkit\Stdlib\Util */ class PhpDotEnv { diff --git a/src/Util/PhpError.php b/src/Util/PhpError.php index 6fdcb46..09ac416 100644 --- a/src/Util/PhpError.php +++ b/src/Util/PhpError.php @@ -29,7 +29,6 @@ /** * Class PhpError * - * @package Toolkit\Stdlib\Util */ class PhpError { diff --git a/src/Util/PhpException.php b/src/Util/PhpException.php index 53d4f75..324decc 100644 --- a/src/Util/PhpException.php +++ b/src/Util/PhpException.php @@ -17,7 +17,6 @@ /** * Class PhpException * - * @package Toolkit\Stdlib\Util */ class PhpException { diff --git a/src/Util/Pipeline.php b/src/Util/Pipeline.php index 9fb5e72..69c8b14 100644 --- a/src/Util/Pipeline.php +++ b/src/Util/Pipeline.php @@ -17,7 +17,6 @@ /** * Class Pipeline * - * @package Toolkit\Util * @link https://github.com/ztsu/pipe/blob/master/src/Pipeline.php */ class Pipeline implements PipelineInterface