File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,10 @@ public function setAttribute(string $key, mixed $value): static
9494
9595 $ key = $ this ->normalizeAttributeKey ($ key );
9696
97- if ((! $ this ->objects ->get ($ key )) && $ value ) {
98- $ this ->objects ->put ($ key ,Factory::create ($ key ,$ value ));
97+ if ((! $ this ->objects ->get ($ key )) && $ value )
98+ $ this ->objects ->put ($ key ,Factory::create ($ key ,[] ));
9999
100- } elseif ($ this ->objects ->get ($ key )) {
101- $ this ->objects ->get ($ key )->value = $ this ->attributes [$ key ];
102- }
100+ $ this ->objects ->get ($ key )->value = $ this ->attributes [$ key ];
103101
104102 return $ this ;
105103 }
@@ -164,7 +162,6 @@ public function addAttribute(string $key,mixed $value): void
164162 /**
165163 * Convert all our attribute values into an array of Objects
166164 *
167- * @param array $attributes
168165 * @return Collection
169166 */
170167 public function getAttributesAsObjects (): Collection
You can’t perform that action at this time.
0 commit comments