Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
62 | public function reverseTransform($idObject) |
||
63 | { |
||
64 | $identifier = current(array_values($this->om->getClassMetadata($this->entityName)->getIdentifier())); |
||
65 | |||
66 | $object = $this->om |
||
67 | ->getRepository($this->entityName) |
||
68 | ->findOneBy([$identifier => $idObject]); |
||
69 | |||
70 | if (null === $object) { |
||
71 | throw new TransformationFailedException(sprintf( |
||
72 | 'An object with identifier key "%s" and value "%s" does not exist!', |
||
73 | $identifier, $idObject |
||
74 | )); |
||
75 | } |
||
76 | |||
77 | return $object; |
||
78 | } |
||
79 | } |
||
|
|||
80 |
This check marks files that end in a newline character, i.e. an empy line.