We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 24 | final class Attribute extends AbstractRelated |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * Initializes the rule. |
||
| 28 | * |
||
| 29 | * @param string $attributeName |
||
| 30 | * @param Rule $rule |
||
| 31 | * @param bool $mandatory |
||
| 32 | */ |
||
| 33 | 1 | public function __construct(string $attributeName, Rule $rule = null, $mandatory = true) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Get the value of attribute in the object object even when the attribute is private. |
||
| 44 | * |
||
| 45 | * @param object $object |
||
| 46 | * @param string $attributeName |
||
| 47 | * |
||
| 48 | * @return mixed |
||
| 49 | */ |
||
| 50 | 21 | public function getReferenceValue($object, $attributeName) |
|
| 57 | |||
| 58 | /** |
||
| 59 | * Verifies if the input is an object and if it has the attribute. |
||
| 60 | * |
||
| 61 | * @param object $object |
||
| 62 | * @param string $attributeName |
||
| 63 | * |
||
| 64 | * @return bool |
||
| 65 | */ |
||
| 66 | 48 | public function hasReference($object, $attributeName): bool |
|
| 70 | } |
||
| 71 |