1 | <?php |
||
22 | class DataNormalizer |
||
23 | { |
||
24 | /** |
||
25 | * Normalize the data for a resource. |
||
26 | * |
||
27 | * @param mixed $data |
||
28 | * @return mixed |
||
29 | 6 | */ |
|
30 | public function normalize($data = null) |
||
42 | |||
43 | /** |
||
44 | * Normalize a relationship. |
||
45 | * |
||
46 | * @param \Illuminate\Database\Eloquent\Relations\Relation $relation |
||
47 | * @return \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|null |
||
48 | 2 | */ |
|
49 | protected function normalizeRelation(Relation $relation) |
||
57 | |||
58 | /** |
||
59 | 2 | * Indicates if the given data is an instance of any of the given class names. |
|
60 | * |
||
61 | 2 | * @param mixed $data |
|
62 | * @param array $classes |
||
63 | 2 | * @return bool |
|
64 | 2 | */ |
|
65 | 2 | protected function isInstanceOf($data, array $classes): bool |
|
75 | } |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.