Completed
Push — master ( be8c5d...b94655 )
by Adrian
02:54
created
src/Tag.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function setProps($props)
129 129
     {
130
-        if ( ! is_array($props) && ! ($props instanceof \Traversable)) {
130
+        if (!is_array($props) && !($props instanceof \Traversable)) {
131 131
             return $this;
132 132
         }
133 133
         foreach ($props as $name => $value) {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function addClass($class)
220 220
     {
221
-        if ( ! $this->hasClass($class)) {
221
+        if (!$this->hasClass($class)) {
222 222
             $this->set('class', trim((string) $this->get('class') . ' ' . $class));
223 223
         }
224 224
 
@@ -282,11 +282,11 @@  discard block
 block discarded – undo
282 282
      */
283 283
     public function setContent($content)
284 284
     {
285
-        if ( ! $content) {
285
+        if (!$content) {
286 286
             return $this;
287 287
         }
288
-        if ( ! is_array($content)) {
289
-            $content = array( $content );
288
+        if (!is_array($content)) {
289
+            $content = array($content);
290 290
         }
291 291
         $this->clearContent();
292 292
         foreach ($content as $child) {
@@ -326,15 +326,15 @@  discard block
 block discarded – undo
326 326
     protected function addChild($tagTextOrArray)
327 327
     {
328 328
         // a list of arguments to be passed to builder->make()
329
-        if (is_array($tagTextOrArray) && ! empty($tagTextOrArray)) {
329
+        if (is_array($tagTextOrArray) && !empty($tagTextOrArray)) {
330 330
 
331
-            if ( ! isset($this->builder)) {
331
+            if (!isset($this->builder)) {
332 332
                 throw new \InvalidArgumentException(sprintf('Builder not attached to tag `%s`', $this->tag));
333 333
             }
334 334
 
335 335
             $tagName        = $tagTextOrArray[0];
336
-            $props          = isset($tagTextOrArray[1]) ? $tagTextOrArray[1] : [ ];
337
-            $content        = isset($tagTextOrArray[2]) ? $tagTextOrArray[2] : [ ];
336
+            $props          = isset($tagTextOrArray[1]) ? $tagTextOrArray[1] : [];
337
+            $content        = isset($tagTextOrArray[2]) ? $tagTextOrArray[2] : [];
338 338
             $tagTextOrArray = $this->builder->make($tagName, $props, $content);
339 339
         }
340 340
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         }
384 384
 
385 385
         // Don't bother if there are no specialchars - saves some processing
386
-        if ( ! preg_match('/[&<>"\']/', $attr)) {
386
+        if (!preg_match('/[&<>"\']/', $attr)) {
387 387
             return $attr;
388 388
         }
389 389
 
@@ -398,9 +398,9 @@  discard block
 block discarded – undo
398 398
     public function render()
399 399
     {
400 400
         if ($this->isSelfClosing) {
401
-            $element = "<{$this->tag}".$this->getAttributesString()." />";
401
+            $element = "<{$this->tag}" . $this->getAttributesString() . " />";
402 402
         } else {
403
-            $element = "<{$this->tag}".$this->getAttributesString().">".$this->getInnerHtml()."</{$this->tag}>";
403
+            $element = "<{$this->tag}" . $this->getAttributesString() . ">" . $this->getInnerHtml() . "</{$this->tag}>";
404 404
         }
405 405
         $before = !empty($this->before) ? implode(PHP_EOL, $this->before) : '';
406 406
         $after  = !empty($this->after) ? implode(PHP_EOL, $this->after) : '';
Please login to merge, or discard this patch.