Completed
Push — v1.ns ( ab319d...410f3f )
by Timo
04:00
created
src/Listener/Wiretap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
      * @param $outputChannel 
34 34
      * @return 
35 35
      */
36
-    public function __construct(\PEIP\INF\Channel\Channel $inputChannel, \PEIP\INF\Channel\Channel $outputChannel = NULL){
36
+    public function __construct(\PEIP\INF\Channel\Channel $inputChannel, \PEIP\INF\Channel\Channel $outputChannel = NULL) {
37 37
         $this->setEventName('preSend');
38 38
         $this->setInputChannel($inputChannel);
39
-        if(is_object($outputChannel)){
39
+        if (is_object($outputChannel)) {
40 40
             $this->setOutputChannel($outputChannel);
41 41
         }           
42 42
     }           
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @param $message 
48 48
      * @return 
49 49
      */
50
-    protected function doReply(\PEIP\INF\Message\Message $message){
50
+    protected function doReply(\PEIP\INF\Message\Message $message) {
51 51
         $this->replyMessage($message->getHeader('MESSAGE'));
52 52
     }
53 53
     
Please login to merge, or discard this patch.
src/Handler/CallableHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param callable $callable the callable to wrap with the handler 
34 34
      * @return 
35 35
      */
36
-    public function __construct($callable){
36
+    public function __construct($callable) {
37 37
         $this->callable = $callable;    
38 38
     }
39 39
         
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param mixed $subject the subject to handle
46 46
      * @return mixed result of calling the registered callable with given subject
47 47
      */
48
-    public function handle($subject){
48
+    public function handle($subject) {
49 49
         return call_user_func($this->callable, $subject);
50 50
     }
51 51
     
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @return mixed result of calling the registered callable with given subject
59 59
      * @see CallableHandler::handle 
60 60
      */
61
-    public function __invoke($subject){
61
+    public function __invoke($subject) {
62 62
         return $this->handle($subject); 
63 63
     }
64 64
     
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @access public
69 69
      * @return callable callable wrapped by the handler
70 70
      */
71
-    public function getCallable(){
71
+    public function getCallable() {
72 72
         return $this->callable;
73 73
     }
74 74
     
Please login to merge, or discard this patch.
src/Event/Observable.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@
 block discarded – undo
49 49
     }
50 50
 
51 51
         /**
52
-     * @access public
53
-     * @param $observer 
54
-     * @return 
55
-     */
52
+         * @access public
53
+         * @param $observer 
54
+         * @return 
55
+         */
56 56
     public function addObserver(\PEIP\INF\Event\Observer $observer){
57 57
         $this->observers[] = $observer;     
58 58
     }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
      * @param $observedObject 
37 37
      * @return 
38 38
      */
39
-    public function __construct($observedObject){
39
+    public function __construct($observedObject) {
40 40
         $this->setObserved($observedObject);
41 41
     }
42 42
 
43
-    protected function setObserved($observedObject){
44
-        if(!is_object($observedObject)){
43
+    protected function setObserved($observedObject) {
44
+        if (!is_object($observedObject)) {
45 45
             throw new \InvalidArgumentException("$observedObject must be an object. ".gettype($var)." given.");
46 46
         }
47 47
         
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @param $observer 
54 54
      * @return 
55 55
      */
56
-    public function addObserver(\PEIP\INF\Event\Observer $observer){
56
+    public function addObserver(\PEIP\INF\Event\Observer $observer) {
57 57
         $this->observers[] = $observer;     
58 58
     }
59 59
 
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
      * @param $observer 
64 64
      * @return 
65 65
      */
66
-    public function deleteObserver(\PEIP\INF\Event\Observer $observer){
67
-        foreach($this->observers as $key=>$obs){
68
-            if($obs == $observer){
66
+    public function deleteObserver(\PEIP\INF\Event\Observer $observer) {
67
+        foreach ($this->observers as $key=>$obs) {
68
+            if ($obs == $observer) {
69 69
                 unset($this->observers[$key]);
70 70
                 return true;
71 71
             }
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
      * @param $arguments 
79 79
      * @return 
80 80
      */
81
-    public function notifyObservers(array $arguments = array()){
82
-        if($this->hasChanged()){
83
-            foreach($this->observers as $observer){
81
+    public function notifyObservers(array $arguments = array()) {
82
+        if ($this->hasChanged()) {
83
+            foreach ($this->observers as $observer) {
84 84
                 $observer->update($this->observedObject);
85 85
             }       
86 86
         }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      * @access public
92 92
      * @return 
93 93
      */
94
-    public function countObservers(){
94
+    public function countObservers() {
95 95
         return count($this->obeservers);
96 96
     }
97 97
     
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @access public
101 101
      * @return 
102 102
      */
103
-    public function hasChanged(){
103
+    public function hasChanged() {
104 104
         return $this->hasChanged();
105 105
     }
106 106
     
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @access public
110 110
      * @return 
111 111
      */
112
-    public function setChanged(){
112
+    public function setChanged() {
113 113
         $this->hasChanged = true;
114 114
     }
115 115
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * @access public
119 119
      * @return 
120 120
      */
121
-    public function clearChanged(){
121
+    public function clearChanged() {
122 122
         $this->hasChanged = true;   
123 123
     }
124 124
 
Please login to merge, or discard this patch.
src/Dispatcher/IteratingDispatcher.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
      * @param mixed array|ArrayAccess array with values to iterate over
42 42
      * @return 
43 43
      */
44
-    public function __construct($array = array()){
44
+    public function __construct($array = array()) {
45 45
         $this->init($array);
46 46
     }
47 47
 
48
-    protected function init($array = array()){
48
+    protected function init($array = array()) {
49 49
         $array = Test::assertArrayAccess($array)
50 50
             ? $array
51 51
             : array();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @param mixed $listener the listener to register
60 60
      * @return 
61 61
      */
62
-    public function connect($listener){
62
+    public function connect($listener) {
63 63
         $this->listeners[] = $listener;
64 64
     }
65 65
 
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
      * @param mixed $listener the listener to unregister
71 71
      * @return 
72 72
      */
73
-    public function disconnect($listener){
74
-        foreach ($this->listeners as $i => $callable){
75
-            if ($listener === $callable){
73
+    public function disconnect($listener) {
74
+        foreach ($this->listeners as $i => $callable) {
75
+            if ($listener === $callable) {
76 76
                 unset($this->listeners[$i]);
77 77
             }
78 78
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @access public
86 86
      * @return
87 87
      */
88
-    public function disconnectAll(){
88
+    public function disconnectAll() {
89 89
         $this->init();
90 90
     }
91 91
 
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
      * @access public
96 96
      * @return boolean wether any listener is registered
97 97
      */
98
-    public function hasListeners(){
99
-        return (boolean) $this->listeners->count();
98
+    public function hasListeners() {
99
+        return (boolean)$this->listeners->count();
100 100
     }
101 101
 
102 102
     /**
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
      * @param mixed $subject the subject to notify about 
109 109
      * @return 
110 110
      */
111
-    public function notify($subject){
111
+    public function notify($subject) {
112 112
         $res = NULL;
113
-        if($this->hasListeners()){
114
-            if(!$this->listeners->valid()){
113
+        if ($this->hasListeners()) {
114
+            if (!$this->listeners->valid()) {
115 115
                 $this->listeners->rewind();
116 116
             }
117 117
             $res = self::doNotifyOne($this->listeners->current(), $subject);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @access public
127 127
      * @return array registered listeners 
128 128
      */
129
-    public function getListeners(){
129
+    public function getListeners() {
130 130
         return $this->listeners->getArrayCopy();
131 131
     }
132 132
     
Please login to merge, or discard this patch.
src/Util/ReflectionPool.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
      * @param $argument
23 23
      * @return ReflectionClass
24 24
      */
25
-    public  static function getInstance($argument){
25
+    public  static function getInstance($argument) {
26 26
 
27 27
         $className = is_object($argument)
28 28
             ? get_class($argument)
29
-            : (string) $argument;
29
+            : (string)$argument;
30 30
         return isset(self::$instances[$className])
31 31
             ? self::$instances[$className]
32 32
             : self::$instances[$className] = new \ReflectionClass($className);
Please login to merge, or discard this patch.
src/Util/Reflection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
      * @return array array with interface/class info for the class
31 31
      */
32 32
 
33
-    public static function getImplementedClassesAndInterfaces($class, $store = true){
33
+    public static function getImplementedClassesAndInterfaces($class, $store = true) {
34 34
         $class = is_object($class) ? get_class($class) : (string)$class;
35
-        if(isset(self::$classInfo[$class])){
35
+        if (isset(self::$classInfo[$class])) {
36 36
             return self::$classInfo[$class];
37 37
         }
38 38
         $cls = ReflectionPool::getInstance($class);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $classInfo = (array)$cls->getInterfaceNames();
41 41
         $classInfo[] = $cls->getName();
42 42
         // get names of parent-classes
43
-        while($cls = $cls->getParentClass()){
43
+        while ($cls = $cls->getParentClass()) {
44 44
             $classInfo[] = $cls->getName();
45 45
         }
46 46
         
Please login to merge, or discard this patch.