diff --git a/composer.json b/composer.json index 2161fef..0284696 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "test": "./vendor/bin/phpunit tests", "lint": "./vendor/bin/pint", "inspect": "./vendor/bin/pint --test", - "apidoc": "doctum.phar update doctum.php --output-format=github --no-ansi --no-progress", + "apidoc": "rm -rf build; rm -rf cache; doctum.phar update doctum.php --output-format=github --no-ansi --no-progress -v;", "opendoc": "open build/index.html" } } \ No newline at end of file diff --git a/doctum.php b/doctum.php index 23f878b..2e64daa 100644 --- a/doctum.php +++ b/doctum.php @@ -8,8 +8,7 @@ $iterator = Finder::create() ->files() ->name('*.php') - ->exclude('Resources') - ->exclude('Tests') + ->exclude('tests') ->in($dir); return new Doctum($iterator, [ diff --git a/src/GoodCode.php b/src/GoodCode.php index 00643dc..f63f4ee 100644 --- a/src/GoodCode.php +++ b/src/GoodCode.php @@ -7,12 +7,18 @@ use Cable8mm\GoodCode\ValueObjects\SetGood; /** - * Make set code, option code and so on. + * Class GoodCode + * + * This class makes a set code, option code and so on. + * + * @author Samgu Lee + * + * @since 2025-02-04 */ class GoodCode { /** - * @var GoodCodeType The type of the code + * The type of the code */ private GoodCodeType $type; diff --git a/src/Location.php b/src/Location.php index c59cbcb..d724636 100644 --- a/src/Location.php +++ b/src/Location.php @@ -4,6 +4,15 @@ use Stringable; +/** + * Class Location + * + * This class represents a warehouse location identified by warehouse, rack, and shelf. The location code is generated from these properties. + * + * @author Samgu Lee + * + * @since 2025-02-24 + */ class Location implements Stringable { /** @@ -53,6 +62,13 @@ private function __construct( $this->locationCode = preg_replace('/-+/', '-', $this->locationCode); } + /** + * Get the location code. + * + * @return string The method returns the location code + * + * @example print Location::of(warehouse: 'AUK', rack: 'R3', shelf: 'S32')->locationCode(); + */ public function locationCode(): string { return $this->locationCode; @@ -98,6 +114,14 @@ public static function of( ); } + /** + * Get the string representation of the location. + * + * @return string The magic method returns the location code + * + * @example print Location::of(warehouse: 'A1') => 'A1' + * @example print Location::of(warehouse: 'A1', rack: 'B3') => 'A1-B3' + */ public function __toString(): string { return $this->locationCode; diff --git a/src/ReceiptCode.php b/src/ReceiptCode.php index b3a9913..58c6e67 100644 --- a/src/ReceiptCode.php +++ b/src/ReceiptCode.php @@ -5,6 +5,15 @@ use InvalidArgumentException; use Stringable; +/** + * Class ReceiptCode + * + * This class represents a receipt code identified by code, prefix, ymd and number. The receipt code is generated from these properties. + * + * @author Samgu Lee + * + * @since 2025-02-21 + */ class ReceiptCode implements Stringable { /** diff --git a/src/ValueObjects/SetGood.php b/src/ValueObjects/SetGood.php index fc6748c..0f33fb5 100644 --- a/src/ValueObjects/SetGood.php +++ b/src/ValueObjects/SetGood.php @@ -6,6 +6,15 @@ use InvalidArgumentException; use Stringable; +/** + * Class SetGood + * + * This class is a value object for SetGood object. + * + * @author Samgu Lee + * + * @since 2025-02-04 + */ class SetGood implements Stringable { /**