@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\VirtualDom; |
| 5 | 5 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\Comment; |
| 5 | 5 | |
| 6 | 6 | use Teein\Html\Ast\Comment; |
| 7 | 7 | |
| 8 | -function comment (string $comment) : Comment |
|
| 8 | +function comment(string $comment) : Comment |
|
| 9 | 9 | { |
| 10 | 10 | return new Comment($comment); |
| 11 | 11 | } |
@@ -450,14 +450,14 @@ discard block |
||
| 450 | 450 | /** |
| 451 | 451 | * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemid |
| 452 | 452 | */ |
| 453 | - function itemid (string $value) : Attribute |
|
| 453 | + function itemid (string $value) : Attribute |
|
| 454 | 454 | { |
| 455 | 455 | return new Attribute('itemid', $value); |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | - /** |
|
| 459 | - * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemid |
|
| 460 | - */ |
|
| 458 | + /** |
|
| 459 | + * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemid |
|
| 460 | + */ |
|
| 461 | 461 | function itemprop (string $value) : Attribute |
| 462 | 462 | { |
| 463 | 463 | return new Attribute('itemprop', $value); |
@@ -471,9 +471,9 @@ discard block |
||
| 471 | 471 | return new Attribute('itemref', $value); |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | - /** |
|
| 475 | - * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemscope |
|
| 476 | - */ |
|
| 474 | + /** |
|
| 475 | + * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemscope |
|
| 476 | + */ |
|
| 477 | 477 | function itemscope (string $value) : Attribute |
| 478 | 478 | { |
| 479 | 479 | return new Attribute('itemscope', $value); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\Attributes; |
| 5 | 5 | |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | /** |
| 451 | 451 | * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemid |
| 452 | 452 | */ |
| 453 | - function itemid (string $value) : Attribute |
|
| 453 | + function itemid(string $value) : Attribute |
|
| 454 | 454 | { |
| 455 | 455 | return new Attribute('itemid', $value); |
| 456 | 456 | } |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | /** |
| 459 | 459 | * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemid |
| 460 | 460 | */ |
| 461 | -function itemprop (string $value) : Attribute |
|
| 461 | +function itemprop(string $value) : Attribute |
|
| 462 | 462 | { |
| 463 | 463 | return new Attribute('itemprop', $value); |
| 464 | 464 | } |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | /** |
| 467 | 467 | * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemref |
| 468 | 468 | */ |
| 469 | -function itemref (string $value) : Attribute |
|
| 469 | +function itemref(string $value) : Attribute |
|
| 470 | 470 | { |
| 471 | 471 | return new Attribute('itemref', $value); |
| 472 | 472 | } |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | /** |
| 475 | 475 | * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemscope |
| 476 | 476 | */ |
| 477 | -function itemscope (string $value) : Attribute |
|
| 477 | +function itemscope(string $value) : Attribute |
|
| 478 | 478 | { |
| 479 | 479 | return new Attribute('itemscope', $value); |
| 480 | 480 | } |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | /** |
| 483 | 483 | * @link https://html.spec.whatwg.org/multipage/microdata.html#attr-itemtype |
| 484 | 484 | */ |
| 485 | -function itemtype (string $value) : Attribute |
|
| 485 | +function itemtype(string $value) : Attribute |
|
| 486 | 486 | { |
| 487 | 487 | return new Attribute('itemtype', $value); |
| 488 | 488 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\Elements; |
| 5 | 5 | |
@@ -7,10 +7,10 @@ discard block |
||
| 7 | 7 | use Teein\Html\VirtualDom\Attribute; |
| 8 | 8 | use Teein\Html\VirtualDom\Node; |
| 9 | 9 | |
| 10 | -function custom (string $localName) : callable |
|
| 10 | +function custom(string $localName) : callable |
|
| 11 | 11 | { |
| 12 | - return function (Attribute ...$attributes) use ($localName) : callable { |
|
| 13 | - return function (Node ...$childNodes) use ($localName, $attributes) : NormalElement { |
|
| 12 | + return function(Attribute ...$attributes) use ($localName) : callable { |
|
| 13 | + return function(Node ...$childNodes) use ($localName, $attributes) : NormalElement { |
|
| 14 | 14 | return new NormalElement($localName, $attributes, $childNodes); |
| 15 | 15 | }; |
| 16 | 16 | }; |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\Attributes; |
| 5 | 5 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\Text; |
| 5 | 5 | |
| 6 | 6 | use Teein\Html\Ast\Text; |
| 7 | 7 | |
| 8 | -function text (string $value) : Text |
|
| 8 | +function text(string $value) : Text |
|
| 9 | 9 | { |
| 10 | 10 | return new Text($value); |
| 11 | 11 | } |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\Document; |
| 5 | 5 | |
| 6 | 6 | use Teein\Html\Ast\Document; |
| 7 | 7 | use Teein\Html\VirtualDom\Element; |
| 8 | 8 | |
| 9 | -function document (Element $root) : Document |
|
| 9 | +function document(Element $root) : Document |
|
| 10 | 10 | { |
| 11 | 11 | return new Document($root); |
| 12 | 12 | } |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\Beautifier; |
| 5 | 5 | |
| 6 | 6 | interface Beautifier |
| 7 | 7 | { |
| 8 | - public function beautify (int $level = 0) : Beautifier; |
|
| 8 | + public function beautify(int $level = 0) : Beautifier; |
|
| 9 | 9 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Teein\Html\Ast; |
| 5 | 5 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | /** |
| 39 | 39 | * Get the html-representation of this document. |
| 40 | 40 | */ |
| 41 | - public function toHtml () : string |
|
| 41 | + public function toHtml() : string |
|
| 42 | 42 | { |
| 43 | 43 | return "<!DOCTYPE html>" . ($this->beautified ? "\n" : "") . $this->root->toHtml(); |
| 44 | 44 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * |
| 58 | 58 | * @param int $level The current level of indentation. This should always be 0. |
| 59 | 59 | */ |
| 60 | - public function beautify (int $level = 0) : Beautifier |
|
| 60 | + public function beautify(int $level = 0) : Beautifier |
|
| 61 | 61 | { |
| 62 | 62 | return new Document($this->root->beautify(), true); |
| 63 | 63 | } |