File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public function get($name): Attribute {
107
107
return $ this ->attributes [$ name ];
108
108
}
109
109
110
- return null ;
110
+ return new Attribute ( $ name ) ;
111
111
}
112
112
113
113
/**
@@ -120,21 +120,7 @@ public function get($name): Attribute {
120
120
*/
121
121
public function set (string $ name , mixed $ value , bool $ strict = false ): Attribute |array {
122
122
if (isset ($ this ->attributes [$ name ]) && $ strict === false ) {
123
- if ($ this ->attributize ) {
124
- $ this ->attributes [$ name ]->add ($ value , true );
125
- } else {
126
- if (isset ($ this ->attributes [$ name ])) {
127
- if (!is_array ($ this ->attributes [$ name ])) {
128
- $ this ->attributes [$ name ] = [$ this ->attributes [$ name ], $ value ];
129
- } else {
130
- $ this ->attributes [$ name ][] = $ value ;
131
- }
132
- } else {
133
- $ this ->attributes [$ name ] = $ value ;
134
- }
135
- }
136
- } elseif (!$ this ->attributize ) {
137
- $ this ->attributes [$ name ] = $ value ;
123
+ $ this ->attributes [$ name ]->add ($ value , true );
138
124
} else {
139
125
$ this ->attributes [$ name ] = new Attribute ($ name , $ value );
140
126
}
You can’t perform that action at this time.
0 commit comments