1 | <?php |
||
11 | class SchemalessAttributes implements ArrayAccess, Countable, Arrayable |
||
12 | { |
||
13 | /** @var \Illuminate\Database\Eloquent\Model */ |
||
14 | protected $model; |
||
15 | |||
16 | /** @var string */ |
||
17 | protected $sourceAttributeName; |
||
18 | |||
19 | /** @var array */ |
||
20 | protected $schemalessAttributes = []; |
||
21 | |||
22 | public static function createForModel(Model $model, string $sourceAttributeName): self |
||
26 | |||
27 | public function __construct(Model $model, string $sourceAttributeName) |
||
35 | |||
36 | public function __get(string $name) |
||
40 | |||
41 | public function get(string $name, $default = null) |
||
45 | |||
46 | public function __set(string $name, $value) |
||
50 | |||
51 | public function set(string $name, $value) |
||
57 | |||
58 | public function setMany($attributes = []) |
||
64 | |||
65 | public function has(string $name): bool |
||
69 | |||
70 | public function forget(string $name): self |
||
76 | |||
77 | public function all(): array |
||
81 | |||
82 | public function offsetExists($offset) |
||
86 | |||
87 | public function offsetGet($offset) |
||
91 | |||
92 | public function offsetSet($offset, $value) |
||
96 | |||
97 | public function offsetUnset($offset) |
||
101 | |||
102 | public function count() |
||
106 | |||
107 | public function toArray(): array |
||
111 | |||
112 | public static function scopeWithSchemalessAttributes(string $attributeName): Builder |
||
136 | |||
137 | protected function getRawSchemalessAttributes(): array |
||
141 | } |
||
142 |
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.