@@ -68,6 +68,9 @@ discard block |
||
68 | 68 | return $this; |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param string $content |
|
73 | + */ |
|
71 | 74 | public function itemprop(string $name, ?string $content) : Meta { |
72 | 75 | if (!$content) { |
73 | 76 | return $this; |
@@ -79,6 +82,9 @@ discard block |
||
79 | 82 | return $this; |
80 | 83 | } |
81 | 84 | |
85 | + /** |
|
86 | + * @param string $content |
|
87 | + */ |
|
82 | 88 | public function property(string $property, ?string $content) : Meta { |
83 | 89 | if (!$content) { |
84 | 90 | return $this; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | private function setJsonRule(): DynamicFactory |
76 | 76 | { |
77 | - return $this->setRule(JsonVariable::class, function (string $value) { |
|
77 | + return $this->setRule(JsonVariable::class, function(string $value) { |
|
78 | 78 | if (is_string($value) && pathinfo($value, PATHINFO_EXTENSION) === 'json') { |
79 | 79 | return JsonVariable::make($value); |
80 | 80 | } |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | |
86 | 86 | private function setYamlRule(): void |
87 | 87 | { |
88 | - $this->setRule(YamlVariable::class, function (string $value) { |
|
89 | - if (! $this->yamlParser) { |
|
88 | + $this->setRule(YamlVariable::class, function(string $value) { |
|
89 | + if (!$this->yamlParser) { |
|
90 | 90 | return null; |
91 | 91 | } |
92 | 92 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | private function setMarkdownRule(): void |
104 | 104 | { |
105 | - $this->setRule(MarkdownVariable::class, function (string $value) { |
|
105 | + $this->setRule(MarkdownVariable::class, function(string $value) { |
|
106 | 106 | if ($this->markdownParser && pathinfo($value, PATHINFO_EXTENSION) === 'md') { |
107 | 107 | return MarkdownVariable::make($value, $this->markdownParser); |
108 | 108 | } |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | |
114 | 114 | private function setImageRule(): void |
115 | 115 | { |
116 | - $this->setRule(ImageVariable::class, function ($value) { |
|
117 | - if (! $this->imageParser) { |
|
116 | + $this->setRule(ImageVariable::class, function($value) { |
|
117 | + if (!$this->imageParser) { |
|
118 | 118 | return null; |
119 | 119 | } |
120 | 120 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | */ |
30 | 30 | public function parsed() |
31 | 31 | { |
32 | - if (! $this->parsed) { |
|
32 | + if (!$this->parsed) { |
|
33 | 33 | $this->parse(); |
34 | 34 | } |
35 | 35 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | $contents = File::read($this->unparsed); |
28 | 28 | |
29 | - if (! $contents) { |
|
29 | + if (!$contents) { |
|
30 | 30 | throw InvalidConfiguration::fileNotFound($this->unparsed); |
31 | 31 | } |
32 | 32 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | public function __construct(string $templateDirectory) |
12 | 12 | { |
13 | 13 | $fs = new Filesystem(); |
14 | - if (! $fs->exists($templateDirectory)) { |
|
14 | + if (!$fs->exists($templateDirectory)) { |
|
15 | 15 | $fs->mkdir($templateDirectory); |
16 | 16 | } |
17 | 17 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | private function setTwigRule(): void |
38 | 38 | { |
39 | - $this->setRule(TwigRenderer::class, function ($value) { |
|
39 | + $this->setRule(TwigRenderer::class, function($value) { |
|
40 | 40 | if ($value === 'twig') { |
41 | 41 | return TwigRenderer::make($this->templateDirectory); |
42 | 42 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | private static $fs; |
10 | 10 | private static $base; |
11 | 11 | |
12 | - public static function base(?string $base): void |
|
12 | + public static function base(?string $base) : void |
|
13 | 13 | { |
14 | 14 | self::$base = rtrim($base, '/'); |
15 | 15 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | $path = self::path($path); |
29 | 29 | |
30 | - if (! file_exists(self::path($path))) { |
|
30 | + if (!file_exists(self::path($path))) { |
|
31 | 31 | return null; |
32 | 32 | } |
33 | 33 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | public static function write(string $path, $content = null): void |
40 | 40 | { |
41 | - if (! self::$fs) { |
|
41 | + if (!self::$fs) { |
|
42 | 42 | self::$fs = new Filesystem(); |
43 | 43 | } |
44 | 44 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function __construct(array $adapterConfiguration, VariableParser $variableParser) |
16 | 16 | { |
17 | - if (! $this->isValid($adapterConfiguration)) { |
|
17 | + if (!$this->isValid($adapterConfiguration)) { |
|
18 | 18 | throw InvalidConfiguration::invalidAdapterConfiguration('filter', '`field`: `filter`'); |
19 | 19 | } |
20 | 20 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | private function setCollectionRule(): void |
41 | 41 | { |
42 | - $this->setRule(CollectionAdapter::class, function (string $adapterType, array $adapterConfiguration) { |
|
42 | + $this->setRule(CollectionAdapter::class, function(string $adapterType, array $adapterConfiguration) { |
|
43 | 43 | if ($adapterType === 'collection') { |
44 | 44 | return CollectionAdapter::make($adapterConfiguration, $this->variableParser); |
45 | 45 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | private function setFilterRule(): void |
52 | 52 | { |
53 | - $this->setRule(FilterAdapter::class, function (string $adapterType, array $adapterConfiguration) { |
|
53 | + $this->setRule(FilterAdapter::class, function(string $adapterType, array $adapterConfiguration) { |
|
54 | 54 | if ($adapterType === 'filter') { |
55 | 55 | return FilterAdapter::make($adapterConfiguration, $this->variableParser); |
56 | 56 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | private function setPaginationRule(): void |
63 | 63 | { |
64 | - $this->setRule(PaginationAdapter::class, function (string $adapterType, array $adapterConfiguration) { |
|
64 | + $this->setRule(PaginationAdapter::class, function(string $adapterType, array $adapterConfiguration) { |
|
65 | 65 | if ($adapterType === 'pagination') { |
66 | 66 | return PaginationAdapter::make($adapterConfiguration, $this->variableParser); |
67 | 67 | } |