@@ -88,7 +88,7 @@ |
||
| 88 | 88 | |
| 89 | 89 | $this->eventDispatcher->dispatch(SculpinEvents::EVENT_BEFORE_RUN, new SourceSetEvent($sourceSet)); |
| 90 | 90 | |
| 91 | - if ($updatedSources = array_filter($sourceSet->updatedSources(), function ($source) { |
|
| 91 | + if ($updatedSources = array_filter($sourceSet->updatedSources(), function($source) { |
|
| 92 | 92 | return !$source->isGenerated(); |
| 93 | 93 | })) { |
| 94 | 94 | if (!$found) { |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | // We have special sorting rules for our items based on the date |
| 21 | 21 | // and title. This assumes that the items are actually Post instances. |
| 22 | - uasort($this->items, function ($a, $b) { |
|
| 22 | + uasort($this->items, function($a, $b) { |
|
| 23 | 23 | return strnatcmp($b->date().' '.$b->title(), $a->date().' '.$a->title()); |
| 24 | 24 | }); |
| 25 | 25 | parent::init(); |
@@ -17,11 +17,8 @@ |
||
| 17 | 17 | use Symplify\PHP7_Sculpin\Bundle\PostsBundle\SculpinPostsBundle; |
| 18 | 18 | use Symplify\PHP7_Sculpin\Bundle\SculpinBundle\SculpinBundle; |
| 19 | 19 | use Symplify\PHP7_Sculpin\Bundle\TwigBundle\SculpinTwigBundle; |
| 20 | -use Symfony\Component\Config\FileLocator; |
|
| 21 | 20 | use Symfony\Component\Config\Loader\LoaderInterface; |
| 22 | -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; |
|
| 23 | 21 | use Symfony\Component\HttpKernel\Kernel; |
| 24 | -use Symplify\DefaultAutowire\SymplifyDefaultAutowireBundle; |
|
| 25 | 22 | |
| 26 | 23 | abstract class AbstractKernel extends Kernel |
| 27 | 24 | { |
@@ -39,14 +39,14 @@ discard block |
||
| 39 | 39 | $definition = $containerBuilder->getDefinition('sculpin_posts.posts_map'); |
| 40 | 40 | foreach ($containerBuilder->findByTag('sculpin_posts.posts_map') as $id => $tagAttributes) { |
| 41 | 41 | foreach ($tagAttributes as $attributes) { |
| 42 | - $definition->addSetup('addMap', ['@' . $id]); |
|
| 42 | + $definition->addSetup('addMap', ['@'.$id]); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $definition = $containerBuilder->getDefinition('sculpin.converter_manager'); |
| 47 | 47 | foreach ($containerBuilder->findByTag('sculpin.converter') as $id => $tagAttributes) { |
| 48 | 48 | foreach ($tagAttributes as $attributes) { |
| 49 | - $definition->addSetup('registerConverter', [$attributes['alias'], '@' . $id] |
|
| 49 | + $definition->addSetup('registerConverter', [$attributes['alias'], '@'.$id] |
|
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | foreach ($data as $type => $extensions) { |
| 78 | - $data[$type] = array_filter($extensions, function ($var) { |
|
| 78 | + $data[$type] = array_filter($extensions, function($var) { |
|
| 79 | 79 | return strlen($var) > 0; |
| 80 | 80 | }); |
| 81 | 81 | } |
@@ -86,20 +86,20 @@ discard block |
||
| 86 | 86 | $definition = $containerBuilder->getDefinition('sculpin.formatter_manager'); |
| 87 | 87 | foreach ($containerBuilder->findByTag('sculpin.formatter') as $id => $tagAttributes) { |
| 88 | 88 | foreach ($tagAttributes as $attributes) { |
| 89 | - $definition->addSetup('registerFormatter', [$attributes['alias'], '@' . $id]); |
|
| 89 | + $definition->addSetup('registerFormatter', [$attributes['alias'], '@'.$id]); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | $definition = $containerBuilder->getDefinition('sculpin.generator_manager'); |
| 94 | 94 | foreach ($containerBuilder->findByTag('sculpin.generator') as $id => $tagAttributes) { |
| 95 | 95 | foreach ($tagAttributes as $attributes) { |
| 96 | - $definition->addSetup('registerGenerator', [$attributes['alias'], '@' . $id]); |
|
| 96 | + $definition->addSetup('registerGenerator', [$attributes['alias'], '@'.$id]); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | $definition = $containerBuilder->getDefinition('sculpin.data_source'); |
| 101 | 101 | foreach ($containerBuilder->findByTag('sculpin.data_source') as $id => $tagAttributes) { |
| 102 | - $definition->addSetup('addDataSource', ['@' . $id]); |
|
| 102 | + $definition->addSetup('addDataSource', ['@'.$id]); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | $definition = $containerBuilder->getDefinition('event_dispatcher'); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $calls = $definition->getMethodCalls(); |
| 119 | 119 | $definition->setMethodCalls([]); |
| 120 | 120 | foreach ($containerBuilder->findByTag('twig.extension') as $id => $attributes) { |
| 121 | - $definition->addSetup('addExtension', ['@' . $id]); |
|
| 121 | + $definition->addSetup('addExtension', ['@'.$id]); |
|
| 122 | 122 | } |
| 123 | 123 | $definition->setMethodCalls(array_merge($definition->getMethodCalls(), $calls)); |
| 124 | 124 | |
@@ -131,11 +131,11 @@ discard block |
||
| 131 | 131 | $prependedLoaders = []; |
| 132 | 132 | $appendedLoaders = []; |
| 133 | 133 | foreach ($containerBuilder->findByTag('twig.loaders.prepend') as $id => $attributes) { |
| 134 | - $prependedLoaders[] = '@' . $id; |
|
| 134 | + $prependedLoaders[] = '@'.$id; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | foreach ($containerBuilder->findByTag('twig.loaders.append') as $id => $attributes) { |
| 138 | - $appendedLoaders[] = '@' . $id; |
|
| 138 | + $appendedLoaders[] = '@'.$id; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | $parameters = $containerBuilder->parameters; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | foreach ($parameters['kernel.bundles'] as $class) { |
| 144 | 144 | $reflection = new \ReflectionClass($class); |
| 145 | 145 | foreach ($sourceViewPaths as $sourceViewPath) { |
| 146 | - if (is_dir($dir = dirname($reflection->getFilename()) . '/Resources/' . $sourceViewPath)) { |
|
| 146 | + if (is_dir($dir = dirname($reflection->getFilename()).'/Resources/'.$sourceViewPath)) { |
|
| 147 | 147 | $appendedLoaders[] = $dir; |
| 148 | 148 | } |
| 149 | 149 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | foreach ($containerBuilder->findByTag('sculpin.data_provider') as $id => $tagAttributes) { |
| 159 | 159 | foreach ($tagAttributes as $attributes) { |
| 160 | - $definition->addSetup('registerDataProvider', [$attributes['alias'], '@' . $id]); |
|
| 160 | + $definition->addSetup('registerDataProvider', [$attributes['alias'], '@'.$id]); |
|
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | private function createAndReturnTempDir() : string |
| 27 | 27 | { |
| 28 | - $tempDir = sys_get_temp_dir() . '/php7_sculpin'; |
|
| 28 | + $tempDir = sys_get_temp_dir().'/php7_sculpin'; |
|
| 29 | 29 | FileSystem::delete($tempDir); |
| 30 | 30 | FileSystem::createDir($tempDir); |
| 31 | 31 | return $tempDir; |