Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Oct 8, 2018
1 parent c9bbb1e commit 00e861a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function parseClosingTags(string $viewContents, Component $component):

protected function componentString(Component $component, array $attributes = []): string
{
return $this->componentStartString($component, $attributes) . $this->componentEndString($component);
return $this->componentStartString($component, $attributes).$this->componentEndString($component);
}

protected function componentStartString(Component $component, array $attributes = []): string
Expand Down Expand Up @@ -121,7 +121,7 @@ protected function getAttributesFromAttributeString(string $attributeString): ar

$pattern = '/(?<attribute>[\w:-]+)(=(?<value>(\"[^\"]+\"|\\\'[^\\\']+\\\'|[^\s>]+)))?/';

if (!preg_match_all($pattern, $attributeString, $matches, PREG_SET_ORDER)) {
if (! preg_match_all($pattern, $attributeString, $matches, PREG_SET_ORDER)) {
return [];
}

Expand All @@ -138,9 +138,7 @@ protected function getAttributesFromAttributeString(string $attributeString): ar

if (starts_with($attribute, 'bind:')) {
$attribute = str_after($attribute, 'bind:');
}

if (!starts_with($attribute, 'bind:')) {
} else {
$value = str_replace("'", "\\'", $value);
$value = "'{$value}'";
}
Expand All @@ -166,7 +164,7 @@ protected function parseSlots(string $viewContents): string

protected function isOpeningHtmlTag(string $tagName, string $html): bool
{
return !ends_with($html, ["</{$tagName}>", '/>']);
return ! ends_with($html, ["</{$tagName}>", '/>']);
}

protected function parseBindAttributes(string $attributeString): string
Expand Down

0 comments on commit 00e861a

Please sign in to comment.