| Total Complexity | 8 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | final class TrelloRegistry implements RegistryInterface |
||
| 8 | { |
||
| 9 | /** @var array **/ |
||
| 10 | private $boards; |
||
| 11 | /** @var array **/ |
||
| 12 | private $columns; |
||
| 13 | /** @var array **/ |
||
| 14 | private $userStories; |
||
| 15 | |||
| 16 | public function __construct(array $boards, array $columns) |
||
| 17 | { |
||
| 18 | $this->boards = $boards; |
||
| 19 | $this->columns = $columns; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getBoard(string $name): ?array |
||
| 23 | { |
||
| 24 | return $this->boards[$name] ?? null; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getColumn(string $name): ?array |
||
| 28 | { |
||
| 29 | foreach ($this->columns as $column) { |
||
| 30 | if ($column['name'] === $name) { |
||
| 31 | return $column; |
||
| 32 | } |
||
| 33 | } |
||
| 34 | return null; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function storeUserStories(array $userStories = []) |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getUserStory(string $id): ?UserStory |
||
| 49 |