@@ -21,8 +21,6 @@ |
||
| 21 | 21 | * Decide based on the current date and time what the vote should be. Static so it's strategy can easily be accessed |
| 22 | 22 | * by other components as well, without the actual need for the voter instance. |
| 23 | 23 | * |
| 24 | - * @param \DateTime $scheduledFrom |
|
| 25 | - * @param \DateTime $scheduledTill |
|
| 26 | 24 | * @return int |
| 27 | 25 | */ |
| 28 | 26 | public static function decide(ScheduledContentInterface $object) |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | ->method('getContentItems') |
| 53 | 53 | ->will( |
| 54 | 54 | $this->returnCallback( |
| 55 | - function () use (&$recorded, $pageUnderTest, $region) { |
|
| 55 | + function() use (&$recorded, $pageUnderTest, $region) { |
|
| 56 | 56 | $args = func_get_args(); |
| 57 | - $recorded[]= $args; |
|
| 57 | + $recorded[] = $args; |
|
| 58 | 58 | $ret = call_user_func_array(array($pageUnderTest, 'getContentItems'), $args); |
| 59 | 59 | return $ret; |
| 60 | 60 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ->method('getTemplateName') |
| 66 | 66 | ->will( |
| 67 | 67 | $this->returnCallback( |
| 68 | - function () use ($pageUnderTest) { |
|
| 68 | + function() use ($pageUnderTest) { |
|
| 69 | 69 | return $pageUnderTest->getTemplateName(); |
| 70 | 70 | } |
| 71 | 71 | ) |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $called = array(); |
| 79 | 79 | foreach ($recorded as $calls) { |
| 80 | - $called[]= $calls[0]; |
|
| 80 | + $called[] = $calls[0]; |
|
| 81 | 81 | } |
| 82 | 82 | $this->assertContains($region, $called); |
| 83 | 83 | } |
@@ -100,13 +100,13 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | /** @var ContentItemMatrix $matrix */ |
| 102 | 102 | if (!$matrix) { |
| 103 | - $ret[]= array($name, $pageClassName); |
|
| 103 | + $ret[] = array($name, $pageClassName); |
|
| 104 | 104 | continue; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | foreach ($matrix->getTypes() as $contentItemClassName) { |
| 108 | 108 | foreach ($matrix->getRegions($contentItemClassName) as $region) { |
| 109 | - $ret[]= array($name, $pageClassName, $region, $contentItemClassName); |
|
| 109 | + $ret[] = array($name, $pageClassName, $region, $contentItemClassName); |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | /** @var $em \Doctrine\ORM\EntityManager */ |
| 44 | 44 | $em = $this->doctrine->getManager(); |
| 45 | 45 | |
| 46 | - $choiceCallback = function (Options $options) use ($em) { |
|
| 46 | + $choiceCallback = function(Options $options) use ($em) { |
|
| 47 | 47 | $ret = array(); |
| 48 | 48 | foreach ($em->getClassMetadata($options['entity'])->discriminatorMap as $className) { |
| 49 | 49 | $placeholder = 'content_item.type.' . strtolower(str_replace(' ', '_', Str::humanize(Str::classname($className)))); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | if ($options['container']) { |
| 60 | 60 | $page = $options['container']; |
| 61 | - $choiceFilter = function ($choices) use ($page) { |
|
| 61 | + $choiceFilter = function($choices) use ($page) { |
|
| 62 | 62 | $ret = array(); |
| 63 | 63 | if ($page instanceof ContentItemContainer && null !== $page->getContentItemMatrix()) { |
| 64 | 64 | $types = $page->getContentItemMatrix()->getTypes(); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | try { |
| 108 | 108 | if ($typeAdmin = $this->sonata->getAdminByClass(get_class($subject))) { |
| 109 | - $view->vars['type']= Str::humanize(Str::classname($subject->getConvertToType())); |
|
| 109 | + $view->vars['type'] = Str::humanize(Str::classname($subject->getConvertToType())); |
|
| 110 | 110 | $childAdmin = $this->sonata->getAdminByAdminCode($parentAdmin->getCode() . '|' . $typeAdmin->getCode()); |
| 111 | 111 | $childAdmin->setRequest($genericAdmin->getRequest()); |
| 112 | 112 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | return; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - $naming = function ($fqEntityClassName) { |
|
| 30 | + $naming = function($fqEntityClassName) { |
|
| 31 | 31 | return |
| 32 | 32 | str_replace( |
| 33 | 33 | '\\Entity\\', |
@@ -71,14 +71,14 @@ discard block |
||
| 71 | 71 | $tags['sonata.admin'][0]['label'] = Str::rstrip(Str::classname($entityClassName), 'Page'); |
| 72 | 72 | $adminService->setTags($tags); |
| 73 | 73 | |
| 74 | - $id = $baseIds[$type]. '.' . Str::uscore(Str::classname($entityClassName)); |
|
| 74 | + $id = $baseIds[$type] . '.' . Str::uscore(Str::classname($entityClassName)); |
|
| 75 | 75 | |
| 76 | 76 | $adminService->replaceArgument(0, $id); |
| 77 | 77 | $adminService->replaceArgument(1, $entityClassName); |
| 78 | 78 | |
| 79 | 79 | $container->setDefinition($id, $adminService); |
| 80 | 80 | |
| 81 | - $serviceDefs[$type][]= $id; |
|
| 81 | + $serviceDefs[$type][] = $id; |
|
| 82 | 82 | } else { |
| 83 | 83 | throw new \Exception(sprintf('The PageBundle was unable to create a service definition for %s because the associated class %s was not found', $entityClassName, $adminClassName)); |
| 84 | 84 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $configuration = new Configuration(); |
| 28 | 28 | $config = $this->processConfiguration($configuration, $configs); |
| 29 | 29 | |
| 30 | - $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 30 | + $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 31 | 31 | $loader->load('services.xml'); |
| 32 | 32 | |
| 33 | 33 | if (true === $config['aliasing']['enabled']) { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | if ($container->hasParameter('twig.form.resources')) { |
| 73 | 73 | $formResources = $container->getParameter('twig.form.resources'); |
| 74 | - $formResources[]= 'ZichtPageBundle::form_theme.html.twig'; |
|
| 74 | + $formResources[] = 'ZichtPageBundle::form_theme.html.twig'; |
|
| 75 | 75 | $container->setParameter('twig.form.resources', $formResources); |
| 76 | 76 | } |
| 77 | 77 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | if (null !== $idx) { |
| 39 | 39 | array_splice($beforeOptimizationPasses, $idx, 0, array($generatorPass)); |
| 40 | 40 | } else { |
| 41 | - $beforeOptimizationPasses[]= $generatorPass; |
|
| 41 | + $beforeOptimizationPasses[] = $generatorPass; |
|
| 42 | 42 | } |
| 43 | 43 | $container->getCompilerPassConfig()->setBeforeOptimizationPasses($beforeOptimizationPasses); |
| 44 | 44 | } |
@@ -69,10 +69,10 @@ |
||
| 69 | 69 | foreach ($records as $record) { |
| 70 | 70 | $table->addRow( |
| 71 | 71 | [ |
| 72 | - $record['public_url'], |
|
| 73 | - $record['internal_url'], |
|
| 74 | - $record['page_id'], |
|
| 75 | - $record['original_page_id'], |
|
| 72 | + $record['public_url'], |
|
| 73 | + $record['internal_url'], |
|
| 74 | + $record['page_id'], |
|
| 75 | + $record['original_page_id'], |
|
| 76 | 76 | ] |
| 77 | 77 | ); |
| 78 | 78 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | implode( |
| 90 | 90 | '", "', |
| 91 | 91 | array_map( |
| 92 | - function ($name) use ($matrix) { |
|
| 92 | + function($name) use ($matrix) { |
|
| 93 | 93 | return $this->getShortName($name, $matrix->getNamespacePrefix()); |
| 94 | 94 | }, |
| 95 | 95 | $matrix->getTypes($contentitem->getRegion()) |