@@ -19,19 +19,19 @@ |
||
19 | 19 | $rootNode = $treeBuilder->root('basster_legacy_bridge'); |
20 | 20 | |
21 | 21 | $rootNode |
22 | - ->children() |
|
23 | - ->scalarNode('legacy_path') |
|
24 | - ->defaultValue('/path/to/my/legacy/project/files') |
|
25 | - ->end() |
|
26 | - ->scalarNode('append_script') |
|
27 | - ->info('optional append script (see http://php.net/manual/en/ini.core.php#ini.auto-append-file)') |
|
28 | - ->defaultNull() |
|
29 | - ->end() |
|
30 | - ->scalarNode('prepend_script') |
|
31 | - ->info('optional prepend script (see http://php.net/manual/en/ini.core.php#ini.auto-prepend-file)') |
|
32 | - ->defaultNull() |
|
33 | - ->end() |
|
34 | - ->end() |
|
22 | + ->children() |
|
23 | + ->scalarNode('legacy_path') |
|
24 | + ->defaultValue('/path/to/my/legacy/project/files') |
|
25 | + ->end() |
|
26 | + ->scalarNode('append_script') |
|
27 | + ->info('optional append script (see http://php.net/manual/en/ini.core.php#ini.auto-append-file)') |
|
28 | + ->defaultNull() |
|
29 | + ->end() |
|
30 | + ->scalarNode('prepend_script') |
|
31 | + ->info('optional prepend script (see http://php.net/manual/en/ini.core.php#ini.auto-prepend-file)') |
|
32 | + ->defaultNull() |
|
33 | + ->end() |
|
34 | + ->end() |
|
35 | 35 | ; |
36 | 36 | |
37 | 37 | return $treeBuilder; |
@@ -16,31 +16,31 @@ |
||
16 | 16 | { |
17 | 17 | /** {@inheritdoc} */ |
18 | 18 | protected function loadInternal( |
19 | - array $mergedConfig, |
|
20 | - ContainerBuilder $container |
|
19 | + array $mergedConfig, |
|
20 | + ContainerBuilder $container |
|
21 | 21 | ) { |
22 | 22 | $container->getParameterBag() |
23 | - ->set( |
|
23 | + ->set( |
|
24 | 24 | 'basster_legacy_bridge.legacy_path', |
25 | 25 | $mergedConfig['legacy_path'] |
26 | - ) |
|
26 | + ) |
|
27 | 27 | ; |
28 | 28 | $container->getParameterBag() |
29 | - ->set( |
|
29 | + ->set( |
|
30 | 30 | 'basster_legacy_bridge.prepend_script', |
31 | 31 | $mergedConfig['prepend_script'] |
32 | - ) |
|
32 | + ) |
|
33 | 33 | ; |
34 | 34 | $container->getParameterBag() |
35 | - ->set( |
|
35 | + ->set( |
|
36 | 36 | 'basster_legacy_bridge.append_script', |
37 | 37 | $mergedConfig['append_script'] |
38 | - ) |
|
38 | + ) |
|
39 | 39 | ; |
40 | 40 | |
41 | 41 | $loader = new Loader\XmlFileLoader( |
42 | - $container, |
|
43 | - new FileLocator(__DIR__ . '/../Resources/config') |
|
42 | + $container, |
|
43 | + new FileLocator(__DIR__ . '/../Resources/config') |
|
44 | 44 | ); |
45 | 45 | $loader->load('services.xml'); |
46 | 46 | } |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | $this->finder = $finder ?: new Finder(); |
36 | 36 | $this->finder->ignoreDotFiles(true) |
37 | - ->files() |
|
38 | - ->name('*.php') |
|
39 | - ->in($legacyPath) |
|
37 | + ->files() |
|
38 | + ->name('*.php') |
|
39 | + ->in($legacyPath) |
|
40 | 40 | ; |
41 | 41 | } |
42 | 42 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $routes = new RouteCollection(); |
51 | 51 | |
52 | 52 | $defaults = array( |
53 | - '_controller' => 'basster_legacy_bridge.legacy_controller:runLegacyScript', |
|
53 | + '_controller' => 'basster_legacy_bridge.legacy_controller:runLegacyScript', |
|
54 | 54 | ); |
55 | 55 | |
56 | 56 | /** @var SplFileInfo $file */ |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | { |
77 | 77 | return 'basster.legacy.' . |
78 | 78 | str_replace( |
79 | - '/', |
|
80 | - '__', |
|
81 | - substr($file->getRelativePathname(), 0, -4) |
|
79 | + '/', |
|
80 | + '__', |
|
81 | + substr($file->getRelativePathname(), 0, -4) |
|
82 | 82 | ); |
83 | 83 | } |
84 | 84 |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | * @dataProvider provideConfigs |
14 | 14 | */ |
15 | 15 | public function setLegacyPath( |
16 | - array $config, |
|
17 | - $path, |
|
18 | - $prepend = null, |
|
19 | - $append = null |
|
16 | + array $config, |
|
17 | + $path, |
|
18 | + $prepend = null, |
|
19 | + $append = null |
|
20 | 20 | ) { |
21 | 21 | $bag = new ParameterBag(); |
22 | 22 | |
@@ -24,19 +24,19 @@ discard block |
||
24 | 24 | $extension->load($config, new ContainerBuilder($bag)); |
25 | 25 | |
26 | 26 | self::assertEquals($path, |
27 | - $bag->get('basster_legacy_bridge.legacy_path')); |
|
27 | + $bag->get('basster_legacy_bridge.legacy_path')); |
|
28 | 28 | self::assertEquals($prepend, |
29 | - $bag->get('basster_legacy_bridge.prepend_script')); |
|
29 | + $bag->get('basster_legacy_bridge.prepend_script')); |
|
30 | 30 | self::assertEquals($append, |
31 | - $bag->get('basster_legacy_bridge.append_script')); |
|
31 | + $bag->get('basster_legacy_bridge.append_script')); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function provideConfigs() |
35 | 35 | { |
36 | 36 | $pathOnly = array( |
37 | - 'basster_legacy_bridge' => array( |
|
37 | + 'basster_legacy_bridge' => array( |
|
38 | 38 | 'legacy_path' => __DIR__, |
39 | - ), |
|
39 | + ), |
|
40 | 40 | ); |
41 | 41 | |
42 | 42 | $prependOnly = $pathOnly; |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | $all['basster_legacy_bridge']['prepend_script'] = __FILE__; |
51 | 51 | |
52 | 52 | return array( |
53 | - 'path-only' => array($pathOnly, __DIR__, null, null), |
|
54 | - 'with-prepend-only' => array($prependOnly, __DIR__, __FILE__, null), |
|
55 | - 'with-append-only' => array($appendOnly, __DIR__, null, __FILE__), |
|
56 | - 'all' => array($all, __DIR__, __FILE__, __FILE__), |
|
53 | + 'path-only' => array($pathOnly, __DIR__, null, null), |
|
54 | + 'with-prepend-only' => array($prependOnly, __DIR__, __FILE__, null), |
|
55 | + 'with-append-only' => array($appendOnly, __DIR__, null, __FILE__), |
|
56 | + 'all' => array($all, __DIR__, __FILE__, __FILE__), |
|
57 | 57 | ); |
58 | 58 | } |
59 | 59 | } |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | $legacyPathNode = $this->getChildNode('legacy_path'); |
27 | 27 | |
28 | 28 | self::assertEquals( |
29 | - '/path/to/my/legacy/project/files', |
|
30 | - $legacyPathNode->getDefaultValue() |
|
29 | + '/path/to/my/legacy/project/files', |
|
30 | + $legacyPathNode->getDefaultValue() |
|
31 | 31 | ); |
32 | 32 | } |
33 | 33 | |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | public function provideNullDefaultNodes() |
61 | 61 | { |
62 | 62 | return array( |
63 | - 'append_script' => array('append_script'), |
|
64 | - 'prepend_script' => array('prepend_script'), |
|
63 | + 'append_script' => array('append_script'), |
|
64 | + 'prepend_script' => array('prepend_script'), |
|
65 | 65 | ); |
66 | 66 | } |
67 | 67 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | self::assertNotNull($legacyRoute); |
28 | 28 | self::assertEquals($routePath, $legacyRoute->getPath()); |
29 | 29 | self::assertEquals($this->legacyFile->url(), |
30 | - $legacyRoute->getDefault('legacyScript')); |
|
30 | + $legacyRoute->getDefault('legacyScript')); |
|
31 | 31 | self::assertEquals($routePath, $legacyRoute->getDefault('requestPath')); |
32 | 32 | } |
33 | 33 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function supportsLegacyType() |
49 | 49 | { |
50 | 50 | self::assertTrue( |
51 | - $this->routeLoader->supports("don't mind...", 'legacy') |
|
51 | + $this->routeLoader->supports("don't mind...", 'legacy') |
|
52 | 52 | ); |
53 | 53 | } |
54 | 54 |
@@ -36,13 +36,13 @@ |
||
36 | 36 | private function doRunLegacyScript() |
37 | 37 | { |
38 | 38 | $streamedResponse = $this->controller->runLegacyScript( |
39 | - $this->legacyFile->getPathname(), |
|
40 | - $this->legacyFile->getRelativePathname() |
|
39 | + $this->legacyFile->getPathname(), |
|
40 | + $this->legacyFile->getRelativePathname() |
|
41 | 41 | ); |
42 | 42 | |
43 | 43 | self::assertInstanceOf( |
44 | - 'Symfony\Component\HttpFoundation\StreamedResponse', |
|
45 | - $streamedResponse |
|
44 | + 'Symfony\Component\HttpFoundation\StreamedResponse', |
|
45 | + $streamedResponse |
|
46 | 46 | ); |
47 | 47 | |
48 | 48 | $streamedResponse->sendContent(); |
@@ -37,11 +37,11 @@ |
||
37 | 37 | $append = $this->appendScript; |
38 | 38 | |
39 | 39 | $requireLegacyScript = function () use ( |
40 | - $requestPath, |
|
41 | - $legacyScript, |
|
42 | - $container, |
|
43 | - $prepend, |
|
44 | - $append |
|
40 | + $requestPath, |
|
41 | + $legacyScript, |
|
42 | + $container, |
|
43 | + $prepend, |
|
44 | + $append |
|
45 | 45 | ) { |
46 | 46 | $_SERVER['PHP_SELF'] = $requestPath; |
47 | 47 | $_SERVER['SCRIPT_NAME'] = $requestPath; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $prepend = $this->prependScript; |
37 | 37 | $append = $this->appendScript; |
38 | 38 | |
39 | - $requireLegacyScript = function () use ( |
|
39 | + $requireLegacyScript = function() use ( |
|
40 | 40 | $requestPath, |
41 | 41 | $legacyScript, |
42 | 42 | $container, |