{"id":19922320,"url":"https://github.com/zibios/gilded-rose-php","last_synced_at":"2026-05-13T14:36:35.286Z","repository":{"id":188208840,"uuid":"678041979","full_name":"zibios/gilded-rose-php","owner":"zibios","description":"GildedRose possioble PHP solution","archived":false,"fork":false,"pushed_at":"2023-08-14T08:20:52.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T00:11:28.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zibios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-13T13:50:05.000Z","updated_at":"2023-08-13T15:46:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebda2ef8-a480-4265-bb02-38786d844602","html_url":"https://github.com/zibios/gilded-rose-php","commit_stats":null,"previous_names":["zibios/gilded-rose-php"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zibios%2Fgilded-rose-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zibios%2Fgilded-rose-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zibios%2Fgilded-rose-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zibios%2Fgilded-rose-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zibios","download_url":"https://codeload.github.com/zibios/gilded-rose-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241348356,"owners_count":19948164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T22:10:34.494Z","updated_at":"2026-05-13T14:36:35.016Z","avatar_url":"https://github.com/zibios.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"You are given the following task to demonstrate practical code refactoring skills. The `tests` directory contains the tests (surprise) that run in their initial form and they pass correctly. These tests will be the basic tool to control the refactored code. Your task is to refactor the source code - i.e. to make changes that will improve its quality without changing its operation logic. What changes you will introduce, what patterns or good practices you will use - it's up to you. Any improvement in code quality is better than none at all! Remember, however, that at the time of sending back the assignment, all tests must still run correctly.\n\nThe task should run in PHP 8.1. The unit tests were written using the phpunit version 9.5 framework and should be run on that. A job description that explains the business logic contained in the class GildedRose.php is below.\n\n## Requirements\n- composer\n- php 8.1\n- phpunit 9.5\n\n## Instalation\nTo install dependencies run ```composer install```. To run test use ```./vendor/bin/phpunit```.\n\n## Introduction\n\nHi and welcome to team Gilded Rose. As you know, we are a small inn with a\nprime location in a prominent city ran by a friendly innkeeper named Allison.\nWe also buy and sell only the finest goods. Unfortunately, our goods are\nconstantly degrading in quality as they approach their sell by date. We have a\nsystem in place that updates our inventory for us. It was developed by a\nno-nonsense type named Leeroy, who has moved on to new adventures. Your task is\nto add the new feature to our system so that we can begin selling a new\ncategory of items. First an introduction to our system:\n\n- All items have a **SellIn** value which denotes the number of days we have to\nsell the item\n- All items have a **Quality** value which denotes how valuable the\nitem is \n- At the end of each day our system lowers both values for every item\n\nPretty simple, right? Well this is where it gets interesting:\n\n- Once the sell by date has passed, Quality degrades twice as fast \n- The Quality of an item is never negative \n- \"**Aged Brie**\" actually increases in Quality the older it gets\n- The Quality of an item is never more than 50\n- \"**Sulfuras**\", being a legendary item, never has to be sold or decreases in\nQuality\n- \"**Backstage passes**\", like aged brie, increases in Quality as it's\nSellIn value approaches; Quality increases by 2 when there are 10 days or less\nand by 3 when there are 5 days or less but Quality drops to 0 after the concert\n\nJust for clarification, an item can never have its Quality increase above 50, however \"Sulfuras\" is a legendary \nitem and as such its Quality is 80 and it never alters.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzibios%2Fgilded-rose-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzibios%2Fgilded-rose-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzibios%2Fgilded-rose-php/lists"}