Completed
Push — v1.ns ( 6f7a44...3cce68 )
by Timo
03:08
created
src/Factory/DedicatedFactory.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -47,6 +47,9 @@
 block discarded – undo
47 47
         return new DedicatedFactory(array($class, '__construct'), $parameters); 
48 48
     } 
49 49
 
50
+    /**
51
+     * @param string[] $callable
52
+     */
50 53
     public static function getfromCallable($callable, array $parameters = array()){
51 54
         return new DedicatedFactory($callable, $parameters); 
52 55
     } 
Please login to merge, or discard this patch.
src/Service/ServiceProvider.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -112,6 +112,9 @@
 block discarded – undo
112 112
         );
113 113
     }
114 114
 
115
+    /**
116
+     * @param string $key
117
+     */
115 118
     public function provideService($key){
116 119
         $this->doFireEvent(self::EVENT_BEFORE_PROVIDE_SERVICE, array(
117 120
             self::HEADER_KEY=>$key)
Please login to merge, or discard this patch.
examples/Cafe/example.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,19 +46,19 @@
 block discarded – undo
46 46
 
47 47
 if($cafe){
48 48
 
49
-	for ($i = 1; $i <= 10; $i++) {
50
-       	// create and place orders
51
-		$order = new Order();
52
-        	$order->addItem("LATTE", 2, false);
53
-        	$order->addItem("MOCCA", 3, true);
54
-        	$cafe->placeOrder($order);
55
-        	// receive drinks
56
-		$drinks = $cafe->receiveDelivery();
49
+    for ($i = 1; $i <= 10; $i++) {
50
+            // create and place orders
51
+        $order = new Order();
52
+            $order->addItem("LATTE", 2, false);
53
+            $order->addItem("MOCCA", 3, true);
54
+            $cafe->placeOrder($order);
55
+            // receive drinks
56
+        $drinks = $cafe->receiveDelivery();
57 57
                 var_dump($drinks);
58
-    	}	
58
+        }	
59 59
 
60 60
 }else{
61
-	throw new RuntimeException('Could not get CafeGateway');
61
+    throw new RuntimeException('Could not get CafeGateway');
62 62
 }
63 63
 
64 64
 
Please login to merge, or discard this patch.
examples/Cafe/lib/messaging/DrinkRouter.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@
 block discarded – undo
4 4
 use PEIP\INF\Message\Message;
5 5
 
6 6
 class DrinkRouter 
7
-	extends Router {
7
+    extends Router {
8 8
 	
9
-	protected function selectChannels(Message $message){
10
-		$order = $message->getContent();
11
-		$channelName = $order['iced']  ? 'coldDrinks' : 'hotDrinks';
12
-		echo PEIP_LINE_SEPARATOR."DrinkRouter: routed to channel: $channelName";
13
-		return $channelName;
14
-	}	
9
+    protected function selectChannels(Message $message){
10
+        $order = $message->getContent();
11
+        $channelName = $order['iced']  ? 'coldDrinks' : 'hotDrinks';
12
+        echo PEIP_LINE_SEPARATOR."DrinkRouter: routed to channel: $channelName";
13
+        return $channelName;
14
+    }	
15 15
 
16 16
 	
17 17
 }
Please login to merge, or discard this patch.
src/Factory/ServiceFactory.php 1 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 configuration of the service
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 configuration of the service
24
+         * @return object the initialized service instance
25
+         */
26 26
     public static function createService(array $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 = isset($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 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(array $config, $arguments, $defaultClass = ""){
130 130
         if((isset($config["class"]) && "" != (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/Dispatcher/Dispatcher.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,6 @@
 block discarded – undo
65 65
      * Disconnects all listeners.
66 66
      * 
67 67
      * @access public
68
-     * @param Callable|PEIP\INF\Handler\Handler $listener
69 68
      * @return void
70 69
      */
71 70
     public function disconnectAll(){
Please login to merge, or discard this patch.
src/Plugins/BasePlugin.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      *
214 214
      * @access protected
215 215
      * @param object $config configuration object to create arguments from.
216
-     * @return mixed build arguments
216
+     * @return \PEIP\INF\Channel\Channel[] build arguments
217 217
      */
218 218
     protected function getReplyHandlerArguments($config){
219 219
         $args = array(
@@ -259,6 +259,7 @@  discard block
 block discarded – undo
259 259
      * @access protected
260 260
      * @param string the configuration type ofthe channel (e.g.: 'reply', 'request')
261 261
      * @param object $config configuration object to return channel from.
262
+     * @param string $type
262 263
      * @return \PEIP\INF\Channel\Channel reply-channel
263 264
      */
264 265
     public function doGetChannel($type, $config){
Please login to merge, or discard this patch.
src/INF/Data/ParameterHolderCollection.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -23,26 +23,26 @@
 block discarded – undo
23 23
 
24 24
 interface ParameterHolderCollection {
25 25
 
26
-  public function setParameters($namespace, array $parameters);
26
+    public function setParameters($namespace, array $parameters);
27 27
   
28
-  public function addParameters($namespace, array $parameters);
28
+    public function addParameters($namespace, array $parameters);
29 29
   
30
-  public function getParameters($namespace);
30
+    public function getParameters($namespace);
31 31
   
32
-  public function getParameter($namespace, $name);
32
+    public function getParameter($namespace, $name);
33 33
   
34
-  public function setParameter($namespace, $name, $value);
34
+    public function setParameter($namespace, $name, $value);
35 35
   
36
-  public function hasParameter($namespace, $name);
36
+    public function hasParameter($namespace, $name);
37 37
 
38
-  public function deleteParameter($namespace, $name);
38
+    public function deleteParameter($namespace, $name);
39 39
 
40
-  public function setParameterHolder($namespace, \PEIP\INF\Data\ParameterHolder $holder); 
40
+    public function setParameterHolder($namespace, \PEIP\INF\Data\ParameterHolder $holder); 
41 41
 
42
-  public function getParameterHolder($namespace);
42
+    public function getParameterHolder($namespace);
43 43
 
44
-  public function hasParameterHolder($namespace);
44
+    public function hasParameterHolder($namespace);
45 45
 
46
-  public function deleteParameterHolder($namespace);
46
+    public function deleteParameterHolder($namespace);
47 47
   
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
src/Message/StringMessage.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,6 @@
 block discarded – undo
64 64
      * @static
65 65
      * @access public
66 66
      * @implements \PEIP\INF\Base\Buildable
67
-     * @param string $name the name of the header
68 67
      * @return boolean wether the header is set
69 68
      */
70 69
     public static function build(array $arguments = array()){
Please login to merge, or discard this patch.