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