Skip to content

Commit 24d3862

Browse files
author
Dominik Liebler
committed
Merge pull request DesignPatternsPHP#187 from ftwbzhao/feature/eav
[EAV] Value::setAttribute add return this
2 parents 3bf84ae + ba63419 commit 24d3862

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

More/EAV/Value.php

+3
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)