| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 1 | public function byId($id) { |
|
| 25 | 1 | if (!isset($this->repository[$id])) { |
|
| 26 | 1 | list($name, $league) = explode('|', $id); |
|
| 27 | 1 | $factory = $this->entityManager->factory($this->getEntityTypeName()); |
|
| 28 | 1 | $this->repository[$id] = $factory->create( |
|
| 29 | 1 | (object) array('id' => $id, 'name' => $name, 'league' => (object) array('id' => $league)), |
|
| 30 | 1 | $this->getEntityTypeName() |
|
| 31 | ); |
||
| 32 | } |
||
| 33 | 1 | return $this->repository[$id]; |
|
| 34 | } |
||
| 35 | |||
| 56 |