@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * @param $key |
| 33 | 33 | * @return |
| 34 | 34 | */ |
| 35 | - protected function hasInternalValue($key){ |
|
| 35 | + protected function hasInternalValue($key) { |
|
| 36 | 36 | return array_key_exists($key, $this->internalValues); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @param $key |
| 43 | 43 | * @return |
| 44 | 44 | */ |
| 45 | - protected function getInternalValue($key){ |
|
| 45 | + protected function getInternalValue($key) { |
|
| 46 | 46 | return array_key_exists($key, $this->internalValues) ? $this->internalValues[$key] : NULL; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @param $key |
| 53 | 53 | * @return |
| 54 | 54 | */ |
| 55 | - protected function deleteInternalValue($key){ |
|
| 55 | + protected function deleteInternalValue($key) { |
|
| 56 | 56 | unset($this->internalValues[$key]); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @param $value |
| 64 | 64 | * @return |
| 65 | 65 | */ |
| 66 | - protected function setInternalValue($key, $value){ |
|
| 66 | + protected function setInternalValue($key, $value) { |
|
| 67 | 67 | $this->internalValues[$key] = $value; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * @param $internalValues |
| 81 | 81 | * @return |
| 82 | 82 | */ |
| 83 | - protected function setInternalValues(array $internalValues){ |
|
| 83 | + protected function setInternalValues(array $internalValues) { |
|
| 84 | 84 | $this->internalValues = $internalValues; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * @access protected |
| 96 | 96 | * @return |
| 97 | 97 | */ |
| 98 | - protected function getInternalValues(){ |
|
| 98 | + protected function getInternalValues() { |
|
| 99 | 99 | return $this->internalValues; |
| 100 | 100 | } |
| 101 | 101 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @access protected |
| 105 | 105 | * @return |
| 106 | 106 | */ |
| 107 | - protected function addInternalValues(){ |
|
| 107 | + protected function addInternalValues() { |
|
| 108 | 108 | array_merge($this->internalValues, $internalValues); |
| 109 | 109 | } |
| 110 | 110 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @param mixed $value the value to store |
| 35 | 35 | * @return |
| 36 | 36 | */ |
| 37 | - public function setValue($key, $value){ |
|
| 37 | + public function setValue($key, $value) { |
|
| 38 | 38 | return $this->offsetSet($key, $value); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @param mixed $key the key to return value for |
| 46 | 46 | * @return mixed the value for the given key |
| 47 | 47 | */ |
| 48 | - public function getValue($key){ |
|
| 48 | + public function getValue($key) { |
|
| 49 | 49 | return $this->offsetGet($key, $value); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * @param mixed $key the key to unset value for |
| 57 | 57 | * @return |
| 58 | 58 | */ |
| 59 | - public function deleteValue($key){ |
|
| 59 | + public function deleteValue($key) { |
|
| 60 | 60 | return $this->offsetUnset($key); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * @param mixed $key the key to look for a value |
| 68 | 68 | * @return boolean wether a value is stored for the key |
| 69 | 69 | */ |
| 70 | - public function hasValue($key){ |
|
| 70 | + public function hasValue($key) { |
|
| 71 | 71 | return $this->offsetExists($key); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @param array $values key/value pairs to store |
| 79 | 79 | * @return |
| 80 | 80 | */ |
| 81 | - public function setValues(array $values){ |
|
| 81 | + public function setValues(array $values) { |
|
| 82 | 82 | $this->values = $values; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * @access public |
| 89 | 89 | * @return array stored key/value pairs |
| 90 | 90 | */ |
| 91 | - public function getValues(){ |
|
| 91 | + public function getValues() { |
|
| 92 | 92 | return $this->values; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @param $values |
| 101 | 101 | * @return |
| 102 | 102 | */ |
| 103 | - public function addValues(array $values){ |
|
| 103 | + public function addValues(array $values) { |
|
| 104 | 104 | array_merge($this->values, $values); |
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | \ No newline at end of file |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @param string $key name of parameter |
| 35 | 35 | * @return boolean wether parameter is set |
| 36 | 36 | */ |
| 37 | - public function hasParameter($key){ |
|
| 37 | + public function hasParameter($key) { |
|
| 38 | 38 | return array_key_exists($key, $this->parameters); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @param string $key name of parameter |
| 46 | 46 | * @return |
| 47 | 47 | */ |
| 48 | - public function getParameter($key){ |
|
| 48 | + public function getParameter($key) { |
|
| 49 | 49 | return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : NULL; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * @param string $key name of parameter |
| 57 | 57 | * @return |
| 58 | 58 | */ |
| 59 | - public function deleteParameter($key){ |
|
| 59 | + public function deleteParameter($key) { |
|
| 60 | 60 | unset($this->parameters[$key]); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @param string $value value to set for the parameter |
| 69 | 69 | * @return |
| 70 | 70 | */ |
| 71 | - public function setParameter($key, $value){ |
|
| 71 | + public function setParameter($key, $value) { |
|
| 72 | 72 | $this->parameters[$key] = $value; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * @param array $parameters parameters as key/value pairs |
| 80 | 80 | * @return |
| 81 | 81 | */ |
| 82 | - public function setParameters(array $parameters){ |
|
| 82 | + public function setParameters(array $parameters) { |
|
| 83 | 83 | $this->parameters = $parameters; |
| 84 | 84 | } |
| 85 | 85 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @access public |
| 90 | 90 | * @return array $parameters parameters as key/value pairs |
| 91 | 91 | */ |
| 92 | - public function getParameters(){ |
|
| 92 | + public function getParameters() { |
|
| 93 | 93 | return $this->parameters; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * @param array $parameters parameters as key/value pairs |
| 102 | 102 | * @return |
| 103 | 103 | */ |
| 104 | - public function addParameters(array $parameters){ |
|
| 104 | + public function addParameters(array $parameters) { |
|
| 105 | 105 | $this->parameters = array_merge($this->parameters, $parameters); |
| 106 | 106 | array_unique($this->parameters); |
| 107 | 107 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @param array $parameters parameters as key/value pairs |
| 115 | 115 | * @return |
| 116 | 116 | */ |
| 117 | - public function addParametersIfNot(array $parameters){ |
|
| 117 | + public function addParametersIfNot(array $parameters) { |
|
| 118 | 118 | $this->parameters = array_merge($parameters, $this->parameters); |
| 119 | 119 | array_unique($this->parameters); |
| 120 | 120 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | class StoreCollection |
| 26 | 26 | extends \PEIP\Data\InternalStoreAbstract |
| 27 | - implements \PEIP\INF\Data\StoreCollection{ |
|
| 27 | + implements \PEIP\INF\Data\StoreCollection { |
|
| 28 | 28 | |
| 29 | 29 | protected |
| 30 | 30 | $factory, |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * @param \PEIP\INF\Factory\DedicatedFactory $factory a factory instance to create new stores |
| 38 | 38 | * @return |
| 39 | 39 | */ |
| 40 | - public function __construct(\PEIP\INF\Factory\DedicatedFactory $factory){ |
|
| 40 | + public function __construct(\PEIP\INF\Factory\DedicatedFactory $factory) { |
|
| 41 | 41 | $this->factory = $factory; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | * @param string $namespace the namespace to get the store for |
| 50 | 50 | * @return \PEIP\INF\Data\Store a store for given namespace |
| 51 | 51 | */ |
| 52 | - protected function getStoreOrCreate($namespace){ |
|
| 53 | - if(!$this->hasPrivateValue($namespace)){ |
|
| 52 | + protected function getStoreOrCreate($namespace) { |
|
| 53 | + if (!$this->hasPrivateValue($namespace)) { |
|
| 54 | 54 | $store = $this->factory->build(); |
| 55 | - if($store instanceof \PEIP\INF\Data\Store){ |
|
| 55 | + if ($store instanceof \PEIP\INF\Data\Store) { |
|
| 56 | 56 | $this->setPrivateValue($namespace, $store); |
| 57 | - }else{ |
|
| 57 | + }else { |
|
| 58 | 58 | throw new \Exception('Could not build Instance of \PEIP\INF\Data\Store from factory.'); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * @param array $values key/value pairs to store |
| 70 | 70 | * @return |
| 71 | 71 | */ |
| 72 | - public function setValues($namespace, array $values){ |
|
| 72 | + public function setValues($namespace, array $values) { |
|
| 73 | 73 | $this->getStoreOrCreate($namespace)->setValues($values); |
| 74 | 74 | } |
| 75 | 75 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | * @param $values |
| 83 | 83 | * @return |
| 84 | 84 | */ |
| 85 | - public function addValues($namespace, array $values){ |
|
| 85 | + public function addValues($namespace, array $values) { |
|
| 86 | 86 | $this->getStoreOrCreate($namespace)->addValues($values); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * @param string $namespace the namspace to return values for |
| 94 | 94 | * @return array stored key/value pairs |
| 95 | 95 | */ |
| 96 | - public function getValues($namespace){ |
|
| 96 | + public function getValues($namespace) { |
|
| 97 | 97 | $this->getStoreOrCreate($namespace)->getValues(); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * @param string $key the key to return value for |
| 106 | 106 | * @return mixed value for the given key on the given namespace |
| 107 | 107 | */ |
| 108 | - public function getValue($namespace, $key){ |
|
| 108 | + public function getValue($namespace, $key) { |
|
| 109 | 109 | $this->getStoreOrCreate($namespace)->getValue($key); |
| 110 | 110 | } |
| 111 | 111 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * @param mixed $value the value to store |
| 119 | 119 | * @return |
| 120 | 120 | */ |
| 121 | - public function setValue($namespace, $key, $value){ |
|
| 121 | + public function setValue($namespace, $key, $value) { |
|
| 122 | 122 | $this->getStoreOrCreate($namespace)->setValues($values); |
| 123 | 123 | } |
| 124 | 124 | |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * @param string $key the key to look for a value |
| 131 | 131 | * @return |
| 132 | 132 | */ |
| 133 | - public function hasValue($namespace, $key){ |
|
| 133 | + public function hasValue($namespace, $key) { |
|
| 134 | 134 | $this->getStoreOrCreate($namespace)->hasValue($key); |
| 135 | 135 | } |
| 136 | 136 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * @param string $key the key to remove the value from |
| 143 | 143 | * @return |
| 144 | 144 | */ |
| 145 | - public function deleteValue($namespace, $key){ |
|
| 145 | + public function deleteValue($namespace, $key) { |
|
| 146 | 146 | $this->getStoreOrCreate($namespace)->setValues($values); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | * @param \PEIP\INF\Data\Store $store the store instance to register for the namespace |
| 155 | 155 | * @return |
| 156 | 156 | */ |
| 157 | - public function setStore($namespace, \PEIP\INF\Data\Store $store){ |
|
| 157 | + public function setStore($namespace, \PEIP\INF\Data\Store $store) { |
|
| 158 | 158 | $this->setInternalValue($namespace, $store); |
| 159 | 159 | } |
| 160 | 160 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @param string $namespace the namespace to return the store for |
| 166 | 166 | * @return \PEIP\INF\Data\Store store instance for given namespace (if set) |
| 167 | 167 | */ |
| 168 | - public function getStore($namespace){ |
|
| 168 | + public function getStore($namespace) { |
|
| 169 | 169 | $this->getInternalValue($namespace); |
| 170 | 170 | } |
| 171 | 171 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * @param string $namespace the namespace to check for a store instance |
| 177 | 177 | * @return boolean wether a store has been registered for the given namespace |
| 178 | 178 | */ |
| 179 | - public function hasStore($namespace){ |
|
| 179 | + public function hasStore($namespace) { |
|
| 180 | 180 | return $this->hasInternalValue($namespace); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | * @param string $namespace the namespace to ungegister the store for |
| 188 | 188 | * @return |
| 189 | 189 | */ |
| 190 | - public function deleteStore($namespace){ |
|
| 190 | + public function deleteStore($namespace) { |
|
| 191 | 191 | return $this->deleteInternalValue($namespace); |
| 192 | 192 | } |
| 193 | 193 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * @param mixed $offset the offset |
| 33 | 33 | * @return |
| 34 | 34 | */ |
| 35 | - public function offsetExists($offset){ |
|
| 35 | + public function offsetExists($offset) { |
|
| 36 | 36 | return array_key_exists($name, $this->values); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @param mixed $offset the offset |
| 44 | 44 | * @return |
| 45 | 45 | */ |
| 46 | - public function offsetGet($offset){ |
|
| 46 | + public function offsetGet($offset) { |
|
| 47 | 47 | return array_key_exists($name, $this->values) ? $this->values[$offset] : NULL; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * @param mixed $offset the offset |
| 55 | 55 | * @return |
| 56 | 56 | */ |
| 57 | - public function offsetUnset($offset){ |
|
| 57 | + public function offsetUnset($offset) { |
|
| 58 | 58 | unset($this->values[$offset]); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * @param mixed $value value for the offset |
| 67 | 67 | * @return |
| 68 | 68 | */ |
| 69 | - public function offsetSet($offset, $value){ |
|
| 69 | + public function offsetSet($offset, $value) { |
|
| 70 | 70 | $this->values[$offset] = $value; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * @param $offset |
| 33 | 33 | * @return |
| 34 | 34 | */ |
| 35 | - public function offsetExists($offset){ |
|
| 35 | + public function offsetExists($offset) { |
|
| 36 | 36 | return $this->hasParameter($offset); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @param $offset |
| 43 | 43 | * @return |
| 44 | 44 | */ |
| 45 | - public function offsetGet($offset){ |
|
| 45 | + public function offsetGet($offset) { |
|
| 46 | 46 | return $this->getParameter($offset); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @param $name |
| 53 | 53 | * @return |
| 54 | 54 | */ |
| 55 | - public function offsetUnset($name){ |
|
| 55 | + public function offsetUnset($name) { |
|
| 56 | 56 | $this->deleteParameter($name); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @param $name |
| 64 | 64 | * @return |
| 65 | 65 | */ |
| 66 | - public function offsetSet($offset, $name){ |
|
| 66 | + public function offsetSet($offset, $name) { |
|
| 67 | 67 | $this->setParameter($offeset, $name); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @param $factory |
| 36 | 36 | * @return |
| 37 | 37 | */ |
| 38 | - public function __construct(\PEIP\INF\Factory\DedicatedFactory $factory){ |
|
| 38 | + public function __construct(\PEIP\INF\Factory\DedicatedFactory $factory) { |
|
| 39 | 39 | $this->factory = $factory; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -45,12 +45,12 @@ discard block |
||
| 45 | 45 | * @param $namespace |
| 46 | 46 | * @return |
| 47 | 47 | */ |
| 48 | - protected function getParameterHolderOrCreate($namespace){ |
|
| 49 | - if(!$this->hasParameterHolder($namespace)){ |
|
| 48 | + protected function getParameterHolderOrCreate($namespace) { |
|
| 49 | + if (!$this->hasParameterHolder($namespace)) { |
|
| 50 | 50 | $store = $this->factory->build(); |
| 51 | - if($store instanceof \PEIP\INF\Data\ParameterHolder){ |
|
| 51 | + if ($store instanceof \PEIP\INF\Data\ParameterHolder) { |
|
| 52 | 52 | $this->stores[$namespace] = $store; |
| 53 | - }else{ |
|
| 53 | + }else { |
|
| 54 | 54 | throw new \Exception('Could not build Instance of \PEIP\INF\Data\ParameterHolder from factory.'); |
| 55 | 55 | } |
| 56 | 56 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * @param $value |
| 73 | 73 | * @return |
| 74 | 74 | */ |
| 75 | - public function setParameters($namespace, array $parameters){ |
|
| 75 | + public function setParameters($namespace, array $parameters) { |
|
| 76 | 76 | $this->getParameterHolderOrCreate($namespace)->setParameters($parameters); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * @param $parameters |
| 84 | 84 | * @return |
| 85 | 85 | */ |
| 86 | - public function addParameters($namespace, array $parameters){ |
|
| 86 | + public function addParameters($namespace, array $parameters) { |
|
| 87 | 87 | $this->getParameterHolderOrCreate($namespace)->addParameters($parameters); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @param $name |
| 101 | 101 | * @return |
| 102 | 102 | */ |
| 103 | - public function getParameters($namespace){ |
|
| 103 | + public function getParameters($namespace) { |
|
| 104 | 104 | $this->getParameterHolderOrCreate($namespace)->getParameters(); |
| 105 | 105 | } |
| 106 | 106 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * @param $name |
| 112 | 112 | * @return |
| 113 | 113 | */ |
| 114 | - public function getParameter($namespace, $name){ |
|
| 114 | + public function getParameter($namespace, $name) { |
|
| 115 | 115 | $this->getParameterHolderOrCreate($namespace)->getParameter($name); |
| 116 | 116 | } |
| 117 | 117 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | * @param $value |
| 124 | 124 | * @return |
| 125 | 125 | */ |
| 126 | - public function setParameter($namespace, $name, $value){ |
|
| 126 | + public function setParameter($namespace, $name, $value) { |
|
| 127 | 127 | $this->getParameterHolderOrCreate($namespace)->setParameters($parameters); |
| 128 | 128 | } |
| 129 | 129 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | * @param $name |
| 135 | 135 | * @return |
| 136 | 136 | */ |
| 137 | - public function hasParameter($namespace, $name){ |
|
| 137 | + public function hasParameter($namespace, $name) { |
|
| 138 | 138 | $this->getParameterHolderOrCreate($namespace)->hasParameter($name); |
| 139 | 139 | } |
| 140 | 140 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | * @param $name |
| 146 | 146 | * @return |
| 147 | 147 | */ |
| 148 | - public function deleteParameter($namespace, $name){ |
|
| 148 | + public function deleteParameter($namespace, $name) { |
|
| 149 | 149 | $this->getParameterHolderOrCreate($namespace)->setParameters($parameters); |
| 150 | 150 | } |
| 151 | 151 | |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | * @param $holder |
| 165 | 165 | * @return |
| 166 | 166 | */ |
| 167 | - public function setParameterHolder($namespace, \PEIP\INF\Data\ParameterHolder $holder){ |
|
| 167 | + public function setParameterHolder($namespace, \PEIP\INF\Data\ParameterHolder $holder) { |
|
| 168 | 168 | $this->stores[$namespace] = $holder; |
| 169 | 169 | } |
| 170 | 170 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | * @param $namespace |
| 182 | 182 | * @return |
| 183 | 183 | */ |
| 184 | - public function getParameterHolder($namespace){ |
|
| 184 | + public function getParameterHolder($namespace) { |
|
| 185 | 185 | return $this->stores[$namespace]; |
| 186 | 186 | } |
| 187 | 187 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * @param $namespace |
| 199 | 199 | * @return |
| 200 | 200 | */ |
| 201 | - public function hasParameterHolder($namespace){ |
|
| 201 | + public function hasParameterHolder($namespace) { |
|
| 202 | 202 | return array_key_exists($namespace, $this->stores); |
| 203 | 203 | } |
| 204 | 204 | |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | * @param $namespace |
| 216 | 216 | * @return |
| 217 | 217 | */ |
| 218 | - public function deleteParameterHolder($namespace){ |
|
| 218 | + public function deleteParameterHolder($namespace) { |
|
| 219 | 219 | unset($this->stores[$namespace]); |
| 220 | 220 | } |
| 221 | 221 | |
@@ -40,9 +40,9 @@ discard block |
||
| 40 | 40 | * @param \PEIP\INF\Context\Context $context context instance to register the plugin with |
| 41 | 41 | * @return |
| 42 | 42 | */ |
| 43 | - public function init(\PEIP\INF\Context\Context $context){ |
|
| 43 | + public function init(\PEIP\INF\Context\Context $context) { |
|
| 44 | 44 | $this->context = $context; |
| 45 | - foreach($this->builders as $node=>$method){ |
|
| 45 | + foreach ($this->builders as $node=>$method) { |
|
| 46 | 46 | $context->registerNodeBuilder($node, array($this, $method)); |
| 47 | 47 | } |
| 48 | 48 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @param string $defaultClass class to create instance for if none is set in config |
| 60 | 60 | * @return object build and modified srvice instance |
| 61 | 61 | */ |
| 62 | - public function buildAndModify($config, $arguments, $defaultClass = false){ |
|
| 62 | + public function buildAndModify($config, $arguments, $defaultClass = false) { |
|
| 63 | 63 | return ServiceFactory::buildAndModify($config, $arguments, $defaultClass); |
| 64 | 64 | } |
| 65 | 65 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | abstract class SubscribableChannel |
| 31 | 31 | extends \PEIP\ABS\Channel\Channel |
| 32 | - implements \PEIP\INF\Channel\SubscribableChannel{ |
|
| 32 | + implements \PEIP\INF\Channel\SubscribableChannel { |
|
| 33 | 33 | |
| 34 | 34 | protected $messageDispatcher; |
| 35 | 35 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * @param Callable|PEIP\INF\Handler\Handler $handler the listener to subscribe |
| 42 | 42 | * @return |
| 43 | 43 | */ |
| 44 | - public function subscribe($handler){ |
|
| 44 | + public function subscribe($handler) { |
|
| 45 | 45 | Test::ensureHandler($handler); |
| 46 | 46 | $this->getMessageDispatcher()->connect($handler); |
| 47 | 47 | $this->doFireEvent('subscribe', array('SUBSCRIBER'=>$handler)); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * @param Callable|PEIP\INF\Handler\Handler $handler the listener to unsubscribe |
| 56 | 56 | * @return |
| 57 | 57 | */ |
| 58 | - public function unsubscribe($handler){ |
|
| 58 | + public function unsubscribe($handler) { |
|
| 59 | 59 | Test::ensureHandler($handler); |
| 60 | 60 | $this->getMessageDispatcher()->disconnect($handler); |
| 61 | 61 | $this->doFireEvent('unsubscribe', array('SUBSCRIBER'=>$handler)); |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | * @param boolean $transferListeners wether to transfer listeners of old dispatcher (if set) to new one. default: true |
| 70 | 70 | * @return |
| 71 | 71 | */ |
| 72 | - public function setMessageDispatcher(\PEIP\INF\Dispatcher\Dispatcher $dispatcher, $transferListeners = true){ |
|
| 73 | - if(isset($this->dispatcher) && $transferListeners){ |
|
| 74 | - foreach($this->dispatcher->getListeners() as $listener){ |
|
| 72 | + public function setMessageDispatcher(\PEIP\INF\Dispatcher\Dispatcher $dispatcher, $transferListeners = true) { |
|
| 73 | + if (isset($this->dispatcher) && $transferListeners) { |
|
| 74 | + foreach ($this->dispatcher->getListeners() as $listener) { |
|
| 75 | 75 | $dispatcher->connect($listener); |
| 76 | 76 | $this->dispatcher->disconnect($listener); |
| 77 | 77 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * @access public |
| 86 | 86 | * @return |
| 87 | 87 | */ |
| 88 | - public function getMessageDispatcher(){ |
|
| 88 | + public function getMessageDispatcher() { |
|
| 89 | 89 | return isset($this->dispatcher) ? $this->dispatcher : $this->dispatcher = new Dispatcher; |
| 90 | 90 | } |
| 91 | 91 | |