@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @var int|string|SalesmanProviderInterface $salesman |
| 13 | 13 | * @return self |
| 14 | 14 | */ |
| 15 | - public function setSalesmanId( $salesman ) |
|
| 15 | + public function setSalesmanId($salesman) |
|
| 16 | 16 | { |
| 17 | 17 | if ($salesman instanceOf SalesmanProviderInterface): |
| 18 | 18 | $this->salesman_id = $salesman->getSalesmanId(); |
@@ -16,8 +16,10 @@ |
||
| 16 | 16 | { |
| 17 | 17 | if ($salesman instanceOf SalesmanProviderInterface): |
| 18 | 18 | $this->salesman_id = $salesman->getSalesmanId(); |
| 19 | - else: |
|
| 19 | + else { |
|
| 20 | + : |
|
| 20 | 21 | $this->salesman_id = $salesman; |
| 22 | + } |
|
| 21 | 23 | endif; |
| 22 | 24 | |
| 23 | 25 | return $this; |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | * @param \Traversable $collection Collection of SalesmanProviderInterface |
| 15 | 15 | * @param array|int $salesman_filter The Salesman ID to filter for |
| 16 | 16 | */ |
| 17 | - public function __construct( \Traversable $collection, $salesman_filter ) |
|
| 17 | + public function __construct(\Traversable $collection, $salesman_filter) |
|
| 18 | 18 | { |
| 19 | 19 | // Allow for getSalesmanId |
| 20 | 20 | $this->salesman_filter = $salesman_filter instanceOf SalesmanProviderInterface |
@@ -23,12 +23,12 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | // Cast to array |
| 25 | 25 | if (!is_array($this->salesman_filter)) { |
| 26 | - $this->salesman_filter = array( $this->salesman_filter ); |
|
| 26 | + $this->salesman_filter = array($this->salesman_filter); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | // Take care of Traversable's two faces, |
| 30 | 30 | // since both IteratorAggregate and Iterator implement Traversable |
| 31 | - parent::__construct( $collection instanceOf \IteratorAggregate ? $collection->getIterator() : $collection ); |
|
| 31 | + parent::__construct($collection instanceOf \IteratorAggregate ? $collection->getIterator() : $collection); |
|
| 32 | 32 | |
| 33 | 33 | } |
| 34 | 34 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | // Cast to array |
| 46 | 46 | $item_salesman_id = $item->getSalesmanId(); |
| 47 | 47 | if (!is_array($item_salesman_id)) { |
| 48 | - $item_salesman_id = array( $item_salesman_id ); |
|
| 48 | + $item_salesman_id = array($item_salesman_id); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | // Check intersection |
@@ -10,5 +10,5 @@ |
||
| 10 | 10 | * @var int|string $salesman_id |
| 11 | 11 | * @return self |
| 12 | 12 | */ |
| 13 | - public function setSalesmanId( $id ); |
|
| 13 | + public function setSalesmanId($id); |
|
| 14 | 14 | } |