1 | <?php |
||
10 | class SchemalessAttributes implements ArrayAccess, Countable |
||
11 | { |
||
12 | /** @var \Illuminate\Database\Eloquent\Model */ |
||
13 | protected $model; |
||
14 | |||
15 | /** @var string */ |
||
16 | protected $sourceAttributeName; |
||
17 | |||
18 | /** @var array */ |
||
19 | protected $schemalessAttributes = []; |
||
20 | |||
21 | public static function createForModel(Model $model, string $sourceAttributeName): self |
||
25 | |||
26 | public function __construct(Model $model, string $sourceAttributeName) |
||
34 | |||
35 | public function __get(string $name) |
||
39 | |||
40 | public function get(string $name) |
||
44 | |||
45 | public function __set(string $name, $value) |
||
49 | |||
50 | public function set(string $name, $value) |
||
56 | |||
57 | public function forget(string $name): self |
||
63 | |||
64 | public function all(): array |
||
68 | |||
69 | protected function getRawSchemalessAttributes(): array |
||
73 | |||
74 | public function offsetExists($offset) |
||
78 | |||
79 | public function offsetGet($offset) |
||
83 | |||
84 | public function offsetSet($offset, $value) |
||
88 | |||
89 | public function offsetUnset($offset) |
||
93 | |||
94 | public function count() |
||
98 | |||
99 | public static function scopeWithSchemalessAttributes(string $attributeName): Builder |
||
123 | } |
||
124 |
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.