| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public static function itIsNotConsideredValid( |
||
| 29 | MapsProperty $property, |
||
| 30 | $value |
||
| 31 | ): self { |
||
| 32 | if (is_object($value)) { |
||
| 33 | return new self(sprintf( |
||
| 34 | 'Cannot assign the `%s` to property `%s`: ' . |
||
| 35 | 'The value did not satisfy the specifications.', |
||
| 36 | get_class($value), |
||
| 37 | $property->name() |
||
| 38 | )); |
||
| 39 | } |
||
| 40 | return new self(sprintf( |
||
| 41 | 'Cannot assign `%s` to property `%s`: ' . |
||
| 42 | 'The value did not satisfy the specifications.', |
||
| 43 | $value, |
||
| 44 | $property->name() |
||
| 45 | )); |
||
| 48 |