diff --git a/Dom/Document.php b/Dom/Document.php index fc7be37..cb5c2a3 100755 --- a/Dom/Document.php +++ b/Dom/Document.php @@ -124,7 +124,7 @@ public function createPrepend(string $element, ?string $value = null, ?string $b { $inst = new Element($element, $value); if (is_null($this->elements)) { - $this->elements = array(); + $this->elements = []; } if (!is_null($bind)) { //$new[$bind] = $inst; @@ -183,7 +183,7 @@ public function execute(?callable $call = null): string } return $this->html; } - + /** * Build document * @param array $arr elements diff --git a/Dom/Element.php b/Dom/Element.php index d88c382..cdcf015 100755 --- a/Dom/Element.php +++ b/Dom/Element.php @@ -16,7 +16,7 @@ class Element extends Document implements ElementInterface { private $elem; - private $attr = array(); + private $attr = []; private $snippet; private $value; private $hideEmptyTag = false; diff --git a/Interfaces/DocumentInterface.php b/Interfaces/DocumentInterface.php index e8809d3..5a5eac5 100755 --- a/Interfaces/DocumentInterface.php +++ b/Interfaces/DocumentInterface.php @@ -40,12 +40,12 @@ public function bindTag(string $tag, string $key, bool $prepend = false): Elemen */ public function create($element, $value = null, ?string $bind = null): ElementInterface; - /** - * Prepend element first - * @param string $element HTML tag (without brackets) - * @param string $value add value to tag - * @return ElementInterface - */ + /** + * Prepend element first + * @param string $element HTML tag (without brackets) + * @param string $value add value to tag + * @return ElementInterface + */ public function createPrepend(string $element, ?string $value = null, ?string $bind = null): ElementInterface; /** diff --git a/README.md b/README.md index a276e3a..5ae5fdf 100755 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ $swift->setPartial("article", [ ] ] ]); -// Keep in mind that the data usally comes from the database and that it should/might be called from you controller. +// Keep in mind that the data usually comes from the database and that it should/might be called from you controller. // E.g. $swift->setPartial("article", $mysqli->fetch_objects()); ``` @@ -55,7 +55,7 @@ $swift->setPartial("article", [ #### Index -The file **/resources/index.php** has already been binded under the initialisation section above **$swift->setIndex("index")**. The file looks like this: +The file **/resources/index.php** has already been bounded under the initialisation section above **$swift->setIndex("index")**. The file looks like this: ```html @@ -63,7 +63,8 @@ The file **/resources/index.php** has already been binded under the initialisati - + execute(); ?> @@ -76,7 +77,7 @@ The file **/resources/index.php** has already been binded under the initialisati ``` #### View -The file **/resources/views/main.php** has already been binded under the initialisation section above **$swift->setView("main")**. The file looks like this: +The file **/resources/views/main.php** has already been bounded under the initialisation section above **$swift->setView("main")**. The file looks like this: ```html
@@ -85,20 +86,20 @@ The file **/resources/views/main.php** has already been binded under the initial ``` #### Partial -The file **/resources/partials/article.php** has already been binded under the initialisation section above **$swift->setPartial("article", ...)**. The file looks like this: +The file **/resources/partials/article.php** has already been bounded under the initialisation section above **$swift->setPartial("article", ...)**. The file looks like this: ```html
-

name; ?>

-
date("DateTime")->format("Y/m/d"); ?>
-

content("Str")->excerpt(20)->get(); ?>

+

+
clockFormat("Y/m/d"); ?>
+

stExcerpt(20); ?>

- feed()->count() > 0): ?> + count() > 0): ?>