diff --git a/composer.json b/composer.json
index fe240fb..720b774 100644
--- a/composer.json
+++ b/composer.json
@@ -1,21 +1,26 @@
{
- "name": "arcanedev/php-html",
+ "name": "arcanedev/php-html",
"description": "A simple way to create html tags with php.",
- "homepage": "https://github.com/ARCANEDEV/php-html",
- "keywords": ["arcanedev", "html", "form", "tags"],
- "authors": [
+ "homepage": "https://github.com/ARCANEDEV/php-html",
+ "keywords": [
+ "arcanedev",
+ "html",
+ "form",
+ "tags"
+ ],
+ "authors": [
{
- "name": "ARCANEDEV",
- "email": "arcanedev.maroc@gmail.com",
+ "name": "ARCANEDEV",
+ "email": "arcanedev.maroc@gmail.com",
"homepage": "https://github.com/arcanedev-maroc",
- "role": "Developer"
+ "role": "Developer"
}
],
- "type": "library",
+ "type": "library",
"license": "MIT",
"require": {
"php": "^8.2",
- "illuminate/support": "^11.0"
+ "illuminate/support": "^11.0|^12.0"
},
"require-dev": {
"ext-dom": "*",
diff --git a/src/Contracts/Html.php b/src/Contracts/Html.php
index 6e8518f..f6f2291 100644
--- a/src/Contracts/Html.php
+++ b/src/Contracts/Html.php
@@ -144,7 +144,7 @@ public function number(
mixed $value = null,
mixed $min = null,
mixed $max = null,
- mixed $step = null
+ mixed $step = null,
): Input;
/**
@@ -175,7 +175,7 @@ public function range(
mixed $value = null,
mixed $min = null,
mixed $max = null,
- mixed $step = null
+ mixed $step = null,
): Input;
/**
diff --git a/src/Elements/Concerns/HasAttributes.php b/src/Elements/Concerns/HasAttributes.php
index ad197d7..2f5f28b 100644
--- a/src/Elements/Concerns/HasAttributes.php
+++ b/src/Elements/Concerns/HasAttributes.php
@@ -97,7 +97,7 @@ public function forgetAttribute(string $name): static
/**
* Get an attribute.
*
- * @return \Arcanedev\Html\Entities\Attributes\MiscAttribute|mixed
+ * @return Attributes\MiscAttribute|mixed
*/
public function getAttribute(string $name, mixed $default = null): mixed
{
diff --git a/src/Elements/Concerns/HasChildElements.php b/src/Elements/Concerns/HasChildElements.php
index 2efdf0f..3be75e9 100644
--- a/src/Elements/Concerns/HasChildElements.php
+++ b/src/Elements/Concerns/HasChildElements.php
@@ -88,7 +88,7 @@ public function addChild(mixed $child, Closure|array|null $mapper = null): stati
return tap(clone $this, function (HtmlElement $elt) use ($child, $mapper): void {
$elt->setChildren(
- $elt->getChildren()->merge(ChildrenCollection::parse($child, $mapper))
+ $elt->getChildren()->merge(ChildrenCollection::parse($child, $mapper)),
);
});
}
diff --git a/src/Elements/Dl.php b/src/Elements/Dl.php
index 5487a88..91f1fe8 100644
--- a/src/Elements/Dl.php
+++ b/src/Elements/Dl.php
@@ -33,7 +33,7 @@ class Dl extends HtmlElement
public function dt(mixed $value, array $attributes = []): static
{
return $this->addChild(
- $this->makeTerm($value, $attributes)
+ $this->makeTerm($value, $attributes),
);
}
@@ -45,7 +45,7 @@ public function dt(mixed $value, array $attributes = []): static
public function dd(mixed $value, array $attributes = []): static
{
return $this->addChild(
- $this->makeDefinition($value, $attributes)
+ $this->makeDefinition($value, $attributes),
);
}
diff --git a/src/Elements/Fieldset.php b/src/Elements/Fieldset.php
index b336e6b..d0ac6b1 100644
--- a/src/Elements/Fieldset.php
+++ b/src/Elements/Fieldset.php
@@ -40,7 +40,7 @@ class Fieldset extends HtmlElement
public function legend(mixed $content): static
{
return $this->prependChild(
- Legend::make()->text($content)
+ Legend::make()->text($content),
);
}
}
diff --git a/src/Elements/HtmlElement.php b/src/Elements/HtmlElement.php
index 2870e1f..23d6a48 100644
--- a/src/Elements/HtmlElement.php
+++ b/src/Elements/HtmlElement.php
@@ -167,7 +167,7 @@ public function style(array|string $style): static
$style = implode('; ', array_map(
fn($value, $attribute) => "{$attribute}: {$value}",
$style,
- array_keys($style)
+ array_keys($style),
));
}
@@ -183,7 +183,7 @@ public function data(array|string $name, mixed $value = null): static
{
return $this->attributes(
Collection::make(is_array($name) ? $name : [$name => $value])
- ->mapWithKeys(fn($mapValue, $mapKey) => ["data-{$mapKey}" => $mapValue])
+ ->mapWithKeys(fn($mapValue, $mapKey) => ["data-{$mapKey}" => $mapValue]),
);
}
@@ -223,7 +223,7 @@ public function open(): HtmlString
: "<{$this->getTag()}>";
return new HtmlString(
- $html . $this->getChildren()->toHtml()
+ $html . $this->getChildren()->toHtml(),
);
}
@@ -233,7 +233,7 @@ public function open(): HtmlString
public function close(): HtmlString
{
return new HtmlString(
- $this->isVoidElement() ? '' : "{$this->getTag()}>"
+ $this->isVoidElement() ? '' : "{$this->getTag()}>",
);
}
diff --git a/src/Elements/ListElement.php b/src/Elements/ListElement.php
index c79fa68..252c035 100644
--- a/src/Elements/ListElement.php
+++ b/src/Elements/ListElement.php
@@ -43,7 +43,7 @@ public function items(iterable $items, array $attributes = []): static
{
return $this->children($items, fn($value) => $this->makeItem(
is_array($value) ? static::make()->items($value) : $value, // Create nested items if the value is array
- $attributes
+ $attributes,
));
}
}
diff --git a/src/Elements/Select.php b/src/Elements/Select.php
index efb1bab..f8443e6 100644
--- a/src/Elements/Select.php
+++ b/src/Elements/Select.php
@@ -59,7 +59,7 @@ public function multiple(): static
return $elt->if(
$name && ! Str::endsWith($name->value(), '[]'),
- fn(self $elt) => $elt->name($name->value() . '[]')
+ fn(self $elt) => $elt->name($name->value() . '[]'),
)->applyValueToOptions();
}
@@ -74,7 +74,7 @@ public function options(iterable $options, array $attributes = [], array $groupA
$options,
fn($text, $value) => is_array($text) || $text instanceof Collection
? $this->makeOptionsGroup($value, $text, $attributes, $groupAttributes[$value] ?? [])
- : $this->makeOption($value, $text, $attributes[$value] ?? [])
+ : $this->makeOption($value, $text, $attributes[$value] ?? []),
);
}
@@ -88,7 +88,7 @@ public function placeholder(string $text, mixed $value = null, bool $disabled =
return $this->prependChild(
$this->makeOption($value, $text)
->selectedUnless($this->hasSelection())
- ->disabled($disabled)
+ ->disabled($disabled),
);
}
@@ -116,7 +116,7 @@ protected static function applyValueToElements(Collection $value, Collection $ch
if ($child instanceof Selectable) {
return $child->selectedIf(
- $value->contains($child->getAttribute('value')->value())
+ $value->contains($child->getAttribute('value')->value()),
);
}
@@ -135,7 +135,7 @@ protected static function applyValueToElements(Collection $value, Collection $ch
protected function hasSelection(): bool
{
return $this->getChildren()->contains(
- fn(HtmlElement $child) => $child->hasAttribute('selected')
+ fn(HtmlElement $child) => $child->hasAttribute('selected'),
);
}
@@ -158,14 +158,14 @@ protected function makeOptionsGroup(
string $label,
array $options,
array $attributes = [],
- array $groupAttributes = []
+ array $groupAttributes = [],
): Optgroup {
return Optgroup::make()
->label($label)
->attributes($groupAttributes)
->children(
$options,
- fn($optionText, $optionValue) => $this->makeOption($optionValue, $optionText, $attributes[$optionValue] ?? [])
+ fn($optionText, $optionValue) => $this->makeOption($optionValue, $optionText, $attributes[$optionValue] ?? []),
);
}
@@ -183,7 +183,7 @@ protected function applyValueToOptions(): static
}
return $this->setNewChildren(
- static::applyValueToElements($value, $this->getChildren())
+ static::applyValueToElements($value, $this->getChildren()),
);
}
}
diff --git a/src/Entities/Attributes.php b/src/Entities/Attributes.php
index bd07146..3bf91f6 100644
--- a/src/Entities/Attributes.php
+++ b/src/Entities/Attributes.php
@@ -149,7 +149,7 @@ public function render(): string
return implode(' ', array_map(
fn(AbstractAttribute $attribute) => $attribute->render(),
- $this->items
+ $this->items,
));
}
@@ -160,7 +160,7 @@ public function toArray(): array
{
return array_map(
fn(AbstractAttribute $attribute) => $attribute->value(),
- $this->items
+ $this->items,
);
}
diff --git a/src/Entities/Attributes/ClassAttribute.php b/src/Entities/Attributes/ClassAttribute.php
index ca94d2b..e093b8b 100644
--- a/src/Entities/Attributes/ClassAttribute.php
+++ b/src/Entities/Attributes/ClassAttribute.php
@@ -134,10 +134,10 @@ public function remove(string $class): static
return $this;
}
- $class = trim($class);
+ $class = mb_trim($class);
return $this->setValue(
- array_diff($this->all(), [$class])
+ array_diff($this->all(), [$class]),
);
}
@@ -166,7 +166,7 @@ public function contains(string $class): bool
*/
public function has(string $class): bool
{
- return in_array(trim($class), $this->all());
+ return in_array(mb_trim($class), $this->all());
}
/**
diff --git a/src/Entities/Attributes/MiscAttribute.php b/src/Entities/Attributes/MiscAttribute.php
index 18042c2..3870afa 100644
--- a/src/Entities/Attributes/MiscAttribute.php
+++ b/src/Entities/Attributes/MiscAttribute.php
@@ -74,7 +74,7 @@ public function render(): string
*/
protected function setValue(mixed $value): static
{
- $this->value = trim((string) $value);
+ $this->value = mb_trim((string) $value);
return $this;
}
diff --git a/src/Exceptions/InvalidHtmlException.php b/src/Exceptions/InvalidHtmlException.php
index 0060503..7705c50 100644
--- a/src/Exceptions/InvalidHtmlException.php
+++ b/src/Exceptions/InvalidHtmlException.php
@@ -21,7 +21,7 @@ class InvalidHtmlException extends Exception
public static function onTag(string $tag): static
{
return new static(
- "Can't set inner contents on `{$tag}` because it's a void element"
+ "Can't set inner contents on `{$tag}` because it's a void element",
);
}
}
diff --git a/src/Exceptions/MissingTagException.php b/src/Exceptions/MissingTagException.php
index 3fea1c9..1695eb3 100644
--- a/src/Exceptions/MissingTagException.php
+++ b/src/Exceptions/MissingTagException.php
@@ -21,7 +21,7 @@ class MissingTagException extends Exception
public static function onClass(string $className): static
{
return new static(
- "Class {$className} has no `\$tag` property or empty."
+ "Class {$className} has no `\$tag` property or empty.",
);
}
}
diff --git a/src/Html.php b/src/Html.php
index f66e822..e5bdac3 100644
--- a/src/Html.php
+++ b/src/Html.php
@@ -251,7 +251,7 @@ public function number(
mixed $value = null,
mixed $min = null,
mixed $max = null,
- mixed $step = null
+ mixed $step = null,
): Input {
return $this->input('number', $name, $value)
->attributeIfNotNull($min, 'min', $min)
@@ -312,7 +312,7 @@ public function range(
mixed $value = null,
mixed $min = null,
mixed $max = null,
- mixed $step = null
+ mixed $step = null,
): Input {
return $this->input('range', $name, $value)
->attributeIfNotNull($min, 'min', $min)
diff --git a/tests/Concerns/AssertsHtmlStrings.php b/tests/Concerns/AssertsHtmlStrings.php
index 3220c06..4b7f6e3 100644
--- a/tests/Concerns/AssertsHtmlStrings.php
+++ b/tests/Concerns/AssertsHtmlStrings.php
@@ -31,7 +31,7 @@ public static function assertHtmlStringEqualsHtmlString(string $expected, mixed
static::assertEqualsCanonicalizing(
static::convertToDomDocument($expected),
static::convertToDomDocument($actual),
- $message
+ $message,
);
}
diff --git a/tests/Elements/ATest.php b/tests/Elements/ATest.php
index 1d031cf..0d63f4a 100644
--- a/tests/Elements/ATest.php
+++ b/tests/Elements/ATest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- A::make()
+ A::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_create_with_a_href(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- A::make()->href('https://github.com')
+ A::make()->href('https://github.com'),
);
}
@@ -42,7 +42,7 @@ public function it_can_create_with_custom_data_attributes(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- A::make()->href('#delete-user-modal')->data(['role' => 'modal', 'id' => 1, 'name' => 'User 1'])
+ A::make()->href('#delete-user-modal')->data(['role' => 'modal', 'id' => 1, 'name' => 'User 1']),
);
}
@@ -51,7 +51,7 @@ public function it_can_create_an_a_element_with_a_target(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- A::make()->target('_blank')
+ A::make()->target('_blank'),
);
}
}
diff --git a/tests/Elements/ButtonTest.php b/tests/Elements/ButtonTest.php
index 87e88ec..48342a7 100644
--- a/tests/Elements/ButtonTest.php
+++ b/tests/Elements/ButtonTest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()
+ Button::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_create_a_button_with_a_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()->value(1)
+ Button::make()->value(1),
);
}
@@ -42,7 +42,7 @@ public function it_can_create_with_custom_type_and_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()->text('Submit')->type('submit')->value('btn_value')
+ Button::make()->text('Submit')->type('submit')->value('btn_value'),
);
}
@@ -51,7 +51,7 @@ public function it_can_create_with_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()->text('Hi')
+ Button::make()->text('Hi'),
);
}
@@ -60,7 +60,7 @@ public function it_can_create_with_html_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()->html('Hi')
+ Button::make()->html('Hi'),
);
}
@@ -70,8 +70,8 @@ public function it_can_create_with_html_element_object(): void
static::assertHtmlStringEqualsHtmlString(
'',
Button::make()->html(
- I::make()->class(['fa', 'fa-plus'])
- )
+ I::make()->class(['fa', 'fa-plus']),
+ ),
);
}
@@ -80,17 +80,17 @@ public function it_can_create_with_a_specific_type(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()->type('submit')->html('Hi')
+ Button::make()->type('submit')->html('Hi'),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()->submit()->html('Hi')
+ Button::make()->submit()->html('Hi'),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()->reset()->html('Reset the form')
+ Button::make()->reset()->html('Reset the form'),
);
}
@@ -99,7 +99,7 @@ public function it_can_disable_a_button(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Button::make()->disabled()
+ Button::make()->disabled(),
);
}
}
diff --git a/tests/Elements/DivTest.php b/tests/Elements/DivTest.php
index 5967141..441daf9 100644
--- a/tests/Elements/DivTest.php
+++ b/tests/Elements/DivTest.php
@@ -35,11 +35,11 @@ public static function getCustomStylesDP(): array
return [
[
[],
- '
'
+ '',
],
[
['width' => '20px', 'background-color' => 'red'],
- ''
+ '',
],
];
}
@@ -54,7 +54,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()
+ Div::make(),
);
}
@@ -63,7 +63,7 @@ public function it_can_set_an_attribute_with_set_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->attribute('foo', 'bar')->render()
+ Div::make()->attribute('foo', 'bar')->render(),
);
}
@@ -72,7 +72,7 @@ public function it_can_set_an_attribute_to_null(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->attribute('foo')->render()
+ Div::make()->attribute('foo')->render(),
);
}
@@ -81,7 +81,7 @@ public function it_can_set_an_attribute_with_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->attribute('foo', 'bar')->render()
+ Div::make()->attribute('foo', 'bar')->render(),
);
}
@@ -90,12 +90,12 @@ public function it_can_set_an_attribute_with_attribute_if(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->attributeIf(true, 'foo', 'bar')->attributeIf(false, 'bar', 'baz')->render()
+ Div::make()->attributeIf(true, 'foo', 'bar')->attributeIf(false, 'bar', 'baz')->render(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->attributeUnless(false, 'foo', 'bar')->attributeUnless(true, 'bar', 'baz')->render()
+ Div::make()->attributeUnless(false, 'foo', 'bar')->attributeUnless(true, 'bar', 'baz')->render(),
);
}
@@ -104,7 +104,7 @@ public function it_can_set_an_class_with_class_if(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->classIf(true, 'bar')->classIf(false, 'baz')->render()
+ Div::make()->classIf(true, 'bar')->classIf(false, 'baz')->render(),
);
}
@@ -121,7 +121,7 @@ public function it_can_forget_an_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->attribute('foo', 'bar')->forgetAttribute('foo')->render()
+ Div::make()->attribute('foo', 'bar')->forgetAttribute('foo')->render(),
);
}
@@ -153,7 +153,7 @@ public function it_can_set_an_id(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->id('main')->render()
+ Div::make()->id('main')->render(),
);
}
@@ -162,7 +162,7 @@ public function multiple_attributes_can_be_set_with_attributes(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->attributes(['foo', 'bar' => 'baz'])->render()
+ Div::make()->attributes(['foo', 'bar' => 'baz'])->render(),
);
}
@@ -171,17 +171,17 @@ public function it_can_add_a_class_with_add_class(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->class('foo')->render()
+ Div::make()->class('foo')->render(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->class(['foo', 'bar'])->render()
+ Div::make()->class(['foo', 'bar'])->render(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->class(['foo', 'bar' => false])->render()
+ Div::make()->class(['foo', 'bar' => false])->render(),
);
}
@@ -190,7 +190,7 @@ public function it_can_add_a_class_with_class(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->class('foo')->render()
+ Div::make()->class('foo')->render(),
);
}
@@ -199,7 +199,7 @@ public function it_can_set_style_from_a_string(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->style('color: red')->render()
+ Div::make()->style('color: red')->render(),
);
}
@@ -208,7 +208,7 @@ public function it_can_set_style_from_an_array(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->style(['color' => 'red'])->render()
+ Div::make()->style(['color' => 'red'])->render(),
);
}
@@ -217,7 +217,7 @@ public function it_can_set_text(): void
{
static::assertHtmlStringEqualsHtmlString(
'Hi & Bye
',
- Div::make()->text('Hi & Bye')->render()
+ Div::make()->text('Hi & Bye')->render(),
);
}
@@ -226,7 +226,7 @@ public function it_can_set_html(): void
{
static::assertHtmlStringEqualsHtmlString(
'Yo
',
- Div::make()->html('Yo')->render()
+ Div::make()->html('Yo')->render(),
);
}
@@ -235,7 +235,7 @@ public function it_can_set_html_from_htmlstring(): void
{
static::assertHtmlStringEqualsHtmlString(
'Yo
',
- Div::make()->html(new HtmlString('Yo'))->render()
+ Div::make()->html(new HtmlString('Yo'))->render(),
);
}
@@ -252,7 +252,7 @@ public function setting_text_overwrites_existing_children(): void
{
static::assertHtmlStringEqualsHtmlString(
'Hi
',
- Div::make()->addChild(Div::make())->text('Hi')->render()
+ Div::make()->addChild(Div::make())->text('Hi')->render(),
);
}
@@ -282,7 +282,7 @@ public function it_can_add_a_child_from_a_string(): void
{
static::assertHtmlStringEqualsHtmlString(
'Hello
',
- Div::make()->addChild('Hello')
+ Div::make()->addChild('Hello'),
);
}
@@ -291,7 +291,7 @@ public function it_can_add_a_child_from_an_element(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->addChild(Div::make()->text('Hello'))
+ Div::make()->addChild(Div::make()->text('Hello')),
);
}
@@ -300,7 +300,7 @@ public function it_can_add_children_from_an_array_of_strings(): void
{
static::assertHtmlStringEqualsHtmlString(
'Helloworld
',
- Div::make()->addChild(['Hello', 'world'])
+ Div::make()->addChild(['Hello', 'world']),
);
}
@@ -309,7 +309,7 @@ public function it_can_add_children_from_an_array_of_elements(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->children([Div::make()->text('Hello'), Div::make()->text('World')])
+ Div::make()->children([Div::make()->text('Hello'), Div::make()->text('World')]),
);
}
@@ -320,7 +320,7 @@ public function it_can_add_children_from_an_iterable(): void
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->addChild($children)
+ Div::make()->addChild($children),
);
}
@@ -329,7 +329,7 @@ public function it_doesnt_add_a_child_if_the_child_is_null(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->addChild(null)
+ Div::make()->addChild(null),
);
}
@@ -338,22 +338,22 @@ public function it_can_transform_children_when_they_are_added(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->children(['Hello', 'World'], [$this, 'wrapInDiv'])
+ Div::make()->children(['Hello', 'World'], [$this, 'wrapInDiv']),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->children(['Hello', 'World'], [$this, 'wrapInDiv'])
+ Div::make()->children(['Hello', 'World'], [$this, 'wrapInDiv']),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->children(['Hello', 'World'], [$this, 'wrapInDiv'])
+ Div::make()->children(['Hello', 'World'], [$this, 'wrapInDiv']),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->children(['Hello', 'World'], [$this, 'wrapInDiv'])
+ Div::make()->children(['Hello', 'World'], [$this, 'wrapInDiv']),
);
}
@@ -362,7 +362,7 @@ public function it_can_add_a_child_with_add_child(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->addChild(Div::make()->text('Hello'))
+ Div::make()->addChild(Div::make()->text('Hello')),
);
}
@@ -371,7 +371,7 @@ public function it_can_add_a_child_with_child(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->addChild(Div::make()->text('Hello'))
+ Div::make()->addChild(Div::make()->text('Hello')),
);
}
@@ -380,7 +380,7 @@ public function it_can_add_children_with_children(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->children(Div::make()->text('Hello'))
+ Div::make()->children(Div::make()->text('Hello')),
);
}
@@ -391,7 +391,7 @@ public function it_can_prepend_children_with_prepend_children(): void
'',
Div::make()
->children(Div::make()->text('Hello'))
- ->prependChildren(Div::make()->text('World'))
+ ->prependChildren(Div::make()->text('World')),
);
}
@@ -402,7 +402,7 @@ public function it_can_prepend_children_with_prepend_child(): void
'',
Div::make()
->addChild(Div::make()->text('Hello'))
- ->prependChild(Div::make()->text('World'))
+ ->prependChild(Div::make()->text('World')),
);
}
@@ -413,14 +413,14 @@ public function it_can_transform_children_when_they_are_prepended(): void
'',
Div::make()
->addChild(Div::make()->text('Hello'))
- ->prependChildren(['World'], [$this, 'wrapInDiv'])
+ ->prependChildren(['World'], [$this, 'wrapInDiv']),
);
static::assertHtmlStringEqualsHtmlString(
'',
Div::make()
->addChild(Div::make()->text('Hello'))
- ->prependChild('World', [$this, 'wrapInDiv'])
+ ->prependChild('World', [$this, 'wrapInDiv']),
);
}
@@ -450,7 +450,7 @@ public function it_can_set_a_data_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Div::make()->data('foo', 'bar')->render()
+ Div::make()->data('foo', 'bar')->render(),
);
}
@@ -460,12 +460,12 @@ public function it_can_create_with_custom_styles(array $styles, string $expected
{
static::assertHtmlStringEqualsHtmlString(
$expected,
- Div::make()->styleIf( ! empty($styles), $styles)->toHtml()
+ Div::make()->styleIf( ! empty($styles), $styles)->toHtml(),
);
static::assertHtmlStringEqualsHtmlString(
$expected,
- Div::make()->styleUnless(empty($styles), $styles)->toHtml()
+ Div::make()->styleUnless(empty($styles), $styles)->toHtml(),
);
}
}
diff --git a/tests/Elements/DlTest.php b/tests/Elements/DlTest.php
index faa6438..b94abb2 100644
--- a/tests/Elements/DlTest.php
+++ b/tests/Elements/DlTest.php
@@ -40,12 +40,12 @@ public function it_can_make_list(): void
static::assertHtmlStringEqualsHtmlString(
'
',
- $dl
+ $dl,
);
static::assertHtmlStringEqualsHtmlString(
'
',
- Dl::make()->class('list-unstyled')
+ Dl::make()->class('list-unstyled'),
);
}
@@ -82,7 +82,7 @@ public function it_can_add_items(): void
'Term 3' .
'Definition 3' .
'',
- $dl
+ $dl,
);
}
@@ -104,7 +104,7 @@ public function it_can_add_html_items(): void
'Term 3' .
'Definition 3' .
'',
- Dl::make()->items($items)
+ Dl::make()->items($items),
);
}
@@ -128,8 +128,8 @@ public function it_can_add_multiple_items_at_once_with_custom_attributes(): void
'',
Dl::make()->items($items, [
'dt' => ['class' => 'list-item-term'],
- 'dd' => ['class' => 'list-item-definition']
- ])
+ 'dd' => ['class' => 'list-item-definition'],
+ ]),
);
}
@@ -153,7 +153,7 @@ public function it_can_add_multiple_items_with_multiple_definitions(): void
'Definition 3-2' .
'Definition 3-3' .
'',
- Dl::make()->items($items)
+ Dl::make()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -169,8 +169,8 @@ public function it_can_add_multiple_items_with_multiple_definitions(): void
'',
Dl::make()->items($items, [
'dt' => ['class' => 'list-item-term'],
- 'dd' => ['class' => 'list-item-definition']
- ])
+ 'dd' => ['class' => 'list-item-definition'],
+ ]),
);
}
}
diff --git a/tests/Elements/ElementTest.php b/tests/Elements/ElementTest.php
index 880f0d6..bdd672c 100644
--- a/tests/Elements/ElementTest.php
+++ b/tests/Elements/ElementTest.php
@@ -25,7 +25,7 @@ public function it_can_create_an_element(): void
{
static::assertEquals(
'',
- HtmlElement::withTag('meta')
+ HtmlElement::withTag('meta'),
);
}
@@ -34,7 +34,7 @@ public function it_can_create_an_element_with_attributes(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- HtmlElement::withTag('meta')->attributes(['name' => 'csrf-token', 'content' => 'csrf-token-value'])
+ HtmlElement::withTag('meta')->attributes(['name' => 'csrf-token', 'content' => 'csrf-token-value']),
);
}
@@ -43,7 +43,7 @@ public function it_can_create_an_element_with_a_custom_tag(): void
{
static::assertSame(
'',
- HtmlElement::withTag('foo')->toHtml()
+ HtmlElement::withTag('foo')->toHtml(),
);
}
@@ -64,22 +64,22 @@ public function it_can_add_conditional_changes(): void
static::assertEquals(
'',
- $elt->if(true, $callback)
+ $elt->if(true, $callback),
);
static::assertEquals(
'',
- $elt->if(false, $callback)
+ $elt->if(false, $callback),
);
static::assertEquals(
'',
- $elt->unless(false, $callback)
+ $elt->unless(false, $callback),
);
static::assertEquals(
'',
- $elt->unless(true, $callback)
+ $elt->unless(true, $callback),
);
}
@@ -91,7 +91,7 @@ public function it_can_set_an_attribute_with_attribute_if(): void
Div::make()
->attributeIf(true, 'foo', 'bar')
->attributeIf(false, 'bar', 'baz')
- ->render()
+ ->render(),
);
static::assertHtmlStringEqualsHtmlString(
@@ -99,14 +99,14 @@ public function it_can_set_an_attribute_with_attribute_if(): void
HtmlElement::withTag('div')
->attributeUnless(false, 'foo', 'bar')
->attributeUnless(true, 'bar', 'baz')
- ->render()
+ ->render(),
);
static::assertHtmlStringEqualsHtmlString(
'',
HtmlElement::withTag('input')
->attributeUnless(false, 'required')
- ->render()
+ ->render(),
);
}
@@ -117,26 +117,26 @@ public function it_can_get_class_list(): void
static::assertEquals(
'',
- $elt
+ $elt,
);
static::assertInstanceOf(
\Arcanedev\Html\Entities\Attributes\ClassAttribute::class,
- $elt->classList()
+ $elt->classList(),
);
$elt->classList()->toggle('active');
static::assertEquals(
'',
- $elt
+ $elt,
);
$elt->classList()->toggle('active');
static::assertEquals(
'',
- $elt
+ $elt,
);
}
@@ -147,7 +147,7 @@ public function it_can_push_class_to_class_list(): void
static::assertHtmlStringEqualsHtmlString(
'',
- $elt
+ $elt,
);
static::assertCount(2, $elt->classList());
@@ -155,7 +155,7 @@ public function it_can_push_class_to_class_list(): void
static::assertHtmlStringEqualsHtmlString(
'',
- $elt
+ $elt,
);
static::assertCount(4, $elt->classList());
}
diff --git a/tests/Elements/FieldsetTest.php b/tests/Elements/FieldsetTest.php
index 177f3cf..a0b7768 100644
--- a/tests/Elements/FieldsetTest.php
+++ b/tests/Elements/FieldsetTest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Fieldset::make()
+ Fieldset::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_add_a_legend_to_the_fieldset(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Fieldset::make()->legend('Legend')
+ Fieldset::make()->legend('Legend'),
);
}
@@ -42,7 +42,7 @@ public function it_can_disable_a_fieldset(): void
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Fieldset::make()->disabled()
+ Fieldset::make()->disabled(),
);
}
}
diff --git a/tests/Elements/FileTest.php b/tests/Elements/FileTest.php
index 38179e5..2ccd773 100644
--- a/tests/Elements/FileTest.php
+++ b/tests/Elements/FileTest.php
@@ -24,7 +24,7 @@ public function it_can_create_a_file(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()
+ File::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_create_with_autofocus_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()->autofocus()
+ File::make()->autofocus(),
);
}
@@ -42,7 +42,7 @@ public function it_can_create_with_autofocus_attribute_when_passing_true(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()->autofocus(true)
+ File::make()->autofocus(true),
);
}
@@ -51,7 +51,7 @@ public function it_wont_create_a_file_that_has_autofocus_when_passing_false(): v
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()->autofocus(false)
+ File::make()->autofocus(false),
);
}
@@ -60,7 +60,7 @@ public function it_can_create_with_required_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()->required()
+ File::make()->required(),
);
}
@@ -69,7 +69,7 @@ public function it_can_create_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()->name('file')
+ File::make()->name('file'),
);
}
@@ -78,7 +78,7 @@ public function it_can_create_with_a_name_and_id(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()->name('file')->id('file')
+ File::make()->name('file')->id('file'),
);
}
@@ -114,7 +114,7 @@ public function it_can_create_with_custom_accept(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()->accept('.jpg')
+ File::make()->accept('.jpg'),
);
}
@@ -123,7 +123,7 @@ public function it_can_create_with_multiple_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- File::make()->multiple()
+ File::make()->multiple(),
);
}
}
diff --git a/tests/Elements/FormTest.php b/tests/Elements/FormTest.php
index 69ba132..75d2c17 100644
--- a/tests/Elements/FormTest.php
+++ b/tests/Elements/FormTest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()
+ Form::make(),
);
}
@@ -36,7 +36,7 @@ public function it_can_split_form_tags(): void
static::assertSame('', (string) $form->close());
@@ -47,7 +47,7 @@ public function it_can_create_with_a_custom_action(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()->action('/submit')
+ Form::make()->action('/submit'),
);
}
@@ -56,7 +56,7 @@ public function it_can_create_with_a_custom_method(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()->method('POST')
+ Form::make()->method('POST'),
);
}
@@ -65,7 +65,7 @@ public function it_can_create_with_accepts_files(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()->acceptsFiles()
+ Form::make()->acceptsFiles(),
);
}
@@ -74,7 +74,7 @@ public function it_can_create_with_html_builder(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()->action('/submit')->method('DELETE')
+ Form::make()->action('/submit')->method('DELETE'),
);
}
@@ -83,7 +83,7 @@ public function it_can_create_a_form_with_a_novalidate_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()->novalidate()->acceptsFiles()
+ Form::make()->novalidate()->acceptsFiles(),
);
}
@@ -92,7 +92,7 @@ public function it_can_create_a_form_that_has_novalidate_when_passing_true(): vo
{
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()->novalidate(true)->acceptsFiles()
+ Form::make()->novalidate(true)->acceptsFiles(),
);
}
@@ -101,7 +101,7 @@ public function it_wont_create_a_form_that_has_novalidate_when_passing_false():
{
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()->novalidate(false)->acceptsFiles()
+ Form::make()->novalidate(false)->acceptsFiles(),
);
}
@@ -111,24 +111,24 @@ public function it_can_add_multiple_children_type_html_element(): void
$form = Form::make();
$form = $form->addChild(
- Input::make()->type('hidden')->name('_token')->value('12345')
+ Input::make()->type('hidden')->name('_token')->value('12345'),
);
static::assertCount(1, $form->getChildren());
$form = $form->addChild(
- Input::make()->type('hidden')->name('_method')->value('PUT')
+ Input::make()->type('hidden')->name('_method')->value('PUT'),
);
static::assertCount(2, $form->getChildren());
static::assertHtmlStringEqualsHtmlString(
'',
- $form->toHtml()
+ $form->toHtml(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $form->toHtml()
+ $form->toHtml(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Form::make()->target('_blank')
+ Form::make()->target('_blank'),
);
}
}
diff --git a/tests/Elements/ITest.php b/tests/Elements/ITest.php
index c51bfd6..5e99472 100644
--- a/tests/Elements/ITest.php
+++ b/tests/Elements/ITest.php
@@ -24,7 +24,7 @@ public function it_can_create_an_i_element(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- I::make()
+ I::make(),
);
}
}
diff --git a/tests/Elements/ImgTest.php b/tests/Elements/ImgTest.php
index ed71436..f180b8f 100644
--- a/tests/Elements/ImgTest.php
+++ b/tests/Elements/ImgTest.php
@@ -32,7 +32,7 @@ public function it_can_create_with_an_alt_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'
',
- Img::make()->alt('Image title')
+ Img::make()->alt('Image title'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_with_a_src_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'
',
- Img::make()->src('logo.jpg')
+ Img::make()->src('logo.jpg'),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_with_builder(): void
{
static::assertHtmlStringEqualsHtmlString(
'
',
- Img::make()->src('logo.jpg')->alt('ARCANEDEV')
+ Img::make()->src('logo.jpg')->alt('ARCANEDEV'),
);
}
}
diff --git a/tests/Elements/InputTest.php b/tests/Elements/InputTest.php
index 34e2cea..827d8eb 100644
--- a/tests/Elements/InputTest.php
+++ b/tests/Elements/InputTest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()
+ Input::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_create_with_a_custom_type(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('text')
+ Input::make()->type('text'),
);
}
@@ -42,7 +42,7 @@ public function it_can_create_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->name('foo')
+ Input::make()->name('foo'),
);
}
@@ -51,7 +51,7 @@ public function it_can_create_with_a_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->value('bar')
+ Input::make()->value('bar'),
);
}
@@ -60,7 +60,7 @@ public function it_can_create_with_a_placeholder(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->placeholder('Foo bar')
+ Input::make()->placeholder('Foo bar'),
);
}
@@ -69,7 +69,7 @@ public function it_can_create_that_is_required(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->required()
+ Input::make()->required(),
);
}
@@ -78,7 +78,7 @@ public function it_can_create_that_is_required_when_passing_true(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->required(true)
+ Input::make()->required(true),
);
}
@@ -87,7 +87,7 @@ public function it_wont_create_that_is_required_when_passing_false(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->required(false)
+ Input::make()->required(false),
);
}
@@ -96,7 +96,7 @@ public function it_can_create_that_has_autofocus(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->autofocus()
+ Input::make()->autofocus(),
);
}
@@ -105,7 +105,7 @@ public function it_can_create_an_input_that_has_autofocus_when_passing_true(): v
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->autofocus(true)
+ Input::make()->autofocus(true),
);
}
@@ -114,7 +114,7 @@ public function it_wont_create_an_input_that_has_autofocus_when_passing_false():
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->autofocus(false)
+ Input::make()->autofocus(false),
);
}
@@ -123,12 +123,12 @@ public function it_can_check(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('checkbox')->checked(true)
+ Input::make()->type('checkbox')->checked(true),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('checkbox')->checked()
+ Input::make()->type('checkbox')->checked(),
);
}
@@ -137,12 +137,12 @@ public function it_can_uncheck(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('checkbox')->checked()->checked(false)
+ Input::make()->type('checkbox')->checked()->checked(false),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('checkbox')->checked()->unchecked()
+ Input::make()->type('checkbox')->checked()->unchecked(),
);
}
@@ -151,7 +151,7 @@ public function it_can_disable_an_input(): void
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('checkbox')->disabled()
+ Input::make()->type('checkbox')->disabled(),
);
}
@@ -160,7 +160,7 @@ public function it_can_create_with_builder(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('text')->name('foo')->id('foo')->value('bar')
+ Input::make()->type('text')->name('foo')->id('foo')->value('bar'),
);
}
@@ -169,7 +169,7 @@ public function it_can_create_an_input_that_is_readonly(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->isReadonly()
+ Input::make()->isReadonly(),
);
}
@@ -178,7 +178,7 @@ public function it_can_create_a_date_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('date')
+ Input::make()->type('date'),
);
}
@@ -187,7 +187,7 @@ public function it_can_create_a_time_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('time')
+ Input::make()->type('time'),
);
}
@@ -196,7 +196,7 @@ public function it_can_create_a_number_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('number')
+ Input::make()->type('number'),
);
}
@@ -205,12 +205,12 @@ public function it_can_create_a_button_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('button')
+ Input::make()->type('button'),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('button')->disabled()
+ Input::make()->type('button')->disabled(),
);
}
@@ -219,7 +219,7 @@ public function it_can_create_an_input_with_maxlength(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('text')->maxlength(25)
+ Input::make()->type('text')->maxlength(25),
);
}
@@ -228,7 +228,7 @@ public function it_can_create_an_input_with_minlength(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Input::make()->type('text')->minlength(25)
+ Input::make()->type('text')->minlength(25),
);
}
}
diff --git a/tests/Elements/LabelTest.php b/tests/Elements/LabelTest.php
index 91a27c7..593e472 100644
--- a/tests/Elements/LabelTest.php
+++ b/tests/Elements/LabelTest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Label::make()
+ Label::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_create_with_a_custom_for_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Label::make()->for('some_input_id')
+ Label::make()->for('some_input_id'),
);
}
}
diff --git a/tests/Elements/LegendTest.php b/tests/Elements/LegendTest.php
index 75a11ad..6de2720 100644
--- a/tests/Elements/LegendTest.php
+++ b/tests/Elements/LegendTest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Legend::make()
+ Legend::make(),
);
}
}
diff --git a/tests/Elements/LinkTest.php b/tests/Elements/LinkTest.php
index bfb82b5..3a6e478 100644
--- a/tests/Elements/LinkTest.php
+++ b/tests/Elements/LinkTest.php
@@ -26,7 +26,7 @@ public function it_can_make(): void
static::assertHtmlStringEqualsHtmlString(
'',
- $link->render()
+ $link->render(),
);
}
@@ -37,7 +37,7 @@ public function it_can_make_stylesheet_link(): void
static::assertHtmlStringEqualsHtmlString(
'',
- $link->render()
+ $link->render(),
);
}
@@ -48,7 +48,7 @@ public function it_can_make_favicon_link(): void
static::assertHtmlStringEqualsHtmlString(
'',
- $link->render()
+ $link->render(),
);
}
}
diff --git a/tests/Elements/MetaTest.php b/tests/Elements/MetaTest.php
index b32182a..a6d4656 100644
--- a/tests/Elements/MetaTest.php
+++ b/tests/Elements/MetaTest.php
@@ -34,7 +34,7 @@ public function it_make_with_attributes(): void
static::assertHtmlStringEqualsHtmlString(
$expected,
- Meta::make()->attributes(['name' => 'csrf-token', 'content' => '12345'])
+ Meta::make()->attributes(['name' => 'csrf-token', 'content' => '12345']),
);
}
}
diff --git a/tests/Elements/OlTest.php b/tests/Elements/OlTest.php
index 6e45b30..ac2942f 100644
--- a/tests/Elements/OlTest.php
+++ b/tests/Elements/OlTest.php
@@ -27,7 +27,7 @@ public function it_can_be_instantiated(): void
$expectations = [
\Arcanedev\Html\Elements\HtmlElement::class,
\Arcanedev\Html\Elements\ListElement::class,
- \Arcanedev\Html\Elements\Ol::class,
+ Ol::class,
];
foreach ($expectations as $expected) {
@@ -44,7 +44,7 @@ public function it_can_make_list(): void
static::assertHtmlStringEqualsHtmlString(
'
',
- Ol::make()->class('list-unstyled')
+ Ol::make()->class('list-unstyled'),
);
}
@@ -73,7 +73,7 @@ public function it_can_add_items(): void
'Item 2' .
'Item 3' .
'',
- $ol
+ $ol,
);
}
@@ -92,7 +92,7 @@ public function it_can_add_html_items(): void
'Item 2' .
'Item 3' .
'',
- Ol::make()->items($items)
+ Ol::make()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -103,7 +103,7 @@ public function it_can_add_html_items(): void
'',
Ol::make()
->attributes(['class' => 'list-group'])
- ->items($items, ['class' => 'list-group-item'])
+ ->items($items, ['class' => 'list-group-item']),
);
}
@@ -122,7 +122,7 @@ public function it_can_add_multiple_items_at_once(): void
'Item 2' .
'Item 3' .
'',
- Ol::make()->items($items)
+ Ol::make()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -133,7 +133,7 @@ public function it_can_add_multiple_items_at_once(): void
'',
Ol::make()
->attributes(['class' => 'list-group'])
- ->items($items, ['class' => 'list-group-item'])
+ ->items($items, ['class' => 'list-group-item']),
);
}
@@ -158,7 +158,7 @@ public function it_can_handle_nested_items(): void
'' .
'' .
'',
- Ol::make()->items($items)
+ Ol::make()->items($items),
);
}
}
diff --git a/tests/Elements/OptgroupTest.php b/tests/Elements/OptgroupTest.php
index 6cf0408..e23205e 100644
--- a/tests/Elements/OptgroupTest.php
+++ b/tests/Elements/OptgroupTest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Optgroup::make()
+ Optgroup::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_create_with_a_label(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Optgroup::make()->label('Cats')
+ Optgroup::make()->label('Cats'),
);
}
@@ -42,7 +42,7 @@ public function it_can_disable_an_optgroup(): void
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Optgroup::make()->disabled()
+ Optgroup::make()->disabled(),
);
}
}
diff --git a/tests/Elements/OptionTest.php b/tests/Elements/OptionTest.php
index 2d5d6c2..6c382ad 100644
--- a/tests/Elements/OptionTest.php
+++ b/tests/Elements/OptionTest.php
@@ -24,7 +24,7 @@ public function it_can_render_an_empty_version_itself(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Option::make()
+ Option::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_render_itself_with_a_text_and_a_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Option::make()->value('0')->text('Choose...')->render()
+ Option::make()->value('0')->text('Choose...')->render(),
);
}
@@ -42,12 +42,12 @@ public function it_can_render_itself_in_a_selected_state(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Option::make()->value('0')->text('Choose...')->selected()
+ Option::make()->value('0')->text('Choose...')->selected(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Option::make()->value('0')->text('Choose...')->selected()
+ Option::make()->value('0')->text('Choose...')->selected(),
);
}
@@ -56,7 +56,7 @@ public function it_can_unselect_itself(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Option::make()->value('0')->text('Choose...')->selected()->unselected()
+ Option::make()->value('0')->text('Choose...')->selected()->unselected(),
);
}
@@ -65,12 +65,12 @@ public function it_can_conditionally_select_itself(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Option::make()->value('0')->text('Choose...')->selectedIf(true)
+ Option::make()->value('0')->text('Choose...')->selectedIf(true),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Option::make()->value('0')->text('Choose...')->selectedIf(false)
+ Option::make()->value('0')->text('Choose...')->selectedIf(false),
);
}
}
diff --git a/tests/Elements/PTest.php b/tests/Elements/PTest.php
index 7760ff5..28eaa0b 100644
--- a/tests/Elements/PTest.php
+++ b/tests/Elements/PTest.php
@@ -24,7 +24,7 @@ public function it_can_create_an_i_element(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- P::make()
+ P::make(),
);
}
}
diff --git a/tests/Elements/SelectTest.php b/tests/Elements/SelectTest.php
index 801d738..87eb269 100644
--- a/tests/Elements/SelectTest.php
+++ b/tests/Elements/SelectTest.php
@@ -24,7 +24,7 @@ public function it_can_render_a_select_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Select::make()
+ Select::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_render_a_select_element_required(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Select::make()->required()
+ Select::make()->required(),
);
}
@@ -50,7 +50,7 @@ public function it_can_render_options(): void
',
- Select::make()->options($options)
+ Select::make()->options($options),
);
}
@@ -67,7 +67,7 @@ public function it_can_have_a_value(): void
',
- Select::make()->options($options)->value('value2')
+ Select::make()->options($options)->value('value2'),
);
static::assertHtmlStringEqualsHtmlString(
@@ -79,7 +79,7 @@ public function it_can_have_a_value(): void
Select::make()
->name('avc')
->options(['null' => 'Select an option', 1 => 'Yes', 0 => 'No'])
- ->value(1)
+ ->value(1),
);
}
@@ -94,7 +94,7 @@ public function it_can_have_a_placeholder_option(): void
',
Select::make()
->options(['value1' => 'text1', 'value2' => 'text2'])
- ->placeholder('Placeholder')
+ ->placeholder('Placeholder'),
);
static::assertHtmlStringEqualsHtmlString(
@@ -105,7 +105,7 @@ public function it_can_have_a_placeholder_option(): void
',
Select::make()
->options(['value1' => 'text1', 'value2' => 'text2'])
- ->placeholder('Placeholder', 0)
+ ->placeholder('Placeholder', 0),
);
static::assertHtmlStringEqualsHtmlString(
@@ -116,7 +116,7 @@ public function it_can_have_a_placeholder_option(): void
',
Select::make()
->options(['value1' => 'text1', 'value2' => 'text2'])
- ->placeholder('Placeholder', 0, true)
+ ->placeholder('Placeholder', 0, true),
);
}
@@ -132,7 +132,7 @@ public function it_doesnt_select_the_placeholder_if_something_has_already_been_s
Select::make()
->options(['value1' => 'text1', 'value2' => 'text2'])
->value('value1')
- ->placeholder('Placeholder', 0)
+ ->placeholder('Placeholder', 0),
);
}
@@ -147,7 +147,7 @@ public function it_can_have_a_multiple_option(): void
',
Select::make()
->options(['value1' => 'text1', 'value2' => 'text2', 'value3' => 'text3'])
- ->multiple()
+ ->multiple(),
);
}
@@ -163,7 +163,7 @@ public function it_can_convert_multiple_select_name(): void
Select::make()
->name('foo')
->options(['value1' => 'text1', 'value2' => 'text2', 'value3' => 'text3'])
- ->multiple()
+ ->multiple(),
);
}
@@ -179,7 +179,7 @@ public function it_can_have_multiple_values(): void
Select::make()
->options(['value1' => 'text1', 'value2' => 'text2', 'value3' => 'text3'])
->value(['value1', 'value3'])
- ->multiple()
+ ->multiple(),
);
}
@@ -195,7 +195,7 @@ public function it_can_have_one_multiple_value(): void
Select::make()
->options(['value1' => 'text1', 'value2' => 'text2', 'value3' => 'text3'])
->value('value3')
- ->multiple()
+ ->multiple(),
);
}
@@ -212,7 +212,7 @@ public function it_can_have_an_optgroup(): void
',
Select::make()
- ->options(['Cats' => ['leopard' => 'Leopard'], 'Dogs' => ['spaniel' => 'Spaniel']])
+ ->options(['Cats' => ['leopard' => 'Leopard'], 'Dogs' => ['spaniel' => 'Spaniel']]),
);
}
@@ -230,7 +230,7 @@ public function it_can_select_an_item_in_an_optgroup(): void
',
Select::make()
->options(['Cats' => ['leopard' => 'Leopard'], 'Dogs' => ['spaniel' => 'Spaniel']])
- ->value('leopard')
+ ->value('leopard'),
);
}
@@ -245,9 +245,9 @@ public function it_can_apply_options_with_custom_attributes(): void
Select::make()
->options(
['leopard' => 'Leopard', 'spaniel' => 'Spaniel'],
- ['leopard' => ['disabled']]
+ ['leopard' => ['disabled']],
)
- ->value('spaniel')
+ ->value('spaniel'),
);
}
@@ -266,9 +266,9 @@ public function it_can_select_an_item_in_an_optgroup_with_custom_attributes(): v
Select::make()
->options(
['Cats' => ['leopard' => 'Leopard'], 'Dogs' => ['spaniel' => 'Spaniel']],
- ['leopard' => ['disabled']]
+ ['leopard' => ['disabled']],
)
- ->value('spaniel')
+ ->value('spaniel'),
);
static::assertHtmlStringEqualsHtmlString(
@@ -285,9 +285,9 @@ public function it_can_select_an_item_in_an_optgroup_with_custom_attributes(): v
->options(
['Cats' => ['leopard' => 'Leopard'], 'Dogs' => ['spaniel' => 'Spaniel'], 'Others' => []],
['leopard' => ['disabled']],
- ['Others' => ['disabled']]
+ ['Others' => ['disabled']],
)
- ->value('spaniel')
+ ->value('spaniel'),
);
}
@@ -310,7 +310,7 @@ public function it_can_render_a_select_element_with_options_with_a_selected_valu
->name('select')
->id('select')
->options($options)
- ->value('+2')
+ ->value('+2'),
);
}
@@ -321,7 +321,7 @@ public function it_can_create_a_disabled_select(): void
'',
- Select::make()->disabled()->options(['value1' => 'text1'])->render()
+ Select::make()->disabled()->options(['value1' => 'text1'])->render(),
);
}
@@ -332,7 +332,7 @@ public function it_can_create_a_select_that_is_disabled_when_passing_true(): voi
'',
- Select::make()->disabled(true)->options(['value1' => 'text1'])->render()
+ Select::make()->disabled(true)->options(['value1' => 'text1'])->render(),
);
}
@@ -343,7 +343,7 @@ public function it_wont_create_a_select_that_is_disabled_when_passing_false(): v
'',
- Select::make()->disabled(false)->options(['value1' => 'text1'])->render()
+ Select::make()->disabled(false)->options(['value1' => 'text1'])->render(),
);
}
@@ -354,7 +354,7 @@ public function it_can_create_a_select_that_has_autofocus(): void
'',
- Select::make()->autofocus()->options(['value1' => 'text1'])->render()
+ Select::make()->autofocus()->options(['value1' => 'text1'])->render(),
);
}
@@ -365,7 +365,7 @@ public function it_can_create_a_select_that_has_autofocus_when_passing_true(): v
'',
- Select::make()->autofocus(true)->options(['value1' => 'text1'])->render()
+ Select::make()->autofocus(true)->options(['value1' => 'text1'])->render(),
);
}
@@ -376,7 +376,7 @@ public function it_wont_create_a_select_that_has_autofocus_when_passing_false():
'',
- Select::make()->autofocus(false)->options(['value1' => 'text1'])->render()
+ Select::make()->autofocus(false)->options(['value1' => 'text1'])->render(),
);
}
@@ -387,7 +387,7 @@ public function it_can_create_a_select_that_is_required(): void
'',
- Select::make()->required()->options(['value1' => 'text1'])->render()
+ Select::make()->required()->options(['value1' => 'text1'])->render(),
);
}
@@ -398,7 +398,7 @@ public function it_can_create_a_select_that_is_required_when_passing_true(): voi
'',
- Select::make()->required(true)->options(['value1' => 'text1'])->render()
+ Select::make()->required(true)->options(['value1' => 'text1'])->render(),
);
}
@@ -409,7 +409,7 @@ public function it_wont_create_a_select_that_is_required_when_passing_false(): v
'',
- Select::make()->required(false)->options(['value1' => 'text1'])->render()
+ Select::make()->required(false)->options(['value1' => 'text1'])->render(),
);
}
@@ -420,7 +420,7 @@ public function it_can_create_a_select_that_is_readonly(): void
'',
- Select::make()->isReadonly()->options(['value1' => 'text1'])->render()
+ Select::make()->isReadonly()->options(['value1' => 'text1'])->render(),
);
}
@@ -431,7 +431,7 @@ public function it_can_create_a_select_that_is_readonly_when_passing_true(): voi
'',
- Select::make()->isReadonly(true)->options(['value1' => 'text1'])->render()
+ Select::make()->isReadonly(true)->options(['value1' => 'text1'])->render(),
);
}
@@ -442,7 +442,7 @@ public function it_wont_create_a_select_that_is_readonly_when_passing_false(): v
'',
- Select::make()->isReadonly(false)->options(['value1' => 'text1'])->render()
+ Select::make()->isReadonly(false)->options(['value1' => 'text1'])->render(),
);
}
}
diff --git a/tests/Elements/SpanTest.php b/tests/Elements/SpanTest.php
index fecf35b..948ff42 100644
--- a/tests/Elements/SpanTest.php
+++ b/tests/Elements/SpanTest.php
@@ -24,7 +24,7 @@ public function it_can_create_an_span_element(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Span::make()
+ Span::make(),
);
}
@@ -33,13 +33,13 @@ public function it_can_create_a_span_with_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'Hi',
- Span::make()->html('Hi')
+ Span::make()->html('Hi'),
);
$this->assertHtmlStringEqualsHtmlString(
'Hi',
- Span::make()->html('Hi')
+ Span::make()->html('Hi'),
);
}
@@ -48,7 +48,7 @@ public function it_can_create_an_span_element_with_classes(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Span::make()->class(['fa', 'fa-fw', 'fa-plus'])
+ Span::make()->class(['fa', 'fa-fw', 'fa-plus']),
);
}
}
diff --git a/tests/Elements/TextareaTest.php b/tests/Elements/TextareaTest.php
index b76d1e9..c19254c 100644
--- a/tests/Elements/TextareaTest.php
+++ b/tests/Elements/TextareaTest.php
@@ -24,7 +24,7 @@ public function it_can_create(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()
+ Textarea::make(),
);
}
@@ -33,7 +33,7 @@ public function it_can_create_with_autofocus_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->autofocus()
+ Textarea::make()->autofocus(),
);
}
@@ -42,7 +42,7 @@ public function it_can_create_with_a_placeholder(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->placeholder('Lorem ipsum')
+ Textarea::make()->placeholder('Lorem ipsum'),
);
}
@@ -51,7 +51,7 @@ public function it_can_create_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->name('text')
+ Textarea::make()->name('text'),
);
}
@@ -60,7 +60,7 @@ public function it_can_create_with_a_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic content')
+ Textarea::make()->value('My epic content'),
);
}
@@ -69,7 +69,7 @@ public function it_can_create_with_required_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic content')->required()
+ Textarea::make()->value('My epic content')->required(),
);
}
@@ -78,7 +78,7 @@ public function it_can_set_the_size(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic content')->size('60x15')
+ Textarea::make()->value('My epic content')->size('60x15'),
);
}
@@ -87,7 +87,7 @@ public function it_can_create_a_textarea_that_is_required_when_passing_true(): v
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->required(true)
+ Textarea::make()->value('My epic')->required(true),
);
}
@@ -96,7 +96,7 @@ public function it_wont_create_a_textarea_that_is_required_when_passing_false():
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->required(false)
+ Textarea::make()->value('My epic')->required(false),
);
}
@@ -105,7 +105,7 @@ public function it_can_create_a_disabled_textarea(): void
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->disabled()
+ Textarea::make()->value('My epic')->disabled(),
);
}
@@ -114,7 +114,7 @@ public function it_can_create_a_textarea_that_is_disabled_when_passing_true(): v
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->disabled(true)
+ Textarea::make()->value('My epic')->disabled(true),
);
}
@@ -123,7 +123,7 @@ public function it_wont_create_a_textarea_that_is_disabled_when_passing_false():
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->disabled(false)
+ Textarea::make()->value('My epic')->disabled(false),
);
}
@@ -132,7 +132,7 @@ public function it_can_create_a_readonly_textarea(): void
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->isReadonly()
+ Textarea::make()->value('My epic')->isReadonly(),
);
}
@@ -141,7 +141,7 @@ public function it_can_create_a_textarea_that_is_readonly_when_passing_true(): v
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->isReadonly(true)
+ Textarea::make()->value('My epic')->isReadonly(true),
);
}
@@ -150,7 +150,7 @@ public function it_wont_create_a_textarea_that_is_readonly_when_passing_false():
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->isReadonly(false)
+ Textarea::make()->value('My epic')->isReadonly(false),
);
}
@@ -159,7 +159,7 @@ public function it_can_create_a_textarea_with_maxlength(): void
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->maxlength(25)
+ Textarea::make()->value('My epic')->maxlength(25),
);
}
@@ -168,7 +168,7 @@ public function it_can_create_a_textarea_with_minlength(): void
{
$this->assertHtmlStringEqualsHtmlString(
'',
- Textarea::make()->value('My epic')->minlength(25)
+ Textarea::make()->value('My epic')->minlength(25),
);
}
}
diff --git a/tests/Elements/UlTest.php b/tests/Elements/UlTest.php
index bfffbf6..4ff6455 100644
--- a/tests/Elements/UlTest.php
+++ b/tests/Elements/UlTest.php
@@ -27,7 +27,7 @@ public function it_can_be_instantiated(): void
$expectations = [
\Arcanedev\Html\Elements\HtmlElement::class,
\Arcanedev\Html\Elements\ListElement::class,
- \Arcanedev\Html\Elements\Ul::class,
+ Ul::class,
];
foreach ($expectations as $expected) {
@@ -40,12 +40,12 @@ public function it_can_make_list(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- Ul::make()
+ Ul::make(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- Ul::make()->class('list-unstyled')
+ Ul::make()->class('list-unstyled'),
);
}
@@ -74,7 +74,7 @@ public function it_can_add_items(): void
'Item 2' .
'Item 3' .
'',
- $ul
+ $ul,
);
}
@@ -93,7 +93,7 @@ public function it_can_add_html_items(): void
'Item 2' .
'Item 3' .
'',
- Ul::make()->items($items)
+ Ul::make()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -104,7 +104,7 @@ public function it_can_add_html_items(): void
'',
Ul::make()
->attributes(['class' => 'list-group'])
- ->items($items, ['class' => 'list-group-item'])
+ ->items($items, ['class' => 'list-group-item']),
);
}
@@ -123,7 +123,7 @@ public function it_can_add_multiple_items_at_once(): void
'Item 2' .
'Item 3' .
'',
- Ul::make()->items($items)
+ Ul::make()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -134,7 +134,7 @@ public function it_can_add_multiple_items_at_once(): void
'',
Ul::make()
->attributes(['class' => 'list-group'])
- ->items($items, ['class' => 'list-group-item'])
+ ->items($items, ['class' => 'list-group-item']),
);
}
@@ -159,7 +159,7 @@ public function it_can_handle_nested_items(): void
'' .
'' .
'',
- Ul::make()->items($items)
+ Ul::make()->items($items),
);
}
}
diff --git a/tests/Entities/ChildrenCollectionTest.php b/tests/Entities/ChildrenCollectionTest.php
index cf6d9c5..c10dfb9 100644
--- a/tests/Entities/ChildrenCollectionTest.php
+++ b/tests/Entities/ChildrenCollectionTest.php
@@ -62,11 +62,9 @@ public function it_can_parse_children(): void
#[Test]
public function it_can_convert_to_html(): void
{
- $children = ChildrenCollection::parse(['foo', null, 'bar'], function ($child) {
- return $child !== null
+ $children = ChildrenCollection::parse(['foo', null, 'bar'], fn($child) => $child !== null
? Span::make()->html($child)
- : $child;
- });
+ : $child);
static::assertCount(3, $children);
static::assertEquals('foobar', $children->toHtml());
diff --git a/tests/Entities/ClassAttributeTest.php b/tests/Entities/ClassAttributeTest.php
index 8a567a3..c02f6a4 100644
--- a/tests/Entities/ClassAttributeTest.php
+++ b/tests/Entities/ClassAttributeTest.php
@@ -27,17 +27,17 @@ public function it_can_be_instantiated(): void
static::assertEquals(
['btn', 'btn-primary'],
- ClassAttribute::make('btn btn-primary')->all()
+ ClassAttribute::make('btn btn-primary')->all(),
);
static::assertEquals(
['btn', 'btn-primary'],
- ClassAttribute::make(['btn', 'btn-primary'])->all()
+ ClassAttribute::make(['btn', 'btn-primary'])->all(),
);
static::assertEquals(
['btn', 'btn-primary'],
- ClassAttribute::make(collect(['btn', 'btn-primary']))->all()
+ ClassAttribute::make(collect(['btn', 'btn-primary']))->all(),
);
}
diff --git a/tests/Html/ATest.php b/tests/Html/ATest.php
index f5a260c..290a381 100644
--- a/tests/Html/ATest.php
+++ b/tests/Html/ATest.php
@@ -23,7 +23,7 @@ public function it_can_create_an_a_element(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->a()
+ $this->html->a(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_an_a_element_with_a_href(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->a('https://github.com')
+ $this->html->a('https://github.com'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_an_a_element_with_a_href_and_text_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'ARCANEDEV',
- $this->html->a('https://github.com', 'ARCANEDEV')
+ $this->html->a('https://github.com', 'ARCANEDEV'),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_an_a_element_with_a_href_and_html_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'ARCANEDEV (Github)',
- $this->html->a('https://github.com/ARCANEDEV', 'ARCANEDEV (Github)')
+ $this->html->a('https://github.com/ARCANEDEV', 'ARCANEDEV (Github)'),
);
}
@@ -59,7 +59,7 @@ public function it_can_create_an_a_element_with_a_target(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->a()->target('_blank')
+ $this->html->a()->target('_blank'),
);
}
@@ -68,7 +68,7 @@ public function it_can_create_an_a_element_with_a_href_and_a_target(): void
{
static::assertHtmlStringEqualsHtmlString(
'ARCANEDEV (Github)',
- $this->html->a('https://github.com/ARCANEDEV', 'ARCANEDEV (Github)')->target('_blank')
+ $this->html->a('https://github.com/ARCANEDEV', 'ARCANEDEV (Github)')->target('_blank'),
);
}
}
diff --git a/tests/Html/ButtonTest.php b/tests/Html/ButtonTest.php
index 42911cb..ebf0ecc 100644
--- a/tests/Html/ButtonTest.php
+++ b/tests/Html/ButtonTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_button(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->button()
+ $this->html->button(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_button_with_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->button('Hi')
+ $this->html->button('Hi'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_a_button_with_html_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->button('Hi')
+ $this->html->button('Hi'),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_a_button_with_a_type(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->button('Hi', 'submit')
+ $this->html->button('Hi', 'submit'),
);
}
}
diff --git a/tests/Html/CheckboxTest.php b/tests/Html/CheckboxTest.php
index 933ce9a..4986056 100644
--- a/tests/Html/CheckboxTest.php
+++ b/tests/Html/CheckboxTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_checkbox(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->checkbox()
+ $this->html->checkbox(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_checkbox_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->checkbox('my_checkbox')
+ $this->html->checkbox('my_checkbox'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_a_checked_checkbox_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->checkbox('my_checkbox', true)
+ $this->html->checkbox('my_checkbox', true),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_a_checkbox_with_a_name_and_a_custom_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->checkbox('my_checkbox', true, 'foo')
+ $this->html->checkbox('my_checkbox', true, 'foo'),
);
}
@@ -59,7 +59,7 @@ public function it_can_create_a_checkbox_with_a_name_and_a_zero_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->checkbox('my_checkbox', true, 0)
+ $this->html->checkbox('my_checkbox', true, 0),
);
}
}
diff --git a/tests/Html/DivTest.php b/tests/Html/DivTest.php
index 37b16a5..9fd4be4 100644
--- a/tests/Html/DivTest.php
+++ b/tests/Html/DivTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_div(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->div()
+ $this->html->div(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_div_with_integer_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'500
',
- $this->html->div(500)
+ $this->html->div(500),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_a_div_with_float_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'500.5
',
- $this->html->div(500.5)
+ $this->html->div(500.5),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_a_div_with_hexadecimal_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'420
',
- $this->html->div(0x1A4)
+ $this->html->div(0x1A4),
);
}
@@ -59,7 +59,7 @@ public function it_can_create_a_div_with_octal_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'420
',
- $this->html->div(0644)
+ $this->html->div(0644),
);
}
}
diff --git a/tests/Html/DlTest.php b/tests/Html/DlTest.php
index 258c101..6882869 100644
--- a/tests/Html/DlTest.php
+++ b/tests/Html/DlTest.php
@@ -40,12 +40,12 @@ public function it_can_make_list(): void
static::assertHtmlStringEqualsHtmlString(
'
',
- $dl
+ $dl,
);
static::assertHtmlStringEqualsHtmlString(
'
',
- $this->html->dl(['class' => 'list-unstyled'])
+ $this->html->dl(['class' => 'list-unstyled']),
);
}
@@ -82,7 +82,7 @@ public function it_can_add_items(): void
'Term 3' .
'Definition 3' .
'',
- $dl
+ $dl,
);
}
@@ -104,7 +104,7 @@ public function it_can_add_html_items(): void
'Term 3' .
'Definition 3' .
'',
- $this->html->dl()->items($items)
+ $this->html->dl()->items($items),
);
}
@@ -128,8 +128,8 @@ public function it_can_add_multiple_items_at_once_with_custom_attributes(): void
'',
$this->html->dl()->items($items, [
'dt' => ['class' => 'list-item-term'],
- 'dd' => ['class' => 'list-item-definition']
- ])
+ 'dd' => ['class' => 'list-item-definition'],
+ ]),
);
}
}
diff --git a/tests/Html/ElementTest.php b/tests/Html/ElementTest.php
index 1c97ea2..9a6344d 100644
--- a/tests/Html/ElementTest.php
+++ b/tests/Html/ElementTest.php
@@ -24,7 +24,7 @@ public function it_can_create_an_element(): void
{
static::assertEquals(
'',
- $this->html->element('foo')
+ $this->html->element('foo'),
);
}
@@ -36,22 +36,22 @@ public function it_can_add_conditional_changes(): void
static::assertEquals(
'',
- $elt->if(true, $callback)
+ $elt->if(true, $callback),
);
static::assertEquals(
'',
- $elt->if(false, $callback)
+ $elt->if(false, $callback),
);
static::assertEquals(
'',
- $elt->unless(false, $callback)
+ $elt->unless(false, $callback),
);
static::assertEquals(
'',
- $elt->unless(true, $callback)
+ $elt->unless(true, $callback),
);
}
@@ -63,7 +63,7 @@ public function it_can_set_an_attribute_with_attribute_if(): void
$this->html->div()
->attributeIf(true, 'foo', 'bar')
->attributeIf(false, 'bar', 'baz')
- ->render()
+ ->render(),
);
static::assertHtmlStringEqualsHtmlString(
@@ -71,14 +71,14 @@ public function it_can_set_an_attribute_with_attribute_if(): void
$this->html->div()
->attributeUnless(false, 'foo', 'bar')
->attributeUnless(true, 'bar', 'baz')
- ->render()
+ ->render(),
);
static::assertHtmlStringEqualsHtmlString(
'',
$this->html->input()
->attributeUnless(false, 'required')
- ->render()
+ ->render(),
);
}
}
diff --git a/tests/Html/EmailInputTest.php b/tests/Html/EmailInputTest.php
index 0097723..25ac135 100644
--- a/tests/Html/EmailInputTest.php
+++ b/tests/Html/EmailInputTest.php
@@ -23,7 +23,7 @@ public function it_can_make_email_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->email('email', 'hello@email.com')
+ $this->html->email('email', 'hello@email.com'),
);
}
}
diff --git a/tests/Html/FieldsetTest.php b/tests/Html/FieldsetTest.php
index ad7843e..17d16cc 100644
--- a/tests/Html/FieldsetTest.php
+++ b/tests/Html/FieldsetTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_fieldset(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->fieldset()
+ $this->html->fieldset(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_fieldset_with_a_legend(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->fieldset('Legend')
+ $this->html->fieldset('Legend'),
);
}
@@ -41,7 +41,7 @@ public function it_can_add_a_legend_to_the_fieldset(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->fieldset()->legend('Legend')
+ $this->html->fieldset()->legend('Legend'),
);
}
}
diff --git a/tests/Html/FileTest.php b/tests/Html/FileTest.php
index 9914268..0c8c84d 100644
--- a/tests/Html/FileTest.php
+++ b/tests/Html/FileTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_file_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->file()
+ $this->html->file(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_file_input_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->file('archives')
+ $this->html->file('archives'),
);
}
}
diff --git a/tests/Html/FormTest.php b/tests/Html/FormTest.php
index 107d1e0..f3c39ab 100644
--- a/tests/Html/FormTest.php
+++ b/tests/Html/FormTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_form(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->form()
+ $this->html->form(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_form_with_a_custom_action(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->form('POST', '/submit')
+ $this->html->form('POST', '/submit'),
);
}
@@ -46,7 +46,7 @@ public function it_can_create_a_form_with_a_target(): void
$this->html
->form('POST', '/submit')
->target('_blank')
- ->addChild('')
+ ->addChild(''),
);
}
}
diff --git a/tests/Html/ITest.php b/tests/Html/ITest.php
index fd1eb95..1bed0cf 100644
--- a/tests/Html/ITest.php
+++ b/tests/Html/ITest.php
@@ -23,7 +23,7 @@ public function it_can_create_an_i_element(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->i()
+ $this->html->i(),
);
}
}
diff --git a/tests/Html/ImgTest.php b/tests/Html/ImgTest.php
index e02dde4..564479a 100644
--- a/tests/Html/ImgTest.php
+++ b/tests/Html/ImgTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_img_tag_with_image_source_and_alt(): void
{
static::assertHtmlStringEqualsHtmlString(
'
',
- $this->html->img('/path/to/image/file', 'alt_value')
+ $this->html->img('/path/to/image/file', 'alt_value'),
);
}
}
diff --git a/tests/Html/InputTest.php b/tests/Html/InputTest.php
index c52b854..33ab64f 100644
--- a/tests/Html/InputTest.php
+++ b/tests/Html/InputTest.php
@@ -23,7 +23,7 @@ public function it_can_make_an_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input()
+ $this->html->input(),
);
}
@@ -32,7 +32,7 @@ public function it_can_make_an_input_with_a_custom_type(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input('text')
+ $this->html->input('text'),
);
}
@@ -41,7 +41,7 @@ public function it_can_make_an_input_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input('text', 'foo')
+ $this->html->input('text', 'foo'),
);
}
@@ -50,7 +50,7 @@ public function it_can_make_an_input_with_a_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input('text', 'foo', 'bar')
+ $this->html->input('text', 'foo', 'bar'),
);
}
@@ -59,7 +59,7 @@ public function it_can_make_an_input_with_a_placeholder(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input()->placeholder('Foo bar')
+ $this->html->input()->placeholder('Foo bar'),
);
}
@@ -68,7 +68,7 @@ public function it_can_make_an_input_that_is_required(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input()->required()
+ $this->html->input()->required(),
);
}
@@ -77,7 +77,7 @@ public function it_can_make_an_input_that_has_autofocus(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input()->autofocus()
+ $this->html->input()->autofocus(),
);
}
@@ -86,17 +86,17 @@ public function it_can_make_checkbox_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->checkbox('is_checked')
+ $this->html->checkbox('is_checked'),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->checkbox('is_checked', true)
+ $this->html->checkbox('is_checked', true),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->checkbox('is_checked', false, 'yes')
+ $this->html->checkbox('is_checked', false, 'yes'),
);
}
@@ -105,12 +105,12 @@ public function it_can_check_an_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input('checkbox')->checked(true)
+ $this->html->input('checkbox')->checked(true),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input('checkbox')->checked(true)
+ $this->html->input('checkbox')->checked(true),
);
}
@@ -119,12 +119,12 @@ public function it_can_uncheck_an_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input('checkbox')->checked()->checked(false)
+ $this->html->input('checkbox')->checked()->checked(false),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input('checkbox')->checked()->unchecked()
+ $this->html->input('checkbox')->checked()->unchecked(),
);
}
@@ -133,7 +133,7 @@ public function it_can_make_an_input_that_is_readonly(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input()->isReadonly()
+ $this->html->input()->isReadonly(),
);
}
@@ -142,7 +142,7 @@ public function it_can_create_an_input_without_readonly(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input()->isReadonly(false)
+ $this->html->input()->isReadonly(false),
);
}
@@ -151,7 +151,7 @@ public function it_can_remove_readonly_from_a_readonly_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input()->isReadonly()->isReadonly(false)
+ $this->html->input()->isReadonly()->isReadonly(false),
);
}
@@ -160,7 +160,7 @@ public function it_can_make_a_date_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->date()
+ $this->html->date(),
);
}
@@ -169,7 +169,7 @@ public function it_can_make_a_date_input_with_blank_date(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->date('test_date', '')
+ $this->html->date('test_date', ''),
);
}
@@ -178,7 +178,7 @@ public function it_can_make_a_date_input_and_format_date(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->date('test_date', '2017-09-04T23:33:32')
+ $this->html->date('test_date', '2017-09-04T23:33:32'),
);
}
@@ -187,7 +187,7 @@ public function it_can_make_a_date_input_with_invalid_date(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->date('test_date', 'notadate')
+ $this->html->date('test_date', 'notadate'),
);
}
@@ -196,7 +196,7 @@ public function it_can_create_a_datetime_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->datetime()
+ $this->html->datetime(),
);
}
@@ -205,7 +205,7 @@ public function it_can_create_a_datetime_input_with_blank_date(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->datetime('test_datetime', '')
+ $this->html->datetime('test_datetime', ''),
);
}
@@ -214,7 +214,7 @@ public function it_can_create_a_datetime_input_and_format_date(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->datetime('test_datetime', '2020-01-20T15:00:12')
+ $this->html->datetime('test_datetime', '2020-01-20T15:00:12'),
);
}
@@ -223,7 +223,7 @@ public function it_can_create_a_datetime_input_with_invalid_date(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->datetime('test_datetime', 'notadate')
+ $this->html->datetime('test_datetime', 'notadate'),
);
}
@@ -232,7 +232,7 @@ public function it_can_make_a_time_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->time()
+ $this->html->time(),
);
}
@@ -241,7 +241,7 @@ public function it_can_make_a_time_input_with_blank_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->time('test_time', '')
+ $this->html->time('test_time', ''),
);
}
@@ -250,7 +250,7 @@ public function it_can_make_a_time_input_with_time_string_and_format(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->time('test_time', '11:30')
+ $this->html->time('test_time', '11:30'),
);
}
@@ -259,7 +259,7 @@ public function it_can_make_a_time_input_with_string_and_format(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->time('test_time', '2017-09-04T23:33:32')
+ $this->html->time('test_time', '2017-09-04T23:33:32'),
);
}
@@ -268,7 +268,7 @@ public function it_can_make_a_time_input_with_invalid_time(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->time('test_time', 'timeoclock')
+ $this->html->time('test_time', 'timeoclock'),
);
}
@@ -277,7 +277,7 @@ public function it_can_make_a_hidden_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->hidden('_token', '12345')
+ $this->html->hidden('_token', '12345'),
);
}
@@ -286,7 +286,7 @@ public function it_can_make_text_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->text('title', 'Hello there')
+ $this->html->text('title', 'Hello there'),
);
}
@@ -295,12 +295,12 @@ public function it_can_make_number_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number()
+ $this->html->number(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number('price', 120)
+ $this->html->number('price', 120),
);
}
@@ -309,17 +309,17 @@ public function it_can_make_a_number_input_with_min_max_step(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number('percentage', '0', '0', '100')
+ $this->html->number('percentage', '0', '0', '100'),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number('percentage', '0', '0', '100', '10')
+ $this->html->number('percentage', '0', '0', '100', '10'),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number('percentage', '30', null, '100', '10')
+ $this->html->number('percentage', '30', null, '100', '10'),
);
}
@@ -328,7 +328,7 @@ public function it_can_create_a_number_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number()
+ $this->html->number(),
);
}
@@ -337,7 +337,7 @@ public function it_can_create_a_number_input_with_min_max(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number('test', '0', '0', '100')
+ $this->html->number('test', '0', '0', '100'),
);
}
@@ -346,7 +346,7 @@ public function it_can_create_a_number_input_with_min_max_step(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number('test', '0', '0', '100', '10')
+ $this->html->number('test', '0', '0', '100', '10'),
);
}
@@ -355,7 +355,7 @@ public function it_can_create_a_number_input_with_max_step(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->number('test', '30', null, '100', '10')
+ $this->html->number('test', '30', null, '100', '10'),
);
}
@@ -364,7 +364,7 @@ public function it_avoids_fill_value_for_password_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->input('password', 'password', 'secret')
+ $this->html->input('password', 'password', 'secret'),
);
}
@@ -373,7 +373,7 @@ public function it_can_make_a_range_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->range()
+ $this->html->range(),
);
}
@@ -382,7 +382,7 @@ public function it_can_make_a_range_input_with_min_max(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->range('test', '0', '0', '100')
+ $this->html->range('test', '0', '0', '100'),
);
}
@@ -391,7 +391,7 @@ public function it_can_make_a_range_input_with_min_max_step(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->range('test', '0', '0', '100', '10')
+ $this->html->range('test', '0', '0', '100', '10'),
);
}
@@ -400,7 +400,7 @@ public function it_can_make_a_range_input_with_max_step(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->range('test', '30', null, '100', '10')
+ $this->html->range('test', '30', null, '100', '10'),
);
}
}
diff --git a/tests/Html/LabelTest.php b/tests/Html/LabelTest.php
index fba662c..511c8fa 100644
--- a/tests/Html/LabelTest.php
+++ b/tests/Html/LabelTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_label(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->label()
+ $this->html->label(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_label_with_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->label('Hi')
+ $this->html->label('Hi'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_a_label_with_html_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->label('Hi')
+ $this->html->label('Hi'),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_a_label_with_a_custom_for_attribute(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->label('Hi', 'some_input_id')
+ $this->html->label('Hi', 'some_input_id'),
);
}
@@ -59,7 +59,7 @@ public function it_can_create_a_label_with_integer_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->label(5000)
+ $this->html->label(5000),
);
}
@@ -68,7 +68,7 @@ public function it_can_create_a_label_with_float_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->label(5000.5)
+ $this->html->label(5000.5),
);
}
@@ -77,7 +77,7 @@ public function it_can_create_a_label_with_hexadecimal_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->label(0x123)
+ $this->html->label(0x123),
);
}
@@ -86,7 +86,7 @@ public function it_can_create_a_label_with_octal_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->label(0321)
+ $this->html->label(0321),
);
}
}
diff --git a/tests/Html/LegendTest.php b/tests/Html/LegendTest.php
index 90fa673..a37ea8f 100644
--- a/tests/Html/LegendTest.php
+++ b/tests/Html/LegendTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_legend(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->legend()
+ $this->html->legend(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_legend_with_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->legend('Hi')
+ $this->html->legend('Hi'),
);
}
}
diff --git a/tests/Html/MailToTest.php b/tests/Html/MailToTest.php
index bd3a0b0..7bf2457 100644
--- a/tests/Html/MailToTest.php
+++ b/tests/Html/MailToTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_mailto_link(): void
{
static::assertHtmlStringEqualsHtmlString(
'hello@example.com',
- $this->html->mailto('hello@example.com')
+ $this->html->mailto('hello@example.com'),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_mailto_link_with_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'E-mail',
- $this->html->mailto('hello@example.com', 'E-mail')
+ $this->html->mailto('hello@example.com', 'E-mail'),
);
}
}
diff --git a/tests/Html/OlTest.php b/tests/Html/OlTest.php
index 9cad42a..a5a90d8 100644
--- a/tests/Html/OlTest.php
+++ b/tests/Html/OlTest.php
@@ -23,12 +23,12 @@ public function it_can_make_list(): void
{
static::assertHtmlStringEqualsHtmlString(
'
',
- $this->html->ol()
+ $this->html->ol(),
);
static::assertHtmlStringEqualsHtmlString(
'
',
- $this->html->ol(['class' => 'list-unstyled'])
+ $this->html->ol(['class' => 'list-unstyled']),
);
}
@@ -57,7 +57,7 @@ public function it_can_add_items(): void
'Item 2' .
'Item 3' .
'',
- $ol
+ $ol,
);
}
@@ -76,7 +76,7 @@ public function it_can_add_html_items(): void
'Item 2' .
'Item 3' .
'',
- $this->html->ol()->items($items)
+ $this->html->ol()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -87,7 +87,7 @@ public function it_can_add_html_items(): void
'',
$this->html
->ol(['class' => 'list-group'])
- ->items($items, ['class' => 'list-group-item'])
+ ->items($items, ['class' => 'list-group-item']),
);
}
@@ -106,7 +106,7 @@ public function it_can_add_multiple_items_at_once(): void
'Item 2' .
'Item 3' .
'',
- $this->html->ol()->items($items)
+ $this->html->ol()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -117,7 +117,7 @@ public function it_can_add_multiple_items_at_once(): void
'',
$this->html
->ol(['class' => 'list-group'])
- ->items($items, ['class' => 'list-group-item'])
+ ->items($items, ['class' => 'list-group-item']),
);
}
}
diff --git a/tests/Html/OptionTest.php b/tests/Html/OptionTest.php
index fc1ef67..bced979 100644
--- a/tests/Html/OptionTest.php
+++ b/tests/Html/OptionTest.php
@@ -23,7 +23,7 @@ public function it_can_create_an_empty_option(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->option()
+ $this->html->option(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_an_option_with_text(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->option('Hi')
+ $this->html->option('Hi'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_an_option_with_text_and_a_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->option('Hi', 1)
+ $this->html->option('Hi', 1),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_a_selected_option_with_text_and_a_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->option('Hi', 1, true)
+ $this->html->option('Hi', 1, true),
);
}
}
diff --git a/tests/Html/PasswordTest.php b/tests/Html/PasswordTest.php
index f60ee1a..9dc7e4c 100644
--- a/tests/Html/PasswordTest.php
+++ b/tests/Html/PasswordTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_password_input(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->password()
+ $this->html->password(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_password_input_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->password('confirm_password')
+ $this->html->password('confirm_password'),
);
}
}
diff --git a/tests/Html/RadioTest.php b/tests/Html/RadioTest.php
index 464ba98..49c942e 100644
--- a/tests/Html/RadioTest.php
+++ b/tests/Html/RadioTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_radio_button(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->radio()
+ $this->html->radio(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_radio_button_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->radio('my_radio')
+ $this->html->radio('my_radio'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_a_checked_radio_button_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->radio('my_radio', true)
+ $this->html->radio('my_radio', true),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_a_radio_button_with_a_name_and_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->radio('my_radio', true, 1)
+ $this->html->radio('my_radio', true, 1),
);
}
@@ -59,7 +59,7 @@ public function it_can_create_a_radio_button_with_a_name_and_a_zero_value(): voi
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->radio('my_radio', true, 0)
+ $this->html->radio('my_radio', true, 0),
);
}
}
diff --git a/tests/Html/ResetTest.php b/tests/Html/ResetTest.php
index 39d7609..4bf3d88 100644
--- a/tests/Html/ResetTest.php
+++ b/tests/Html/ResetTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_reset_button(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->reset()
+ $this->html->reset(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_reset_button_with_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->reset('Reset')
+ $this->html->reset('Reset'),
);
}
}
diff --git a/tests/Html/SelectTest.php b/tests/Html/SelectTest.php
index 1a25956..08a94ea 100644
--- a/tests/Html/SelectTest.php
+++ b/tests/Html/SelectTest.php
@@ -23,7 +23,7 @@ public function it_can_render_a_select_element(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->select()
+ $this->html->select(),
);
}
@@ -32,7 +32,7 @@ public function it_can_render_a_select_element_required(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->select()->required()
+ $this->html->select()->required(),
);
}
@@ -49,7 +49,7 @@ public function it_can_render_a_select_element_with_options(): void
',
- $this->html->select('select', $options)
+ $this->html->select('select', $options),
);
}
@@ -66,7 +66,7 @@ public function it_can_render_a_select_element_with_options_with_a_selected_valu
',
- $this->html->select('select', $options, 'value1')
+ $this->html->select('select', $options, 'value1'),
);
}
@@ -85,7 +85,7 @@ public function it_can_render_a_select_element_with_options_with_a_selected_valu
',
- $this->html->select('select', $options, '+2')
+ $this->html->select('select', $options, '+2'),
);
}
@@ -104,7 +104,7 @@ public function it_can_create_a_select_with_multiple_attribute(): void
',
- $this->html->select('select', $options, ['value1', 'value2'])->multiple()
+ $this->html->select('select', $options, ['value1', 'value2'])->multiple(),
);
}
}
diff --git a/tests/Html/SpanTest.php b/tests/Html/SpanTest.php
index 14b9184..c1212b0 100644
--- a/tests/Html/SpanTest.php
+++ b/tests/Html/SpanTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_span(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->span()
+ $this->html->span(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_span_with_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'Hi',
- $this->html->span('Hi')
+ $this->html->span('Hi'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_a_span_with_html_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'Hi',
- $this->html->span('Hi')
+ $this->html->span('Hi'),
);
}
@@ -50,7 +50,7 @@ public function it_can_create_a_span_with_integer_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'50',
- $this->html->span(50)
+ $this->html->span(50),
);
}
@@ -59,7 +59,7 @@ public function it_can_create_a_span_with_float_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'50.5',
- $this->html->span(50.5)
+ $this->html->span(50.5),
);
}
@@ -68,7 +68,7 @@ public function it_can_create_a_span_with_hexadecimal_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'1337',
- $this->html->span(0x539)
+ $this->html->span(0x539),
);
}
@@ -77,7 +77,7 @@ public function it_can_create_a_span_with_octal_content(): void
{
static::assertHtmlStringEqualsHtmlString(
'83',
- $this->html->span(0123)
+ $this->html->span(0123),
);
}
}
diff --git a/tests/Html/SubmitTest.php b/tests/Html/SubmitTest.php
index 7b7a7c3..8248169 100644
--- a/tests/Html/SubmitTest.php
+++ b/tests/Html/SubmitTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_submit_button(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->submit()
+ $this->html->submit(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_submit_button_with_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->submit('Send')
+ $this->html->submit('Send'),
);
}
}
diff --git a/tests/Html/TelTest.php b/tests/Html/TelTest.php
index 1818315..9f2900a 100644
--- a/tests/Html/TelTest.php
+++ b/tests/Html/TelTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_tel_link(): void
{
static::assertHtmlStringEqualsHtmlString(
'+19999999999',
- $this->html->telLink('+19999999999')
+ $this->html->telLink('+19999999999'),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_tel_link_with_contents(): void
{
static::assertHtmlStringEqualsHtmlString(
'Call me',
- $this->html->telLink('+19999999999', 'Call me')
+ $this->html->telLink('+19999999999', 'Call me'),
);
}
}
diff --git a/tests/Html/TextareaTest.php b/tests/Html/TextareaTest.php
index 7e747fb..650cd3b 100644
--- a/tests/Html/TextareaTest.php
+++ b/tests/Html/TextareaTest.php
@@ -23,7 +23,7 @@ public function it_can_create_a_textarea(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->textarea()
+ $this->html->textarea(),
);
}
@@ -32,7 +32,7 @@ public function it_can_create_a_textarea_with_a_name(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->textarea('description')
+ $this->html->textarea('description'),
);
}
@@ -41,7 +41,7 @@ public function it_can_create_a_textarea_with_a_value(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->textarea('description', 'Foo bar')
+ $this->html->textarea('description', 'Foo bar'),
);
}
}
diff --git a/tests/Html/UlTest.php b/tests/Html/UlTest.php
index b7e0b7e..25e484e 100644
--- a/tests/Html/UlTest.php
+++ b/tests/Html/UlTest.php
@@ -23,12 +23,12 @@ public function it_can_make_list(): void
{
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->ul()
+ $this->html->ul(),
);
static::assertHtmlStringEqualsHtmlString(
'',
- $this->html->ul(['class' => 'list-unstyled'])
+ $this->html->ul(['class' => 'list-unstyled']),
);
}
@@ -57,7 +57,7 @@ public function it_can_add_items(): void
'Item 2' .
'Item 3' .
'',
- $ul
+ $ul,
);
}
@@ -76,7 +76,7 @@ public function it_can_add_html_items(): void
'Item 2' .
'Item 3' .
'',
- $this->html->ul()->items($items)
+ $this->html->ul()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -87,7 +87,7 @@ public function it_can_add_html_items(): void
'',
$this->html
->ul(['class' => 'list-group'])
- ->items($items, ['class' => 'list-group-item'])
+ ->items($items, ['class' => 'list-group-item']),
);
}
@@ -106,7 +106,7 @@ public function it_can_add_multiple_items_at_once(): void
'Item 2' .
'Item 3' .
'',
- $this->html->ul()->items($items)
+ $this->html->ul()->items($items),
);
static::assertHtmlStringEqualsHtmlString(
@@ -117,7 +117,7 @@ public function it_can_add_multiple_items_at_once(): void
'',
$this->html
->ul(['class' => 'list-group'])
- ->items($items, ['class' => 'list-group-item'])
+ ->items($items, ['class' => 'list-group-item']),
);
}
}
diff --git a/tests/HtmlTest.php b/tests/HtmlTest.php
index c7a0b52..708bf57 100644
--- a/tests/HtmlTest.php
+++ b/tests/HtmlTest.php
@@ -43,7 +43,7 @@ public function it_can_make_class_attribute(): void
{
static::assertSame(
'class="btn btn-sm btn-primary"',
- $this->html->class('btn btn-sm btn-primary')
+ $this->html->class('btn btn-sm btn-primary'),
);
}
}