File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ public function testSetGetAttribute()
4040 $ value ->setName ('Silver ' );
4141 $ this ->assertSame ($ attribute , $ value ->getAttribute ());
4242
43- $ value ->setAttribute ($ attribute );
44- $ this ->assertSame ($ attribute , $ value ->getAttribute ());
43+ $ this ->assertSame ($ attribute , $ value ->setAttribute ($ attribute )->getAttribute ());
4544 }
4645}
Original file line number Diff line number Diff line change @@ -28,12 +28,15 @@ public function __construct(Attribute $attribute)
2828
2929 /**
3030 * @param Attribute $attribute
31+ * @return $this
3132 */
3233 public function setAttribute (Attribute $ attribute )
3334 {
3435 $ this ->attribute ->removeValue ($ this ); // Remove value from current attribute
3536 $ attribute ->addValue ($ this ); // Add value to new attribute
3637 $ this ->attribute = $ attribute ;
38+
39+ return $ this ;
3740 }
3841
3942 /**
You can’t perform that action at this time.
0 commit comments