mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
21 lines
356 B
PHP
21 lines
356 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace GildedRose;
|
|
|
|
class Item implements \Stringable
|
|
{
|
|
public function __construct(
|
|
public string $name,
|
|
public int $sellIn,
|
|
public int $quality
|
|
) {
|
|
}
|
|
|
|
public function __toString(): string
|
|
{
|
|
return (string) "{$this->name}, {$this->sellIn}, {$this->quality}";
|
|
}
|
|
}
|