@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare (strict_types=1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Tardigrades\SectionField\Service; |
6 | 6 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | string $enabled = 'false' |
49 | 49 | ) { |
50 | 50 | $this->cache = $cache; |
51 | - $this->enabled = $enabled === 'false' ? false : true ; |
|
51 | + $this->enabled = $enabled === 'false' ? false : true; |
|
52 | 52 | $this->item = null; |
53 | 53 | $this->sectionHandle = null; |
54 | 54 | $this->fieldKey = null; |
@@ -68,14 +68,14 @@ discard block |
||
68 | 68 | try { |
69 | 69 | $this->item = $this->cache->getItem( |
70 | 70 | $this->getItemKey( |
71 | - (string)$fullyQualifiedClassName, |
|
71 | + (string) $fullyQualifiedClassName, |
|
72 | 72 | $requestedFields, |
73 | 73 | $context, |
74 | 74 | $id |
75 | 75 | ) |
76 | 76 | ); |
77 | 77 | $this->context = sha1($context); |
78 | - $this->sectionHandle = sha1((string)$fullyQualifiedClassName); |
|
78 | + $this->sectionHandle = sha1((string) $fullyQualifiedClassName); |
|
79 | 79 | $this->fieldKey = $this->getFieldKey($requestedFields); |
80 | 80 | $this->relationships = $this->getRelationships($fullyQualifiedClassName); |
81 | 81 | } catch (\Exception $exception) { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | public function invalidateForSection(FullyQualifiedClassName $fullyQualifiedClassName): void |
130 | 130 | { |
131 | 131 | if ($this->enabled) { |
132 | - $this->cache->invalidateTags([sha1((string)$fullyQualifiedClassName)]); |
|
132 | + $this->cache->invalidateTags([sha1((string) $fullyQualifiedClassName)]); |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | private function getRelationships(FullyQualifiedClassName $fullyQualifiedClassName): array |
215 | 215 | { |
216 | - $fields = (string)$fullyQualifiedClassName; |
|
216 | + $fields = (string) $fullyQualifiedClassName; |
|
217 | 217 | if (!is_subclass_of($fields, CommonSectionInterface::class)) { |
218 | 218 | throw new NotASexyFieldEntityException; |
219 | 219 | } |