Completed
Push — v1.ns ( f9750b...3d0401 )
by Timo
03:19
created
src/Context/XMLContext.php 2 patches
Unused Use Statements   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@
 block discarded – undo
22 22
  */
23 23
 
24 24
 
25
-use PEIP\Handler\CallableHandler;
26
-use PEIP\Service\HeaderServiceActivator;
27
-use PEIP\Channel\ChannelRegistry;
28
-use PEIP\Service\ServiceProvider;
29
-use PEIP\Plugins\BasePlugin;
30
-use PEIP\Factory\ServiceFactory;
31
-use PEIP\Base\GenericBuilder;
32
-use PEIP\Channel\PollableChannel;
33
-use PEIP\Channel\PublishSubscribeChannel;
34
-use PEIP\Gateway\SimpleMessagingGateway;
35
-use PEIP\Listener\Wiretap;
25
+use PEIP\Handler\CallableHandler;
26
+use PEIP\Service\HeaderServiceActivator;
27
+use PEIP\Channel\ChannelRegistry;
28
+use PEIP\Service\ServiceProvider;
29
+use PEIP\Plugins\BasePlugin;
30
+use PEIP\Factory\ServiceFactory;
31
+use PEIP\Base\GenericBuilder;
32
+use PEIP\Channel\PollableChannel;
33
+use PEIP\Channel\PublishSubscribeChannel;
34
+use PEIP\Gateway\SimpleMessagingGateway;
35
+use PEIP\Listener\Wiretap;
36 36
 use PEIP\Service\ServiceActivator;
37 37
 
38 38
 class XMLContext 
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @param callable $callable a callable which creates instances for node-name 
135 135
      */
136 136
     public function registerNodeBuilder($nodeName, $callable){
137
-       return  $this->getServiceProvider()->registerNodeBuilder($nodeName, $callable);
137
+        return  $this->getServiceProvider()->registerNodeBuilder($nodeName, $callable);
138 138
     }
139 139
    
140 140
     /**
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
      */
770 770
     public function buildAndModify($config, $arguments, $defaultClass = false){
771 771
         if("" != (string)$config["class"]  || $defaultClass){
772
-             $service = ServiceFactory::doBuild($config, $arguments, $defaultClass);
772
+                $service = ServiceFactory::doBuild($config, $arguments, $defaultClass);
773 773
         }elseif($config["ref"]){
774 774
             $service = $this->getService((string)$config['ref']);
775 775
         }else{
Please login to merge, or discard this patch.
src/Dispatcher/ClassEventDispatcher.php 2 patches
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
  *
12 12
  * @author timo
13 13
  */
14
-use PEIP\Util\Reflection;
15
-use PEIP\Util\ReflectionPool;
14
+use PEIP\Util\Reflection;
16 15
 use PEIP\Event\EventBuilder;
17 16
 
18 17
 class ClassEventDispatcher extends \PEIP\Dispatcher\ObjectEventDispatcher {
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
                         Reflection_Pool::getInstance(
68 68
                             $object->getContent()
69 69
                         )
70
-                     ),
71
-                     $object
72
-                 );
70
+                        ),
71
+                        $object
72
+                    );
73 73
             }else{
74 74
                 throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
75 75
             }
@@ -78,18 +78,18 @@  discard block
 block discarded – undo
78 78
         }
79 79
     }       //put your code here
80 80
 
81
-     /**
82
-     * Creates an event-object with given object as content/subject and notifies
83
-     * all registers listeners of the event.
84
-     *
85
-     * @access public
86
-     * @param string $name name of the event
87
-     * @param object $object the subject of the event
88
-     * @param array $headers headers of the event-object as key/value pairs
89
-     * @param string $eventClass event-class to create instances from
90
-     * @return
91
-     * @see EventBuilder
92
-     */
81
+        /**
82
+         * Creates an event-object with given object as content/subject and notifies
83
+         * all registers listeners of the event.
84
+         *
85
+         * @access public
86
+         * @param string $name name of the event
87
+         * @param object $object the subject of the event
88
+         * @param array $headers headers of the event-object as key/value pairs
89
+         * @param string $eventClass event-class to create instances from
90
+         * @return
91
+         * @see EventBuilder
92
+         */
93 93
     public function buildAndNotify($name, $object, array $headers = array(), $eventClass = false, $type = false){
94 94
         if(!$this->hasListeners($name, ($object))){
95 95
             return false;
Please login to merge, or discard this patch.
src/Dispatcher/EventClassDispatcher.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  *
12 12
  * @author timo
13 13
  */
14
-use PEIP\Event\EventBuilder;
14
+use PEIP\Event\EventBuilder;
15 15
 use PEIP\Util\ReflectionPool;
16 16
 
17 17
 class EventClassDispatcher
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
                     $this->getListeners(
33 33
                         $name,
34 34
                         $object
35
-                     ),
36
-                     $object->getContent()
37
-                 );
35
+                        ),
36
+                        $object->getContent()
37
+                    );
38 38
             }else{
39 39
                 throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
40 40
             }
@@ -43,18 +43,18 @@  discard block
 block discarded – undo
43 43
         }
44 44
     }       //put your code here
45 45
 
46
-     /**
47
-     * Creates an event-object with given object as content/subject and notifies
48
-     * all registers listeners of the event.
49
-     *
50
-     * @access public
51
-     * @param string $name name of the event
52
-     * @param object $object the subject of the event
53
-     * @param array $headers headers of the event-object as key/value pairs
54
-     * @param string $eventClass event-class to create instances from
55
-     * @return
56
-     * @see EventBuilder
57
-     */
46
+        /**
47
+         * Creates an event-object with given object as content/subject and notifies
48
+         * all registers listeners of the event.
49
+         *
50
+         * @access public
51
+         * @param string $name name of the event
52
+         * @param object $object the subject of the event
53
+         * @param array $headers headers of the event-object as key/value pairs
54
+         * @param string $eventClass event-class to create instances from
55
+         * @return
56
+         * @see EventBuilder
57
+         */
58 58
     public function buildAndNotify($name, $object, array $headers = array(), $eventClass = false, $type = false){
59 59
         if(!$this->hasListeners($name, ($object))){
60 60
             return false;
Please login to merge, or discard this patch.
src/Factory/ServiceFactory.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
  *
12 12
  * @author timo
13 13
  */
14
-use PEIP\Util\Test;
15
-use PEIP\Base\GenericBuilder;
14
+use PEIP\Util\Test;
15
+use PEIP\Base\GenericBuilder;
16 16
 use PEIP\Context\XMLContext;
17 17
 
18 18
 class ServiceFactory {
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
 use PEIP\Context\XMLContext;
17 17
 
18 18
 class ServiceFactory {
19
-     /**
20
-     * Creates and initializes service instance from a given configuration.
21
-     *
22
-     * @access public
23
-     * @param $config
24
-     * @return object the initialized service instance
25
-     */
19
+        /**
20
+         * Creates and initializes service instance from a given configuration.
21
+         *
22
+         * @access public
23
+         * @param $config
24
+         * @return object the initialized service instance
25
+         */
26 26
     public static function createService($config){
27 27
         $args = array();
28 28
         //build arguments for constructor
@@ -35,15 +35,15 @@  discard block
 block discarded – undo
35 35
     }
36 36
 
37 37
         /**
38
-     * Builds an arbitrary service/object instance from a config-obect.
39
-     *
40
-     * @static
41
-     * @access protected
42
-     * @param object $config configuration object to build a service instance from.
43
-     * @param array $arguments arguments for the service constructor
44
-     * @param string $defaultClass class to create instance for if none is set in config
45
-     * @return object build and modified srvice instance
46
-     */
38
+         * Builds an arbitrary service/object instance from a config-obect.
39
+         *
40
+         * @static
41
+         * @access protected
42
+         * @param object $config configuration object to build a service instance from.
43
+         * @param array $arguments arguments for the service constructor
44
+         * @param string $defaultClass class to create instance for if none is set in config
45
+         * @return object build and modified srvice instance
46
+         */
47 47
     public static function doBuild($config, $arguments, $defaultClass = false){
48 48
         $cls = $config["class"] ? trim((string)$config["class"]) : (string)$defaultClass;
49 49
         if($cls != ''){
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
     }
81 81
 
82 82
         /**
83
-     * Builds single argument (to call a method with later) from a config-obect.
84
-     *
85
-     * @access protected
86
-     * @param object $config configuration object to create argument from.
87
-     * @return mixed build argument
88
-     */
83
+         * Builds single argument (to call a method with later) from a config-obect.
84
+         *
85
+         * @access protected
86
+         * @param object $config configuration object to create argument from.
87
+         * @return mixed build argument
88
+         */
89 89
     protected static function buildArg($config){
90 90
         if(trim((string)$config['value']) != ''){
91 91
             $arg = (string)$config['value'];
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public static function buildAndModify($config, $arguments, $defaultClass = false){
130 130
         if("" != (string)$config["class"]  || $defaultClass){
131
-             $service = ServiceFactory::doBuild($config, $arguments, $defaultClass);
131
+                $service = ServiceFactory::doBuild($config, $arguments, $defaultClass);
132 132
         }else{
133 133
             throw new \RuntimeException('Could not create Service. no class or reference given.');
134 134
         }
Please login to merge, or discard this patch.
src/Gateway/SimpleMessagingGateway.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  * @implements \PEIP\INF\Gateway\MessagingGateway, \PEIP\INF\Message\MessageBuilder
21 21
  */
22 22
 
23
-use PEIP\Message\GenericMessage;
23
+use PEIP\Message\GenericMessage;
24 24
 use PEIP\Message\MessageBuilder;
25 25
 
26 26
 class SimpleMessagingGateway 
Please login to merge, or discard this patch.
src/Message/GenericMessage.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  * @implements \PEIP\INF\Base\Container, \PEIP\INF\Message\Message, \PEIP\INF\Base\Buildable
21 21
  */
22 22
 
23
-use PEIP\Util\Test;
23
+use PEIP\Util\Test;
24 24
 use PEIP\Base\GenericBuilder;
25 25
 
26 26
 class GenericMessage 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,11 +76,11 @@
 block discarded – undo
76 76
     }
77 77
 
78 78
         /**
79
-     * returns all headers of the message
80
-     * 
81
-     * @access public
82
-     * @return ArrayAccess ArrayAccess object of headers
83
-     */
79
+         * returns all headers of the message
80
+         * 
81
+         * @access public
82
+         * @return ArrayAccess ArrayAccess object of headers
83
+         */
84 84
     public function getHeaders(){
85 85
         return (array) $this->headers;
86 86
     }
Please login to merge, or discard this patch.
src/Pipe/Pipe.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
  */
25 25
 
26 26
 
27
-use PEIP\Dispatcher\Dispatcher;
28
-use PEIP\Event\Event;
27
+use PEIP\Dispatcher\Dispatcher;
28
+use PEIP\Event\Event;
29 29
 use PEIP\Util\Test;
30 30
 
31 31
 class Pipe 
Please login to merge, or discard this patch.
src/Plugins/BasePlugin.php 1 patch
Unused Use Statements   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
  *
12 12
  * @author timo
13 13
  */
14
-use PEIP\Context\XMLContext;
15
-use PEIP\Channel\PollableChannel;
16
-use PEIP\Channel\PublishSubscribeChannel;
17
-use PEIP\Gateway\SimpleMessagingGateway;
18
-use PEIP\Listener\Wiretap;
14
+use PEIP\Context\XMLContext;
15
+use PEIP\Channel\PollableChannel;
16
+use PEIP\Channel\PublishSubscribeChannel;
17
+use PEIP\Gateway\SimpleMessagingGateway;
18
+use PEIP\Listener\Wiretap;
19 19
 use PEIP\Service\ServiceActivator;
20 20
 
21 21
 class BasePlugin extends \PEIP\ABS\Context\ContextPlugin {
Please login to merge, or discard this patch.
src/Service/ServiceProvider.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  *
12 12
  * @author timo
13 13
  */
14
-use PEIP\Context\XMLContext;
14
+use PEIP\Context\XMLContext;
15 15
 use PEIP\Plugins\BasePlugin;
16 16
 
17 17
 class ServiceProvider extends \PEIP\Service\ServiceContainer  {
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
     }
64 64
 
65 65
         /**
66
-     * Registers a callable as builder for given node-name
67
-     *
68
-     * @implements \PEIP\INF\Context\Context
69
-     * @access public
70
-     * @param string $nodeName the name of the node
71
-     * @param callable $callable a callable which creates instances for node-name
72
-     */
66
+         * Registers a callable as builder for given node-name
67
+         *
68
+         * @implements \PEIP\INF\Context\Context
69
+         * @access public
70
+         * @param string $nodeName the name of the node
71
+         * @param callable $callable a callable which creates instances for node-name
72
+         */
73 73
     public function registerNodeBuilder($nodeName, $callable){
74 74
         $this->nodeBuilders[$nodeName] = $callable;
75 75
     }
76
-  /**
76
+    /**
77 77
      * Registers the build-methods for the main-components with this context.
78 78
      * Note: This method and subsequent registered methods of this class are
79 79
      * candidates for refactoring. Because this class has grown much to large
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         );
90 90
         $plugin = new BasePlugin();
91 91
         foreach($builders as $nodeName => $method){
92
-           $this->registerNodeBuilder($nodeName, array($this, $method));
92
+            $this->registerNodeBuilder($nodeName, array($this, $method));
93 93
         }
94 94
     }
95 95
 
Please login to merge, or discard this patch.