@@ -100,7 +100,7 @@ |
||
| 100 | 100 | |
| 101 | 101 | private function populateBody(PackageInterface $package) |
| 102 | 102 | { |
| 103 | - return $package->getBody().' '.implode('', array_map(function (ItemInterface $item) { |
|
| 103 | + return $package->getBody().' '.implode('', array_map(function(ItemInterface $item) { |
|
| 104 | 104 | $this->ensureTypeIsAllowed($item->getType()); |
| 105 | 105 | |
| 106 | 106 | return $item->getBody(); |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | $articleMedia->setArticle($article); |
| 116 | 116 | $articleMedia->setFromItem($item); |
| 117 | 117 | |
| 118 | - if (ItemInterface::TYPE_PICTURE === $item->getType()) { |
|
| 118 | + if (ItemInterface::TYPE_PICTURE === $item->getType()) { |
|
| 119 | 119 | $this->createImageMedia($articleMedia, $item); |
| 120 | 120 | } elseif (ItemInterface::TYPE_FILE === $item->getType()) { |
| 121 | 121 | //TODO: handle files upload |
@@ -29,8 +29,8 @@ |
||
| 29 | 29 | ->add('media_id', TextType::class, [ |
| 30 | 30 | 'required' => true, |
| 31 | 31 | 'constraints' => [ |
| 32 | - new NotBlank(), |
|
| 33 | - new Length(['min' => 1]), |
|
| 32 | + new NotBlank(), |
|
| 33 | + new Length(['min' => 1]), |
|
| 34 | 34 | ], |
| 35 | 35 | ]) |
| 36 | 36 | ->add('media', FileType::class, [ |
@@ -30,21 +30,21 @@ discard block |
||
| 30 | 30 | ->add('name', TextType::class, [ |
| 31 | 31 | 'required' => true, |
| 32 | 32 | 'constraints' => [ |
| 33 | - new NotBlank(), |
|
| 34 | - new Length(['min' => 1]), |
|
| 33 | + new NotBlank(), |
|
| 34 | + new Length(['min' => 1]), |
|
| 35 | 35 | ], |
| 36 | 36 | ]) |
| 37 | 37 | ->add('type', TextType::class, [ |
| 38 | 38 | 'required' => true, |
| 39 | 39 | 'constraints' => [ |
| 40 | - new NotBlank(), |
|
| 41 | - new Length(['min' => 1]), |
|
| 40 | + new NotBlank(), |
|
| 41 | + new Length(['min' => 1]), |
|
| 42 | 42 | ], |
| 43 | 43 | ]) |
| 44 | 44 | ->add('template_name', TextType::class, [ |
| 45 | 45 | 'required' => false, |
| 46 | 46 | 'constraints' => [ |
| 47 | - new Length(['min' => 1]), |
|
| 47 | + new Length(['min' => 1]), |
|
| 48 | 48 | ], |
| 49 | 49 | ]) |
| 50 | 50 | ->add('articles_template_name', TextType::class, [ |
@@ -56,13 +56,13 @@ discard block |
||
| 56 | 56 | ->add('parent', TextType::class, [ |
| 57 | 57 | 'required' => false, |
| 58 | 58 | 'constraints' => [ |
| 59 | - new Length(['min' => 1]), |
|
| 59 | + new Length(['min' => 1]), |
|
| 60 | 60 | ], |
| 61 | 61 | ]) |
| 62 | 62 | ->add('content', TextType::class, [ |
| 63 | 63 | 'required' => false, |
| 64 | 64 | 'constraints' => [ |
| 65 | - new Length(['min' => 1]), |
|
| 65 | + new Length(['min' => 1]), |
|
| 66 | 66 | ], |
| 67 | 67 | 'description' => 'Content path name e.g.: test-content-article', |
| 68 | 68 | ]) |
@@ -28,14 +28,14 @@ |
||
| 28 | 28 | ->add('status', TextType::class, [ |
| 29 | 29 | 'required' => true, |
| 30 | 30 | 'constraints' => [ |
| 31 | - new NotBlank(), |
|
| 32 | - new Length(['min' => 1]), |
|
| 31 | + new NotBlank(), |
|
| 32 | + new Length(['min' => 1]), |
|
| 33 | 33 | ], |
| 34 | 34 | ]) |
| 35 | 35 | ->add('template_name', TextType::class, [ |
| 36 | 36 | 'required' => true, |
| 37 | 37 | 'constraints' => [ |
| 38 | - new Length(['min' => 1]), |
|
| 38 | + new Length(['min' => 1]), |
|
| 39 | 39 | ], |
| 40 | 40 | ]); |
| 41 | 41 | } |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | public static function getSubscribedEvents() |
| 36 | 36 | { |
| 37 | 37 | return [ |
| 38 | - HttpCacheEvent::EVENT_NAME => [ |
|
| 39 | - ['clearCache', 0], |
|
| 40 | - ], |
|
| 41 | - ]; |
|
| 38 | + HttpCacheEvent::EVENT_NAME => [ |
|
| 39 | + ['clearCache', 0], |
|
| 40 | + ], |
|
| 41 | + ]; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function clearCache(HttpCacheEvent $event) |
@@ -35,14 +35,14 @@ |
||
| 35 | 35 | 'required' => false, |
| 36 | 36 | ]) |
| 37 | 37 | ->addModelTransformer(new CallbackTransformer( |
| 38 | - function ($originalDescription) { |
|
| 38 | + function($originalDescription) { |
|
| 39 | 39 | if ($originalDescription && is_array($originalDescription->getParameters())) { |
| 40 | 40 | $originalDescription->setParameters(json_encode($originalDescription->getParameters())); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $originalDescription; |
| 44 | 44 | }, |
| 45 | - function ($submittedDescription) { |
|
| 45 | + function($submittedDescription) { |
|
| 46 | 46 | if ($submittedDescription && is_string($submittedDescription->getParameters())) { |
| 47 | 47 | $submittedDescription->setParameters(json_decode($submittedDescription->getParameters(), true)); |
| 48 | 48 | } elseif ($submittedDescription && !is_array($submittedDescription->getParameters())) { |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | |
| 107 | 107 | $tenant = reset($tenants); |
| 108 | 108 | if ($numTenants > 1) { |
| 109 | - $tenantNames = array_map(function ($tenant) { |
|
| 109 | + $tenantNames = array_map(function($tenant) { |
|
| 110 | 110 | return $tenant->getName(); |
| 111 | 111 | }, $tenants); |
| 112 | 112 | |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | { |
| 65 | 65 | $stringyClass = new \ReflectionClass('Stringy\Stringy'); |
| 66 | 66 | $methods = $stringyClass->getMethods(\ReflectionMethod::IS_PUBLIC); |
| 67 | - $names = array_map(function ($value) { |
|
| 67 | + $names = array_map(function($value) { |
|
| 68 | 68 | return $value->getName(); |
| 69 | 69 | }, $methods); |
| 70 | 70 | |