@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $this->parsed = $this->parser->parse(File::read($this->unparsed)); |
| 37 | 37 | |
| 38 | 38 | foreach ($this->parsed as $id => $parsedItem) { |
| 39 | - if (! \is_array($parsedItem) || isset($parsedItem['id'])) { |
|
| 39 | + if (!\is_array($parsedItem) || isset($parsedItem['id'])) { |
|
| 40 | 40 | continue; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | |
| 160 | 160 | private function optimize(string $path): void |
| 161 | 161 | { |
| 162 | - if (! $this->optimizer) { |
|
| 162 | + if (!$this->optimizer) { |
|
| 163 | 163 | return; |
| 164 | 164 | } |
| 165 | 165 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | private function setJsonRule(): DynamicFactory |
| 86 | 86 | { |
| 87 | - return $this->setRule(JsonVariable::class, function (string $value) { |
|
| 87 | + return $this->setRule(JsonVariable::class, function(string $value) { |
|
| 88 | 88 | if (pathinfo($value, PATHINFO_EXTENSION) !== 'json') { |
| 89 | 89 | return null; |
| 90 | 90 | } |
@@ -95,14 +95,14 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | private function setYamlRule(): void |
| 97 | 97 | { |
| 98 | - $this->setRule(YamlVariable::class, function (string $value) { |
|
| 99 | - if (! $this->yamlParser) { |
|
| 98 | + $this->setRule(YamlVariable::class, function(string $value) { |
|
| 99 | + if (!$this->yamlParser) { |
|
| 100 | 100 | return null; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | $extension = pathinfo($value, PATHINFO_EXTENSION); |
| 104 | 104 | |
| 105 | - if (! \in_array($extension, ['yaml', 'yml'])) { |
|
| 105 | + if (!\in_array($extension, ['yaml', 'yml'])) { |
|
| 106 | 106 | return null; |
| 107 | 107 | } |
| 108 | 108 | |
@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | private function setMarkdownRule(): void |
| 114 | 114 | { |
| 115 | - $this->setRule(MarkdownVariable::class, function (string $value) { |
|
| 116 | - if (! $this->markdownParser) { |
|
| 115 | + $this->setRule(MarkdownVariable::class, function(string $value) { |
|
| 116 | + if (!$this->markdownParser) { |
|
| 117 | 117 | return null; |
| 118 | 118 | } |
| 119 | 119 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | private function setHtmlRule(): void |
| 129 | 129 | { |
| 130 | - $this->setRule(HtmlVariable::class, function (string $value) { |
|
| 130 | + $this->setRule(HtmlVariable::class, function(string $value) { |
|
| 131 | 131 | if (pathinfo($value, PATHINFO_EXTENSION) !== 'html') { |
| 132 | 132 | return null; |
| 133 | 133 | } |
@@ -138,8 +138,8 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | private function setImageRule(): void |
| 140 | 140 | { |
| 141 | - $this->setRule(ImageVariable::class, function ($value) { |
|
| 142 | - if (! $this->imageParser) { |
|
| 141 | + $this->setRule(ImageVariable::class, function($value) { |
|
| 142 | + if (!$this->imageParser) { |
|
| 143 | 143 | return null; |
| 144 | 144 | } |
| 145 | 145 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | $extension = pathinfo($srcPath, PATHINFO_EXTENSION); |
| 149 | 149 | |
| 150 | - if (! \in_array($extension, ['jpeg', 'jpg', 'png', 'gif'])) { |
|
| 150 | + if (!\in_array($extension, ['jpeg', 'jpg', 'png', 'gif'])) { |
|
| 151 | 151 | return null; |
| 152 | 152 | } |
| 153 | 153 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | private function setDirectoryRule(): void |
| 159 | 159 | { |
| 160 | - $this->setRule(DirectoryVariable::class, function ($value) { |
|
| 160 | + $this->setRule(DirectoryVariable::class, function($value) { |
|
| 161 | 161 | if (!is_string($value) || substr($value, -1) !== '/') { |
| 162 | 162 | return null; |
| 163 | 163 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer) |
| 27 | 27 | { |
| 28 | - if (! $inline instanceof Image) { |
|
| 28 | + if (!$inline instanceof Image) { |
|
| 29 | 29 | throw new InvalidArgumentException('Inline must be instance of ' . Image::class); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer): HtmlElement |
| 15 | 15 | { |
| 16 | - if (! $inline instanceof Link) { |
|
| 16 | + if (!$inline instanceof Link) { |
|
| 17 | 17 | throw new InvalidArgumentException('Inline must be instance of ' . Link::class); |
| 18 | 18 | } |
| 19 | 19 | |