@@ -1,9 +1,9 @@ discard block |
||
| 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 | |
@@ -18,11 +18,11 @@ discard block |
||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | - * ? makes more sense to write |
|
| 22 | - * Marker::img('path/to/img.jpg', 'An alternative text', ['width' => 34, 'height' => 34]) |
|
| 23 | - * than |
|
| 24 | - * Marker::img(null, ['src' => 'path/to/img.jpg', 'alt' => 'An alternative text', 'width' => 34, 'height' => 34]) |
|
| 25 | - */ |
|
| 21 | + * ? makes more sense to write |
|
| 22 | + * Marker::img('path/to/img.jpg', 'An alternative text', ['width' => 34, 'height' => 34]) |
|
| 23 | + * than |
|
| 24 | + * Marker::img(null, ['src' => 'path/to/img.jpg', 'alt' => 'An alternative text', 'width' => 34, 'height' => 34]) |
|
| 25 | + */ |
|
| 26 | 26 | public static function img(string $src, string $alt, array $attributes = []): Element |
| 27 | 27 | { |
| 28 | 28 | $attributes['src'] ??= $src; |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * ? makes more sense to write |
|
| 37 | - * Marker::a('controller/task/id', 'Click here', ['class' => 'nav']) |
|
| 38 | - * than |
|
| 39 | - * Marker::a('Click here', ['href' => controller/task/id', 'class' => 'nav']) |
|
| 40 | - */ |
|
| 36 | + * ? makes more sense to write |
|
| 37 | + * Marker::a('controller/task/id', 'Click here', ['class' => 'nav']) |
|
| 38 | + * than |
|
| 39 | + * Marker::a('Click here', ['href' => controller/task/id', 'class' => 'nav']) |
|
| 40 | + */ |
|
| 41 | 41 | public static function a(string $href, string $label, array $attributes = []): Element |
| 42 | 42 | { |
| 43 | 43 | $attributes['href'] ??= $href; |