Passed
Push — main ( b967d0...137e5a )
by Sammy
07:06
created
tests/ElementTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         foreach ($this->tags as $tag) {
51 51
             $e = new Element($tag);
52 52
             if ($e->isVoid()) {
53
-                $this->assertEquals('<' . $tag . '/>', $e->__toString());
53
+                $this->assertEquals('<'.$tag.'/>', $e->__toString());
54 54
             } else {
55 55
                 $this->assertEquals(sprintf('<%s></%s>', $tag, $tag), $e->__toString());
56 56
             }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 $e = new Element($tag, $message);
71 71
 
72 72
                 if ($e->isVoid()) {
73
-                    $this->assertEquals('<' . $tag . '/>', $e->__toString());
73
+                    $this->assertEquals('<'.$tag.'/>', $e->__toString());
74 74
                 } else {
75 75
                     $this->assertEquals(sprintf('<%s>%s</%s>', $tag, $expected, $tag), $e->__toString());
76 76
                 }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         $this->assertForAllHTMLTags($message, $attributes, $attributes_expected_string);
120 120
 
121 121
 
122
-        $attributes = ['class' => 'test_class', 'style="color:red;"','id' => 'test_id'];
122
+        $attributes = ['class' => 'test_class', 'style="color:red;"', 'id' => 'test_id'];
123 123
         $attributes_expected_string = ' class="test_class" style="color:red;" id="test_id"';
124 124
 
125 125
         // testing attributes string generator
Please login to merge, or discard this patch.
src/Marker.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /**
4
-  * HTML generator
5
-  * Marker, hommage to Christian François Bouche-Villeneuve aka Chris Marker
6
-  */
4
+ * HTML generator
5
+ * Marker, hommage to Christian François Bouche-Villeneuve aka Chris Marker
6
+ */
7 7
 
8 8
 declare(strict_types=1);
9 9
 
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
 class Marker extends Element
13 13
 {
14 14
     /**
15
-      * ? makes more sense to write
16
-      * Marker::img('path/to/img.jpg', 'An alternative text', ['width' => 34, 'height' => 34])
17
-      * than
18
-      * Marker::img(null, ['src' => 'path/to/img.jpg', 'alt' => 'An alternative text', 'width' => 34, 'height' => 34])
19
-      */
15
+     * ? makes more sense to write
16
+     * Marker::img('path/to/img.jpg', 'An alternative text', ['width' => 34, 'height' => 34])
17
+     * than
18
+     * Marker::img(null, ['src' => 'path/to/img.jpg', 'alt' => 'An alternative text', 'width' => 34, 'height' => 34])
19
+     */
20 20
     public static function img(string $src, string $alt, array $attributes = []): Element
21 21
     {
22 22
         $attributes['src'] ??= $src;
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
     }
28 28
 
29 29
     /**
30
-      * ? makes more sense to write
31
-      * Marker::a('controller/task/id', 'Click here', ['class' => 'nav'])
32
-      * than
33
-      * Marker::a('Click here', ['href' => controller/task/id', 'class' => 'nav'])
34
-      */
30
+     * ? makes more sense to write
31
+     * Marker::a('controller/task/id', 'Click here', ['class' => 'nav'])
32
+     * than
33
+     * Marker::a('Click here', ['href' => controller/task/id', 'class' => 'nav'])
34
+     */
35 35
     public static function a(string $href, string $label, array $attributes = []): Element
36 36
     {
37 37
         $attributes['href'] ??= $href;
Please login to merge, or discard this patch.
src/Element.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         $this->content = $content;
79 79
 
80 80
         foreach ($attributes as $name => $value) {
81
-            if(is_int($name)) {
81
+            if (is_int($name)) {
82 82
                 $name = $value;
83 83
             }
84 84
 
Please login to merge, or discard this patch.