diff --git a/php7/src/Item.php b/php7/src/Item.php index 9ff2741b..83d7c3c1 100644 --- a/php7/src/Item.php +++ b/php7/src/Item.php @@ -1,21 +1,54 @@ + * @license eupl-1.1 https://help.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository + * @link pbgroupeu.wordpress.com + */ + namespace App; -final class Item { +/** + * Stock item + * + * @category LIFO + * @package Storehouse + * @author Povilas Brilius + * @license eupl-1.1 https://help.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository + * @link pbgroupeu.worpress.com + */ +final class Item +{ public $name; public $sell_in; public $quality; - function __construct($name, $sell_in, $quality) { + /** + * Std constructor + * + * @param string $name Label + * @param integer $sell_in Sellout in days + * @param integer $quality Qualitative assessment in integer type + */ + function __construct(string $name, int $sell_in, int $quality) + { $this->name = $name; $this->sell_in = $sell_in; $this->quality = $quality; } - public function __toString() { + /** + * Typographed to string magic + * + * @return string + */ + public function __toString() + { return "{$this->name}, {$this->sell_in}, {$this->quality}"; } } -