We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 4 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public static function getValidationRules(SmartCollectionInterface $attributes): array |
||
| 16 | { |
||
| 17 | return [ |
||
| 18 | function ($attribute, $value, $fail) use ($attributes) { |
||
| 19 | if ($attributes->hasAttribute('entity') && $attributes->getAttributeValue('entity')) { |
||
| 20 | if (! is_string($value)) { |
||
| 21 | $fail('The '.$attribute.' should be a valid relation type string.'); |
||
| 22 | } |
||
| 33 |