| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function findAnnotation(string $annotationType): ?Annotation |
||
| 46 | { |
||
| 47 | $annotations = $this->findAnnotations($annotationType); |
||
| 48 | |||
| 49 | $annotationsCount = count($annotations); |
||
| 50 | if ($annotationsCount === 1) { |
||
| 51 | return $annotations[0]; |
||
| 52 | } elseif ($annotationsCount === 0) { |
||
| 53 | return null; |
||
| 54 | } else { |
||
| 55 | throw new TDBMException(sprintf('Unexpected column annotation. Found %d annotations of type %s', $annotationsCount, $annotationType)); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | } |
||
| 59 |