@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | public function hasEmbeddedReferences($string) |
19 | 19 | { |
20 | 20 | $regexp = $this->getEmbeddedRegexp(); |
21 | - return (bool) preg_match_all($regexp, $string, $matches); |
|
21 | + return (bool)preg_match_all($regexp, $string, $matches); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | // we need to alter the regexp we usr for std ref resolving, as it will be used to match parts of text, not the whole string |
54 | 54 | $regexp = substr($this->getRegexp(), 1, -1); |
55 | - return '/' . preg_quote($this->beginToken). preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/'; |
|
55 | + return '/' . preg_quote($this->beginToken) . preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/'; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function setReferenceResolver(ReferenceResolverInterface $referenceResolver) |
13 | 13 | { |
14 | - if (! $referenceResolver instanceof EmbeddedReferenceResolverInterface) { |
|
14 | + if (!$referenceResolver instanceof EmbeddedReferenceResolverInterface) { |
|
15 | 15 | throw new \Exception("Reference resolver injected into EzRichText field handler should implement EmbeddedReferenceResolverInterface"); |
16 | 16 | } |
17 | 17 | parent::setReferenceResolver($referenceResolver); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function setReferenceResolver(ReferenceResolverInterface $referenceResolver) |
13 | 13 | { |
14 | - if (! $referenceResolver instanceof EmbeddedReferenceResolverInterface) { |
|
14 | + if (!$referenceResolver instanceof EmbeddedReferenceResolverInterface) { |
|
15 | 15 | throw new \Exception("Reference resolver injected into EzXmlText field handler should implement EmbeddedReferenceResolverInterface"); |
16 | 16 | } |
17 | 17 | parent::setReferenceResolver($referenceResolver); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function getReferenceValue($identifier) |
33 | 33 | { |
34 | - switch(substr($identifier, 5)) { |
|
34 | + switch (substr($identifier, 5)) { |
|
35 | 35 | case 'iteration': |
36 | 36 | return end($this->stack); |
37 | 37 | case 'depth': |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | echo 'B';*/ |
50 | 50 | |
51 | 51 | $ms->executeMigration(new MigrationDefinition( |
52 | - 'test_'.time(), |
|
52 | + 'test_' . time(), |
|
53 | 53 | '/hello', |
54 | 54 | '123', |
55 | 55 | MigrationDefinition::STATUS_PARSED, |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | |
63 | 63 | $sh = $this->getContainer()->get('ez_migration_bundle.storage_handler'); |
64 | 64 | |
65 | - $m1 = 'hello_'.time(); |
|
66 | - $m2 = 'there_'.time(); |
|
65 | + $m1 = 'hello_' . time(); |
|
66 | + $m2 = 'there_' . time(); |
|
67 | 67 | $sh->startMigration(new MigrationDefinition( |
68 | 68 | $m1, |
69 | 69 | '/hello', |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
228 | - foreach($referencesDefs as $reference) { |
|
228 | + foreach ($referencesDefs as $reference) { |
|
229 | 229 | $overwrite = false; |
230 | 230 | if (isset($reference['overwrite'])) { |
231 | 231 | $overwrite = $reference['overwrite']; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | { |
247 | 247 | // allow setting *some* refs even when we have 0 or N matches |
248 | 248 | foreach ($referencesDefinition as $key => $reference) { |
249 | - switch($reference['attribute']) { |
|
249 | + switch ($reference['attribute']) { |
|
250 | 250 | |
251 | 251 | case 'count': |
252 | 252 | $value = count($entity); |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | |
251 | 251 | // Add new attributes |
252 | - foreach($newFieldDefinitions as $newFieldDefinition) { |
|
252 | + foreach ($newFieldDefinitions as $newFieldDefinition) { |
|
253 | 253 | if ($newFieldDefinition->position == 0) { |
254 | 254 | $newFieldDefinition->position = ++$maxFieldDefinitionPos; |
255 | 255 | } |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | break; |
371 | 371 | case 'content_type_groups_ids': |
372 | 372 | $value = []; |
373 | - foreach($contentType->contentTypeGroups as $existingGroup) { |
|
373 | + foreach ($contentType->contentTypeGroups as $existingGroup) { |
|
374 | 374 | $value[] = $existingGroup->id; |
375 | 375 | } |
376 | 376 | break; |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | $contentTypeGroup = $this->contentTypeGroupMatcher->matchOneByKey($contentTypeGroupId); |
767 | 767 | $contentTypeGroupId = $contentTypeGroup->id; |
768 | 768 | |
769 | - foreach($contentType->contentTypeGroups as $existingGroup) { |
|
769 | + foreach ($contentType->contentTypeGroups as $existingGroup) { |
|
770 | 770 | if ($existingGroup->id === $contentTypeGroupId) { |
771 | 771 | return; |
772 | 772 | } |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | $contentTypeGroup = $this->contentTypeGroupMatcher->matchOneByKey($contentTypeGroupId); |
783 | 783 | $contentTypeGroupId = $contentTypeGroup->id; |
784 | 784 | |
785 | - foreach($contentType->contentTypeGroups as $existingGroup) { |
|
785 | + foreach ($contentType->contentTypeGroups as $existingGroup) { |
|
786 | 786 | if ($existingGroup->id === $contentTypeGroupId) { |
787 | 787 | $contentTypeService = $this->repository->getContentTypeService(); |
788 | 788 | $contentTypeService->unassignContentTypeGroup($contentType, $contentTypeGroup); |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | $locations = $locationService->loadLocations($content->contentInfo); |
521 | 521 | if (count($locations) > 1) { |
522 | 522 | $otherParentLocations = array(); |
523 | - foreach($locations as $otherLocation) { |
|
523 | + foreach ($locations as $otherLocation) { |
|
524 | 524 | if ($otherLocation->id != $location->id) { |
525 | 525 | $otherParentLocations[] = $otherLocation->parentLocationId; |
526 | 526 | } |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | }, |
697 | 697 | array_filter( |
698 | 698 | $this->repository->getContentLanguageService()->loadLanguages(), |
699 | - function ($language) { |
|
699 | + function($language) { |
|
700 | 700 | return $language->enabled; |
701 | 701 | } |
702 | 702 | ) |