<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prodigeris / php-gilded-rose-refactoring-kata example snippets
$sulfuras = new \GildedRose\Item('Sulfuras, Hand of Ragnaros', 80, 2);
$regularItem = new \GildedRose\Item('AK-47, Hand of Ragnaros', 10, 2);
$backstagePass = new \GildedRose\Item('Backstage passes to a TAFKAL80ETC concert', 10, 2);
$items = compact('sulfuras', 'regularItem', 'backstagePass');
$productFactoryRegistry = new \GildedRose\ProductFactoryRegistry();
$productFactoryRegistry->register(\GildedRose\Products\RegularProduct::class);
$productFactoryRegistry->register(\GildedRose\Products\Sulfuras::class);
$productFactoryRegistry->register(\GildedRose\Products\BackstagePass::class);
$productFactory = new \GildedRose\ProductFactory($productFactoryRegistry);
$gildedRose = new \GildedRose\GildedRose($items, $productFactory);
$gildedRose->updateQuality();
namespace GildedRose\Products;
use GildedRose\Product;
/**
* Class Conjured
*
* @package \GildedRose\Products
*/
class Conjured extends Product
{
/**
* The name of the product
*/
const NAME = 'Conjured Mana Cake';
/**
* Quality increases by 2 over time
*
* @var int
*/
protected static $quality_step = -2;
}