Test Setup Failed
Push — master ( c03d3f...88f4a8 )
by Carsten
03:55
created
src/ApplySalesman.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * @param callable $salesman_factory Callable that takes a Salesman ID that should return a SalesmanInterface instance.
20 20
      */
21
-    public function __construct( callable $salesman_factory, SalesmanInterface $salesman_fallback = null )
21
+    public function __construct(callable $salesman_factory, SalesmanInterface $salesman_fallback = null)
22 22
     {
23 23
         $this->salesman_factory  = $salesman_factory;
24 24
         $this->salesman_fallback = $salesman_fallback;
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param  object $aggregator Object that
30 30
      * @return bool
31 31
      */
32
-    public function __invoke( $aggregator )
32
+    public function __invoke($aggregator)
33 33
     {
34 34
 
35 35
         // Default value
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 
45 45
         // If salesman_id is available
46 46
         if ($aggregator instanceOf SalesmanIdProviderInterface):
47
-            $aggregator->salesman = $salesman_factory( $aggregator->getSalesmanId(), $this->salesman_fallback );
47
+            $aggregator->salesman = $salesman_factory($aggregator->getSalesmanId(), $this->salesman_fallback);
48 48
 
49 49
         elseif (isset($aggregator->salesman_id)):
50
-            $aggregator->salesman = $salesman_factory( $aggregator->salesman_id, $this->salesman_fallback );
50
+            $aggregator->salesman = $salesman_factory($aggregator->salesman_id, $this->salesman_fallback);
51 51
 
52 52
         // Salesman can not be set
53 53
         else:
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,8 +50,10 @@
 block discarded – undo
50 50
             $aggregator->salesman = $salesman_factory( $aggregator->salesman_id, $this->salesman_fallback );
51 51
 
52 52
         // Salesman can not be set
53
-        else:
53
+        else {
54
+            :
54 55
             return false;
56
+        }
55 57
         endif;
56 58
 
57 59
         return true;
Please login to merge, or discard this patch.
src/IteratorApplySalesman.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
      * @param SalesmanInterface $salesman_fallback Optional SalesmanInterface fallback instance
33 33
      * @param callable          $apply             Optional Callable that takes the current item on iteration.
34 34
      */
35
-    public function __construct( callable $salesman_factory, SalesmanInterface $salesman_fallback = null, callable $apply = null )
35
+    public function __construct(callable $salesman_factory, SalesmanInterface $salesman_fallback = null, callable $apply = null)
36 36
     {
37 37
         $this->salesman_factory = $salesman_factory;
38
-        $this->apply = $apply ?: new ApplySalesman( $salesman_factory, $salesman_fallback );
38
+        $this->apply = $apply ?: new ApplySalesman($salesman_factory, $salesman_fallback);
39 39
     }
40 40
 
41 41
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @see  http://php.net/manual/de/function.iterator-apply.php
46 46
      */
47
-    public function __invoke( \Traversable $iterator )
47
+    public function __invoke(\Traversable $iterator)
48 48
     {
49 49
 
50 50
         $current = ($iterator instanceOf \IteratorAggregate)
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         // Perform
55 55
         $apply = $this->apply;
56
-        $apply( $current );
56
+        $apply($current);
57 57
 
58 58
         // Must return true for iterator_apply
59 59
         return true;
Please login to merge, or discard this patch.