Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
3 changes: 1 addition & 2 deletions doctum.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
$iterator = Finder::create()
->files()
->name('*.php')
->exclude('Resources')
->exclude('Tests')
->exclude('tests')
->in($dir);

return new Doctum($iterator, [
Expand Down
10 changes: 8 additions & 2 deletions src/GoodCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cable8mm@gmail.com>
*
* @since 2025-02-04
*/
class GoodCode
{
/**
* @var GoodCodeType The type of the code
* The type of the code
*/
private GoodCodeType $type;

Expand Down
24 changes: 24 additions & 0 deletions src/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cable8mm@gmail.com>
*
* @since 2025-02-24
*/
class Location implements Stringable
{
/**
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions src/ReceiptCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cable8mm@gmail.com>
*
* @since 2025-02-21
*/
class ReceiptCode implements Stringable
{
/**
Expand Down
9 changes: 9 additions & 0 deletions src/ValueObjects/SetGood.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
use InvalidArgumentException;
use Stringable;

/**
* Class SetGood
*
* This class is a value object for SetGood object.
*
* @author Samgu Lee <cable8mm@gmail.com>
*
* @since 2025-02-04
*/
class SetGood implements Stringable
{
/**
Expand Down