@@ -49,7 +49,7 @@ |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | $state = $event->getState(); |
| 52 | - $state->setResolver(function ($property) use ($options, $state) { |
|
| 52 | + $state->setResolver(function($property) use ($options, $state) { |
|
| 53 | 53 | if (isset($options[$this::SNIPPETS][$property])) { |
| 54 | 54 | return $this->viewTemplates->resolve($state->format($options[$this::SNIPPETS][$property])); |
| 55 | 55 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $state = $event->getState(); |
| 36 | 36 | |
| 37 | 37 | // resolve node properties |
| 38 | - $state->setResolver(function ($property) use ($event) { |
|
| 38 | + $state->setResolver(function($property) use ($event) { |
|
| 39 | 39 | if ('_' !== $property[0]) { |
| 40 | 40 | return; |
| 41 | 41 | } |
@@ -79,14 +79,14 @@ discard block |
||
| 79 | 79 | // TODO concept |
| 80 | 80 | |
| 81 | 81 | // resolve custom properties |
| 82 | - $state->setResolver(function ($property) use ($specs, $props, $state) { |
|
| 82 | + $state->setResolver(function($property) use ($specs, $props, $state) { |
|
| 83 | 83 | if (!isset($props[$property])) { |
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | $spec = $specs[$props[$property]]; |
| 88 | 88 | |
| 89 | - $args = array_map(function ($arg) use ($state) { |
|
| 89 | + $args = array_map(function($arg) use ($state) { |
|
| 90 | 90 | return $state->format($arg); |
| 91 | 91 | }, $spec['args']); |
| 92 | 92 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $events->trigger($eventName, $event); |
| 179 | 179 | } else { |
| 180 | 180 | // TODO name resolver |
| 181 | - $events->trigger('render.component.' . $eventName, $event); |
|
| 181 | + $events->trigger('render.component.'.$eventName, $event); |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | ); |
| 51 | 51 | |
| 52 | 52 | // TODO constant |
| 53 | - $config[$index] = 'file://' . $path[0]; |
|
| 53 | + $config[$index] = 'file://'.$path[0]; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | return [$this::VIEW => [$this::TEMPLATES => $config]]; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | parent::__construct([[$this::VIEW => [$this::COMMON => $spec]]]); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - private function createSpec(array $config, &$spec= []) |
|
| 31 | + private function createSpec(array $config, &$spec = []) |
|
| 32 | 32 | { |
| 33 | 33 | foreach ($config as $feature) { |
| 34 | 34 | |
@@ -35,6 +35,6 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function __toString() |
| 37 | 37 | { |
| 38 | - return (new Html\Text($this->label)) . parent::__toString(); |
|
| 38 | + return (new Html\Text($this->label)).parent::__toString(); |
|
| 39 | 39 | } |
| 40 | 40 | } |
@@ -12,6 +12,6 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public static function create() |
| 14 | 14 | { |
| 15 | - return 'ZendMail_' . microtime(true) . '.eml'; |
|
| 15 | + return 'ZendMail_'.microtime(true).'.eml'; |
|
| 16 | 16 | } |
| 17 | 17 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | public function getQueue() |
| 73 | 73 | { |
| 74 | 74 | if (null === $this->queue) { |
| 75 | - $queue = new PriorityQueue;; |
|
| 75 | + $queue = new PriorityQueue; ; |
|
| 76 | 76 | foreach ($this->toArray() as $name => $item) { |
| 77 | 77 | $spec = new Config\Spec($item, $name); |
| 78 | 78 | $queue->insert($spec, $spec->getPriority()); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | public function locate($locator) |
| 40 | 40 | { |
| 41 | 41 | $nodes = []; |
| 42 | - $this->each(function (Element $node) use ($locator, &$nodes) { |
|
| 42 | + $this->each(function(Element $node) use ($locator, &$nodes) { |
|
| 43 | 43 | foreach ($node->locate($locator) as $subNode) { |
| 44 | 44 | $nodes[] = $subNode; |
| 45 | 45 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | public function setValue($value, callable $callback = null) |
| 88 | 88 | { |
| 89 | 89 | $isCallable = is_callable($callback); |
| 90 | - $this->each(function (Element $node) use ($value, $callback, $isCallable) { |
|
| 90 | + $this->each(function(Element $node) use ($value, $callback, $isCallable) { |
|
| 91 | 91 | $nodeValue = $isCallable ? call_user_func($callback, $value, $node) : $value; |
| 92 | 92 | if (!empty($nodeValue)) { |
| 93 | 93 | $node->setValue($nodeValue); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | public function setAttributes(array $attributes, callable $callback = null) |
| 106 | 106 | { |
| 107 | 107 | $isCallable = is_callable($callback); |
| 108 | - $this->each(function (Element $node) use ($attributes, $callback, $isCallable) { |
|
| 108 | + $this->each(function(Element $node) use ($attributes, $callback, $isCallable) { |
|
| 109 | 109 | foreach ($attributes as $name => $value) { |
| 110 | 110 | |
| 111 | 111 | $attribute = $isCallable ? call_user_func($callback, $name, $value, $node) : $value; |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | public function setHtml($html, callable $callback = null) |
| 141 | 141 | { |
| 142 | 142 | $isCallable = is_callable($callback); |
| 143 | - $this->each(function (Element $node) use ($html, $callback, $isCallable) { |
|
| 143 | + $this->each(function(Element $node) use ($html, $callback, $isCallable) { |
|
| 144 | 144 | $nodeHtml = $isCallable ? call_user_func($callback, $html, $node) : $html; |
| 145 | 145 | if (!empty($nodeHtml)) { |
| 146 | 146 | $node->setHtml($nodeHtml); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | public function getInnerHtml() |
| 159 | 159 | { |
| 160 | 160 | $html = ''; |
| 161 | - $this->each(function (Element $node) use (&$html) { |
|
| 161 | + $this->each(function(Element $node) use (&$html) { |
|
| 162 | 162 | $html .= $node->getInnerHtml(); |
| 163 | 163 | }); |
| 164 | 164 | return $html; |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | public function getOuterHtml() |
| 173 | 173 | { |
| 174 | 174 | $html = ''; |
| 175 | - $this->each(function (Element $node) use (&$html) { |
|
| 175 | + $this->each(function(Element $node) use (&$html) { |
|
| 176 | 176 | $html .= $node->getOuterHtml(); |
| 177 | 177 | }); |
| 178 | 178 | return $html; |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | { |
| 200 | 200 | $nodes = []; |
| 201 | 201 | |
| 202 | - $this->each(function (Element $node) use ($children, &$nodes) { |
|
| 202 | + $this->each(function(Element $node) use ($children, &$nodes) { |
|
| 203 | 203 | foreach ($children as $child) { |
| 204 | 204 | $nodes[] = $node->appendChild($child); |
| 205 | 205 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | { |
| 217 | 217 | $nodes = []; |
| 218 | 218 | |
| 219 | - $this->each(function (Element $node) use ($children, &$nodes) { |
|
| 219 | + $this->each(function(Element $node) use ($children, &$nodes) { |
|
| 220 | 220 | foreach ($children as $child) { |
| 221 | 221 | // TODO insert before |
| 222 | 222 | $nodes[] = $node->parentNode->appendChild(clone $child); |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | */ |
| 232 | 232 | public function rename($nodeName) |
| 233 | 233 | { |
| 234 | - $this->each(function (Element $node) use ($nodeName) { |
|
| 234 | + $this->each(function(Element $node) use ($nodeName) { |
|
| 235 | 235 | $node->rename($nodeName); |
| 236 | 236 | }); |
| 237 | 237 | return $this; |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | */ |
| 243 | 243 | public function remove() |
| 244 | 244 | { |
| 245 | - $this->each(function (Element $node) { |
|
| 245 | + $this->each(function(Element $node) { |
|
| 246 | 246 | $node->parentNode->removeChild($node); |
| 247 | 247 | }); |
| 248 | 248 | return $this; |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | public function show() |
| 265 | 265 | { |
| 266 | 266 | $result = ''; |
| 267 | - $this->each(function (Element $node) use (&$result) { |
|
| 267 | + $this->each(function(Element $node) use (&$result) { |
|
| 268 | 268 | $result .= $node->ownerDocument->saveXML($node); |
| 269 | 269 | }); |
| 270 | 270 | return $result; |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public function setNodes($nodes) |
| 39 | 39 | { |
| 40 | 40 | if ($nodes instanceof IteratorIterator) { |
| 41 | - $this->nodes = $nodes; |
|
| 41 | + $this->nodes = $nodes; |
|
| 42 | 42 | return $this; |
| 43 | 43 | } |
| 44 | 44 | |