| Conditions | 3 |
| Paths | 4 |
| Total Lines | 26 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function __construct( |
||
| 23 | $annotation, |
||
| 24 | string $argumentName, |
||
| 25 | $class = null |
||
| 26 | ) { |
||
| 27 | if (is_object($annotation)) { |
||
| 28 | $annotation = get_class($annotation); |
||
| 29 | } |
||
| 30 | |||
| 31 | $class = $this->getClassName($class); |
||
| 32 | if ($class) { |
||
| 33 | $message = sprintf( |
||
| 34 | 'Argument "%s" is mandatory for annotation %s on %s.', |
||
| 35 | $argumentName, |
||
| 36 | $annotation, |
||
| 37 | $class |
||
| 38 | ); |
||
| 39 | } else { |
||
| 40 | $message = sprintf( |
||
| 41 | 'Argument "%s" is mandatory for annotation %s.', |
||
| 42 | $argumentName, |
||
| 43 | $annotation, |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | parent::__construct($message); |
||
| 48 | } |
||
| 72 | } |