| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class ParserGeneric implements ParserInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var EntityHydrator |
||
| 23 | */ |
||
| 24 | private $entityHydrator; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param EntityHydrator $entityHydrator |
||
| 28 | */ |
||
| 29 | public function __construct(EntityHydrator $entityHydrator) |
||
| 30 | { |
||
| 31 | $this->entityHydrator = $entityHydrator; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $string |
||
| 36 | * @return Graze\UnicontrollerClient\Entity\Entity\EntityInterface |
||
|
|
|||
| 37 | */ |
||
| 38 | public function parse($string) |
||
| 39 | { |
||
| 40 | return $this->entityHydrator->hydrate( |
||
| 41 | new EntityGeneric(), |
||
| 42 | ['success' => $string == "\r\n"] |
||
| 43 | ); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return ParserGeneric |
||
| 48 | */ |
||
| 49 | public static function factory() |
||
| 53 | ); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |