Completed
Push — v1.ns ( 96d67d...676682 )
by Timo
04:33
created
src/Context/XMLContext.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * 
142 142
      * @implements \PEIP\INF\Context\Context
143 143
      * @access public
144
-     * @param \PEIP\INF\Context\Context_Plugin $plugin a plugin instance
144
+     * @param \PEIP\INF\Context\ContextPlugin $plugin a plugin instance
145 145
      */
146 146
     public function addPlugin(\PEIP\INF\Context\ContextPlugin $plugin){ 
147 147
         $plugin->init($this);   
@@ -173,7 +173,6 @@  discard block
 block discarded – undo
173 173
      * </config>     
174 174
      * 
175 175
      * @access public
176
-     * @param XMLContext $config the config to include
177 176
      */    
178 177
     public function includeContext(XMLContext $context){
179 178
         $this->services = array_merge($this->services, $context->getServices());
@@ -184,7 +183,7 @@  discard block
 block discarded – undo
184 183
      * 
185 184
      * @see XMLContext::includeContext
186 185
      * @access public
187
-     * @param XMLContext $context the config to include
186
+     * @param string $filePath
188 187
      */    
189 188
     public function includeContextFromFile($filePath){
190 189
         if(file_exists($filePath)){
@@ -363,7 +362,7 @@  discard block
 block discarded – undo
363 362
      * 
364 363
      * @access public
365 364
      * @param $config 
366
-     * @return object the initialized service instance
365
+     * @return \PEIP\INF\Context\ContextPlugin the initialized service instance
367 366
      */
368 367
     public function createService(array $config){
369 368
         return ServiceFactory::createService($config);      
@@ -638,7 +637,7 @@  discard block
 block discarded – undo
638 637
      * 
639 638
      * @access protected
640 639
      * @param object $config configuration object to create arguments from.  
641
-     * @return mixed build arguments 
640
+     * @return \PEIP\INF\Channel\Channel[] build arguments 
642 641
      */
643 642
     protected function getReplyHandlerArguments($config){
644 643
         $args = array(
@@ -683,7 +682,8 @@  discard block
 block discarded – undo
683 682
      * 
684 683
      * @access protected
685 684
      * @param string the configuration type ofthe channel (e.g.: 'reply', 'request')
686
-     * @param object $config configuration object to return channel from. 
685
+     * @param object $config configuration object to return channel from.
686
+     * @param string $type 
687 687
      * @return \PEIP\INF\Channel\Channel reply-channel
688 688
      */
689 689
     public function doGetChannel($type, $config){
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
      * @see GenericBuilder
738 738
      * @static
739 739
      * @access protected
740
-     * @param object $className name of class to build instance for. 
740
+     * @param string $className name of class to build instance for. 
741 741
      * @param array $arguments arguments for the constructor 
742 742
      * @return object build and modified srvice instance
743 743
      */     
Please login to merge, or discard this patch.
Braces   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public static function createFromFile($file){
101 101
         if(file_exists($file)){
102 102
             return self::createFromString(file_get_contents($file));
103
-        }else{
103
+        } else{
104 104
             throw new \RuntimeException('Cannot open file  "'.$file.'".');
105 105
         }
106 106
     }
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         $ref = trim((string)$config['ref']);
572 572
         if($ref != ''){
573 573
             $service = $this->getService($ref); 
574
-        }else{
574
+        } else{
575 575
             $service = $this->createService($config);
576 576
         }
577 577
         return $service;
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
     protected static function getSetter($config){
592 592
         if($config['setter']){
593 593
             $setter = (string)$config['setter'];
594
-        }elseif($config['name']){
594
+        } elseif($config['name']){
595 595
             $setter = 'set'.ucfirst((string)$config['name']);   
596 596
         }
597 597
         return $setter;     
@@ -607,26 +607,26 @@  discard block
 block discarded – undo
607 607
     protected function buildArg($config){ 
608 608
         if(trim((string)$config['value']) != ''){
609 609
             $arg = (string)$config['value'];
610
-        }elseif($config->getName() == 'value'){
610
+        } elseif($config->getName() == 'value'){
611 611
             $arg = (string)$config;
612
-        }elseif($config->getName() == 'list'){
612
+        } elseif($config->getName() == 'list'){
613 613
             $arg = array();
614 614
             foreach($config->children() as $entry){ 
615 615
                 if($entry->getName() == 'value'){
616 616
                     if($entry['key']){
617 617
                         $arg[(string)$entry['key']] = (string)$entry;   
618
-                    }else{
618
+                    } else{
619 619
                         $arg[] = (string)$entry;
620 620
                     }
621
-                }elseif($entry->getName() == 'service'){
621
+                } elseif($entry->getName() == 'service'){
622 622
                     $arg[] = $this->provideService($entry);
623 623
                 }
624 624
             }
625
-        }elseif($config->getName() == 'service'){
625
+        } elseif($config->getName() == 'service'){
626 626
             $arg = $this->provideService($config);
627
-        }elseif($config->list){
627
+        } elseif($config->list){
628 628
             $arg = $this->buildArg($config->list);
629
-        }elseif($config->service){
629
+        } elseif($config->service){
630 630
             $arg = $this->buildArg($config->service);
631 631
         } 
632 632
         return $arg; 
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
         $channel =  $this->services[trim((string)$channelName)];
695 695
         if($channel instanceof \PEIP\INF\Channel\Channel){
696 696
             return $channel;    
697
-        }else{
697
+        } else{
698 698
             return NULL;
699 699
         }       
700 700
     }
@@ -718,10 +718,10 @@  discard block
 block discarded – undo
718 718
                 $constructor = (string)$config["constructor"];
719 719
         if($constructor != ''){
720 720
             $service = call_user_func_array(array($cls, $constructor), $arguments); 
721
-        }else{
721
+        } else{
722 722
             $service = self::build($cls, $arguments); 
723 723
         }        
724
-            }catch(\Exception $e){
724
+            } catch(\Exception $e){
725 725
                 throw new \RuntimeException('Could not create Service "'.$cls.'" -> '.$e->getMessage());
726 726
             }           
727 727
         }
Please login to merge, or discard this patch.