mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
PHP 7.4 was end of life November 2022, it's time to bump to PHP 8 standard 🎉
- updated starting code to PHP 8 standard
- upgraded tooling (code quality, static analysis) to the latest versions
- tested with PHP 8.0, 8.1 and 8.2
- the fixture is working
- the example test is failing, as expected
- code quality is as expected
- static analysis is ok
21 lines
362 B
PHP
21 lines
362 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace GildedRose;
|
|
|
|
final 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}";
|
|
}
|
|
}
|