@@ -37,14 +37,14 @@ |
||
| 37 | 37 | 'required' => false, |
| 38 | 38 | ]) |
| 39 | 39 | ->addModelTransformer(new CallbackTransformer( |
| 40 | - function ($originalDescription) { |
|
| 40 | + function($originalDescription) { |
|
| 41 | 41 | if ($originalDescription && is_array($originalDescription->getParameters())) { |
| 42 | 42 | $originalDescription->setParameters(json_encode($originalDescription->getParameters())); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | return $originalDescription; |
| 46 | 46 | }, |
| 47 | - function ($submittedDescription) { |
|
| 47 | + function($submittedDescription) { |
|
| 48 | 48 | if ($submittedDescription && is_string($submittedDescription->getParameters())) { |
| 49 | 49 | $submittedDescription->setParameters(json_decode($submittedDescription->getParameters(), true)); |
| 50 | 50 | } elseif ($submittedDescription && !is_array($submittedDescription->getParameters())) { |
@@ -34,10 +34,10 @@ |
||
| 34 | 34 | public static function getSubscribedEvents() |
| 35 | 35 | { |
| 36 | 36 | return [ |
| 37 | - HttpCacheEvent::EVENT_NAME => [ |
|
| 38 | - ['clearCache', 0], |
|
| 39 | - ], |
|
| 40 | - ]; |
|
| 37 | + HttpCacheEvent::EVENT_NAME => [ |
|
| 38 | + ['clearCache', 0], |
|
| 39 | + ], |
|
| 40 | + ]; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function clearCache(HttpCacheEvent $event) |
@@ -49,17 +49,17 @@ |
||
| 49 | 49 | public function getFilters() |
| 50 | 50 | { |
| 51 | 51 | return [ |
| 52 | - new \Twig_SimpleFilter('start', function ($context, $node, $value) { |
|
| 52 | + new \Twig_SimpleFilter('start', function($context, $node, $value) { |
|
| 53 | 53 | $node['_collection_type_filters']['start'] = $value; |
| 54 | 54 | |
| 55 | 55 | return $node; |
| 56 | 56 | }, ['needs_context' => true]), |
| 57 | - new \Twig_SimpleFilter('limit', function ($context, $node, $value) { |
|
| 57 | + new \Twig_SimpleFilter('limit', function($context, $node, $value) { |
|
| 58 | 58 | $node['_collection_type_filters']['limit'] = $value; |
| 59 | 59 | |
| 60 | 60 | return $node; |
| 61 | 61 | }, ['needs_context' => true]), |
| 62 | - new \Twig_SimpleFilter('order', function ($context, $node, $value1, $value2) { |
|
| 62 | + new \Twig_SimpleFilter('order', function($context, $node, $value1, $value2) { |
|
| 63 | 63 | $node['_collection_type_filters']['order'] = [$value1, $value2]; |
| 64 | 64 | |
| 65 | 65 | return $node; |
@@ -28,33 +28,33 @@ |
||
| 28 | 28 | ->add('name', 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('type', TextType::class, [ |
| 36 | 36 | 'required' => true, |
| 37 | 37 | 'constraints' => [ |
| 38 | - new NotBlank(), |
|
| 39 | - new Length(['min' => 1]), |
|
| 38 | + new NotBlank(), |
|
| 39 | + new Length(['min' => 1]), |
|
| 40 | 40 | ], |
| 41 | 41 | ]) |
| 42 | 42 | ->add('template_name', TextType::class, [ |
| 43 | 43 | 'required' => false, |
| 44 | 44 | 'constraints' => [ |
| 45 | - new Length(['min' => 1]), |
|
| 45 | + new Length(['min' => 1]), |
|
| 46 | 46 | ], |
| 47 | 47 | ]) |
| 48 | 48 | ->add('parent', TextType::class, [ |
| 49 | 49 | 'required' => false, |
| 50 | 50 | 'constraints' => [ |
| 51 | - new Length(['min' => 1]), |
|
| 51 | + new Length(['min' => 1]), |
|
| 52 | 52 | ], |
| 53 | 53 | ]) |
| 54 | 54 | ->add('content', TextType::class, [ |
| 55 | 55 | 'required' => false, |
| 56 | 56 | 'constraints' => [ |
| 57 | - new Length(['min' => 1]), |
|
| 57 | + new Length(['min' => 1]), |
|
| 58 | 58 | ], |
| 59 | 59 | 'description' => 'Content path name e.g.: test-content-article', |
| 60 | 60 | ]); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | public function getMatchers() |
| 62 | 62 | { |
| 63 | 63 | return [ |
| 64 | - 'haveParameterName' => function (Parameter $parameter, $expectedName) { |
|
| 64 | + 'haveParameterName' => function(Parameter $parameter, $expectedName) { |
|
| 65 | 65 | return (string) $parameter === $expectedName; |
| 66 | 66 | }, |
| 67 | 67 | ]; |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | public function getMatchers() |
| 62 | 62 | { |
| 63 | 63 | return [ |
| 64 | - 'haveParameterName' => function (Parameter $parameter, $expectedName) { |
|
| 64 | + 'haveParameterName' => function(Parameter $parameter, $expectedName) { |
|
| 65 | 65 | return (string) $parameter === $expectedName; |
| 66 | 66 | }, |
| 67 | 67 | ]; |
@@ -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 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | public function getMatchers() |
| 43 | 43 | { |
| 44 | 44 | return [ |
| 45 | - 'haveLength' => function ($subject, $length) { |
|
| 45 | + 'haveLength' => function($subject, $length) { |
|
| 46 | 46 | return $length === strlen($subject); |
| 47 | 47 | }, |
| 48 | 48 | ]; |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | ->add('media_id', 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('media', FileType::class, [ |