1 | <?php |
||
14 | trait ResourceTrait |
||
15 | { |
||
16 | /** |
||
17 | * @return null|string |
||
18 | */ |
||
19 | public function getId() |
||
26 | |||
27 | /** |
||
28 | * @return string |
||
29 | */ |
||
30 | public function getType() |
||
36 | |||
37 | /** |
||
38 | * @param array $fields |
||
39 | * @return array |
||
40 | */ |
||
41 | public function getResourceAttributes(array $fields = []) |
||
50 | |||
51 | /** |
||
52 | * @return array |
||
53 | */ |
||
54 | public function getResourceRelationships() |
||
71 | |||
72 | /** |
||
73 | * @param string $name the case sensitive name of the relationship. |
||
74 | * @param $relationship |
||
75 | */ |
||
76 | public function setResourceRelationship($name, $relationship) |
||
87 | |||
88 | /** |
||
89 | * @return array |
||
90 | */ |
||
91 | public function fields() |
||
96 | |||
97 | /** |
||
98 | * @return array |
||
99 | */ |
||
100 | public function extraFields() |
||
104 | |||
105 | /** |
||
106 | * @param array $fields |
||
107 | * @param array $fieldSet |
||
108 | * @return array |
||
109 | */ |
||
110 | protected function resolveFields(array $fields, array $fieldSet = []) |
||
125 | } |
||
126 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.