Completed
Push — v1.ns ( ab319d...410f3f )
by Timo
04:00
created
src/Base/GenericBuilder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      * 
40 40
      * @access public
41 41
      * @param string $className class-name to create objects for
42
-     * @param ReflectionClass $reflectionClass reflection-class for class. default: NULL 
42
+     * @param \ReflectionClass $reflectionClass reflection-class for class. default: NULL 
43 43
      * @param boolean $storeRef wether to store a reference for new instance. default: true 
44 44
      * @return 
45 45
      */
Please login to merge, or discard this patch.
src/Event/EventBuilder.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,6 @@
 block discarded – undo
83 83
      * @param ObjectEventDispatcher $dispatcher the dispatcher to dispatch the event 
84 84
      * @param mixed $subject the subject for the event
85 85
      * @param string $name the name of the event
86
-     * @param array $parameters the headers for the event
87 86
      * @return 
88 87
      */
89 88
     public function buildAndDispatch(ObjectEventDispatcher $dispatcher, $subject, $name, array $headers = array()){
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.
src/ABS/Base/Connectable.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     
39 39
     /**
40 40
      * @access public
41
-     * @param $name
41
+     * @param string $name
42 42
      * @param Callable|PEIP\INF\Handler\Handler $listener
43 43
      * @return
44 44
      */
Please login to merge, or discard this patch.
src/ABS/Dispatcher/MapDispatcher.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,6 @@
 block discarded – undo
80 80
      *
81 81
      * @access public
82 82
      * @param string $name name of the event
83
-     * @param Callable|PEIP\INF\Handler\Handler $listener listener to connect
84 83
      * @return
85 84
      */
86 85
     public function disconnectAll($name){
Please login to merge, or discard this patch.
src/ABS/Handler/MessageHandler.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
      * @see PEIP\ABS\Handler\MessageHandler::doSetInputChannel
55 55
      * @access public
56 56
      * @param \PEIP\INF\Channel\Channel $inputChannel the input-channel
57
-     * @return PEIP\ABS\Handler\MessageHandler $this;
57
+     * @return MessageHandler $this;
58 58
      */
59 59
     public function setInputChannel(\PEIP\INF\Channel\Channel $inputChannel){
60 60
         $this->doSetInputChannel($inputChannel);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $this->inputChannel = $inputChannel;    
78 78
         if($this->inputChannel instanceof \PEIP\INF\Channel\SubscribableChannel){
79 79
                 $this->inputChannel->subscribe($this);
80
-        }else{          
80
+        } else{          
81 81
             $this->unwrapEvents = true;
82 82
             $this->inputChannel->connect('postSend', $this);
83 83
         }  
Please login to merge, or discard this patch.
src/ABS/Handler/ReplyProducingMessageHandler.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * Connects the handler to the output-channel. 
52 52
      * 
53 53
      * @access protected
54
-     * @param \PEIP\INF\Channel\Channel $inputChannel the output-channel to connect the handler to
54
+     * @param \PEIP\INF\Channel\Channel $outputChannel the output-channel to connect the handler to
55 55
      * @return 
56 56
      */
57 57
     protected function doSetOutputChannel(\PEIP\INF\Channel\Channel $outputChannel){
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * 
161 161
      * @access public
162 162
      * @param string $messageClass name of the message-class to create reply-messages from. 
163
-     * @return PEIP\ABS\Handler\ReplyProducingMessageHandler $this
163
+     * @return ReplyProducingMessageHandler $this
164 164
      */
165 165
     public function setMessageClass($messageClass){
166 166
         $this->messageClass = $messageClass;
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      * 
194 194
      * @access public
195 195
      * @param array $headerNames array of message-header names to look for a reply-channel
196
-     * @return PEIP\ABS\Handler\ReplyProducingMessageHandler $this
196
+     * @return ReplyProducingMessageHandler $this
197 197
      */
198 198
     public function setReplyChannelHeaders(array $headerNames){
199 199
         $this->replyChannelHeaders = $headerNames;
Please login to merge, or discard this patch.
src/Context/XMLContext.php 2 patches
Doc Comments   +11 added lines, -7 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      * 
136 136
      * @implements \PEIP\INF\Context\Context
137 137
      * @access public
138
-     * @param \PEIP\INF\Context\Context_Plugin $plugin a plugin instance
138
+     * @param \PEIP\INF\Context\ContextPlugin $plugin a plugin instance
139 139
      */
140 140
     public function addPlugin(\PEIP\INF\Context\ContextPlugin $plugin){ 
141 141
         $plugin->init($this);   
@@ -167,7 +167,6 @@  discard block
 block discarded – undo
167 167
      * </config>     
168 168
      * 
169 169
      * @access public
170
-     * @param XMLContext $config the config to include
171 170
      */    
172 171
     public function includeContext(XMLContext $context){
173 172
         $this->services = array_merge($this->services, $context->getServices());
@@ -178,7 +177,7 @@  discard block
 block discarded – undo
178 177
      * 
179 178
      * @see XMLContext::includeContext
180 179
      * @access public
181
-     * @param XMLContext $context the config to include
180
+     * @param string $filePath
182 181
      */    
183 182
     public function includeContextFromFile($filePath){
184 183
         if(file_exists($filePath)){
@@ -357,7 +356,7 @@  discard block
 block discarded – undo
357 356
      * 
358 357
      * @access public
359 358
      * @param $config 
360
-     * @return object the initialized service instance
359
+     * @return \PEIP\INF\Context\ContextPlugin the initialized service instance
361 360
      */
362 361
     public function createService($config){
363 362
         return ServiceFactory::createService($config);      
@@ -685,7 +684,7 @@  discard block
 block discarded – undo
685 684
      * 
686 685
      * @access protected
687 686
      * @param object $config configuration object to create arguments from.  
688
-     * @return mixed build arguments 
687
+     * @return \PEIP\INF\Channel\Channel[] build arguments 
689 688
      */
690 689
     protected function getReplyHandlerArguments($config){
691 690
         $args = array(
@@ -730,7 +729,8 @@  discard block
 block discarded – undo
730 729
      * 
731 730
      * @access protected
732 731
      * @param string the configuration type ofthe channel (e.g.: 'reply', 'request')
733
-     * @param object $config configuration object to return channel from. 
732
+     * @param object $config configuration object to return channel from.
733
+     * @param string $type 
734 734
      * @return \PEIP\INF\Channel\Channel reply-channel
735 735
      */
736 736
     public function doGetChannel($type, $config){
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
      * @see GenericBuilder
794 794
      * @static
795 795
      * @access protected
796
-     * @param object $className name of class to build instance for. 
796
+     * @param string $className name of class to build instance for. 
797 797
      * @param array $arguments arguments for the constructor 
798 798
      * @return object build and modified srvice instance
799 799
      */     
@@ -801,6 +801,10 @@  discard block
 block discarded – undo
801 801
         return GenericBuilder::getInstance($className)->build($arguments);
802 802
     }
803 803
 
804
+    /**
805
+     * @param string $type
806
+     * @param string $name
807
+     */
804 808
     protected static function hasPublicProperty($service, $type, $name){
805 809
         $reflection = GenericBuilder::getInstance(get_class($service))->getReflectionClass();
806 810
         if($reflection->{'has'.$type}($name) && $reflection->{'get'.$type}($name)->isPublic()){
Please login to merge, or discard this 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/Dispatcher/ClassDispatcher.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,6 @@
 block discarded – undo
71 71
      * notifies all listeners on a event on a subject
72 72
      *
73 73
      * @access public
74
-     * @param string $name name of the event
75 74
      * @param mixed $subject the subject
76 75
      * @return
77 76
      */
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         $name = is_object($name) ? get_class($name) : (string)$name;
23 23
         if(Test::assertClassOrInterfaceExists($name)){
24 24
             parent::connect($name, $listener);
25
-        }else{
25
+        } else{
26 26
             throw new \InvalidArgumentException($name." is not an Class nor Interface");
27 27
         }
28 28
     }
Please login to merge, or discard this patch.