Completed
Push — v1.ns ( 6f2676...0f96a8 )
by Timo
03:42
created
examples/Cafe/lib/model/Barista.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     	if($cold){
40 40
     		$type = 'cold';
41 41
     		$count = $this->coldDrinkCounter;
42
-    	}else{
42
+    	} else{
43 43
     		$type = 'hot';
44 44
     		$count = $this->hotDrinkCounter;    		
45 45
     	}
Please login to merge, or discard this patch.
src/Dispatcher/ClassEventDispatcher.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,10 +70,10 @@
 block discarded – undo
70 70
                      ),
71 71
                      $object
72 72
                  );
73
-            }else{
73
+            } else{
74 74
                 throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
75 75
             }
76
-        }else{
76
+        } else{
77 77
             throw new \InvalidArgumentException('object must be instance of \PEIP\INF\Event\Event');
78 78
         }
79 79
     }       //put your code here
Please login to merge, or discard this patch.
src/Util/Test.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             class_exists($className);
44 44
             $res =  ReflectionPool::getInstance($className)
45 45
                 ->implementsInterface($interfaceName);            
46
-        }  catch (\Exception $e){
46
+        } catch (\Exception $e){
47 47
             $res = false; 
48 48
         }
49 49
         return $res;;
Please login to merge, or discard this patch.
examples/Cafe/example.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 var_dump($drinks);
58 58
     	}	
59 59
 
60
-}else{
60
+} else{
61 61
 	throw new RuntimeException('Could not get CafeGateway');
62 62
 }
63 63
 
Please login to merge, or discard this patch.
src/Translator/XMLArrayTranslator.php 1 patch
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
                 throw new \Exception('loading XML failed');  
31 31
             }
32 32
             
33
-        }
34
-        catch(\Exception $e){
33
+        } catch(\Exception $e){
35 34
             return false;
36 35
         }     
37 36
         
@@ -65,7 +64,7 @@  discard block
 block discarded – undo
65 64
                         )
66 65
                     );
67 66
                 }
68
-            }else{
67
+            } else{
69 68
                 $array[$name] = array();
70 69
             }
71 70
             $array[$name][] = $res;
Please login to merge, or discard this patch.
src/Context/XMLContext.php 1 patch
Braces   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     public static function createFromFile($file){
95 95
         if(file_exists($file)){
96 96
             return self::createFromString(file_get_contents($file));
97
-        }else{
97
+        } else{
98 98
             throw new \RuntimeException('Cannot open file  "'.$file.'".');
99 99
         }
100 100
     }
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
                     $setter = self::getSetter($property);               
386 386
                     if($setter &&  self::hasPublicProperty($service, 'Method', $setter)){
387 387
                         $service->{$setter}($arg);  
388
-                    }elseif(in_array($property, self::hasPublicProperty($service, 'Property', $setter))){
388
+                    } elseif(in_array($property, self::hasPublicProperty($service, 'Property', $setter))){
389 389
                         $service->$setter = $arg;
390 390
                     }                   
391 391
                 }
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
         $ref = trim((string)$config['ref']);
619 619
         if($ref != ''){
620 620
             $service = $this->getService($ref); 
621
-        }else{
621
+        } else{
622 622
             $service = $this->createService($config);
623 623
         }
624 624
         return $service;
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
     protected static function getSetter($config){
639 639
         if($config['setter']){
640 640
             $setter = (string)$config['setter'];
641
-        }elseif($config['name']){
641
+        } elseif($config['name']){
642 642
             $setter = 'set'.ucfirst((string)$config['name']);   
643 643
         }
644 644
         return $setter;     
@@ -654,26 +654,26 @@  discard block
 block discarded – undo
654 654
     protected function buildArg($config){ 
655 655
         if(trim((string)$config['value']) != ''){
656 656
             $arg = (string)$config['value'];
657
-        }elseif($config->getName() == 'value'){
657
+        } elseif($config->getName() == 'value'){
658 658
             $arg = (string)$config;
659
-        }elseif($config->getName() == 'list'){
659
+        } elseif($config->getName() == 'list'){
660 660
             $arg = array();
661 661
             foreach($config->children() as $entry){ 
662 662
                 if($entry->getName() == 'value'){
663 663
                     if($entry['key']){
664 664
                         $arg[(string)$entry['key']] = (string)$entry;   
665
-                    }else{
665
+                    } else{
666 666
                         $arg[] = (string)$entry;
667 667
                     }
668
-                }elseif($entry->getName() == 'service'){
668
+                } elseif($entry->getName() == 'service'){
669 669
                     $arg[] = $this->provideService($entry);
670 670
                 }
671 671
             }
672
-        }elseif($config->getName() == 'service'){
672
+        } elseif($config->getName() == 'service'){
673 673
             $arg = $this->provideService($config);
674
-        }elseif($config->list){
674
+        } elseif($config->list){
675 675
             $arg = $this->buildArg($config->list);
676
-        }elseif($config->service){
676
+        } elseif($config->service){
677 677
             $arg = $this->buildArg($config->service);
678 678
         } 
679 679
         return $arg; 
@@ -774,10 +774,10 @@  discard block
 block discarded – undo
774 774
                 $constructor = (string)$config["constructor"];
775 775
         if($constructor != ''){
776 776
             $service = call_user_func_array(array($cls, $constructor), $arguments); 
777
-        }else{
777
+        } else{
778 778
             $service = self::build($cls, $arguments); 
779 779
         }        
780
-            }catch(\Exception $e){
780
+            } catch(\Exception $e){
781 781
                 throw new \RuntimeException('Could not create Service "'.$cls.'" -> '.$e->getMessage());
782 782
             }           
783 783
         }
Please login to merge, or discard this patch.
src/Message/GenericMessage.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,12 +134,10 @@
 block discarded – undo
134 134
         $res = false;
135 135
         try {
136 136
             $res = (string)$this->getContent();
137
-        }
138
-        catch(\Exception $e){           
137
+        } catch(\Exception $e){           
139 138
             try {
140 139
                 $res = get_class($this->getContent());
141
-            }
142
-            catch(\Exception $e){
140
+            } catch(\Exception $e){
143 141
                 return "";
144 142
             }
145 143
         }     
Please login to merge, or discard this patch.
src/Message/CallableMessageHandler.php 1 patch
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
                 if($static && !$reflectionFunc->isStatic()){
57 57
                     throw new \InvalidArgumentException('Argument 1 passed to CallableMessageHandler::__construct is not an Callable: Method "'.$method.'" of class '.$class.' is not static.');                  
58 58
                 }
59
-            }else{
59
+            } else{
60 60
                 $reflectionFunc = new \ReflectionFunction($this->callable);  
61 61
             }
62 62
             $this->requiredParameters = $reflectionFunc->getNumberOfRequiredParameters();
63
-        }else{
63
+        } else{
64 64
             throw new \InvalidArgumentException('Argument 1 passed to CallableMessageHandler::__construct is not a Callable');
65 65
         }   
66 66
     }   
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
         }   
80 80
         try {
81 81
             return call_user_func_array($this->callable, array($message, $channel, $sent));
82
-        }
83
-        catch(\Exception $e){
82
+        } catch(\Exception $e){
84 83
             throw new \RuntimeException('Unable to call Callable: '.$e->getMessage());
85 84
         }   
86 85
     }   
Please login to merge, or discard this patch.
src/Data/ParameterHolderCollection.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             $store = $this->factory->build();
51 51
             if($store instanceof \PEIP\INF\Data\ParameterHolder){
52 52
                 $this->stores[$namespace] = $store;
53
-            }else{
53
+            } else{
54 54
                 throw new \Exception('Could not build Instance of \PEIP\INF\Data\ParameterHolder from factory.');
55 55
             }
56 56
         }
Please login to merge, or discard this patch.