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($attribute, $value = null) |
||
63 | |||
64 | public function setMany(iterable $attributes = []) |
||
70 | |||
71 | public function has(string $name): bool |
||
75 | |||
76 | public function forget(string $name): self |
||
82 | |||
83 | public function all(): array |
||
87 | |||
88 | public function offsetExists($offset) |
||
92 | |||
93 | public function offsetGet($offset) |
||
97 | |||
98 | public function offsetSet($offset, $value) |
||
102 | |||
103 | public function offsetUnset($offset) |
||
107 | |||
108 | public function count() |
||
112 | |||
113 | public function toArray(): array |
||
117 | |||
118 | public static function scopeWithSchemalessAttributes(string $attributeName): Builder |
||
142 | |||
143 | protected function getRawSchemalessAttributes(): array |
||
147 | } |
||
148 |
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.