@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | { |
94 | 94 | $expected = new MessageCatalogue(); |
95 | 95 | $fileSourceFactory = $this->getFileSourceFactory(); |
96 | - $fixtureSplInfo = new \SplFileInfo('/' . __DIR__ . '/Fixture/delete.html.twig'); // extra slash in path is necessary :( |
|
96 | + $fixtureSplInfo = new \SplFileInfo('/' . __DIR__ . '/Fixture/delete.html.twig'); // extra slash in path is necessary :( |
|
97 | 97 | |
98 | 98 | $message = new Message('Delete block position', 'zikula'); |
99 | 99 | $message->addSource($fileSourceFactory->create($fixtureSplInfo, 9)); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | private function extract($file, ZikulaTwigFileExtractor $extractor = null) |
114 | 114 | { |
115 | - if (!is_file($file = __DIR__.'/Fixture/'.$file)) { |
|
115 | + if (!is_file($file = __DIR__ . '/Fixture/' . $file)) { |
|
116 | 116 | throw new RuntimeException(sprintf('The file "%s" does not exist.', $file)); |
117 | 117 | } |
118 | 118 | $kernel = $this |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | ->getMock(); |
122 | 122 | $kernel |
123 | 123 | ->method('getBundle') |
124 | - ->will($this->returnCallback(function ($bundleName) { |
|
124 | + ->will($this->returnCallback(function($bundleName) { |
|
125 | 125 | $bundle = $this |
126 | 126 | ->getMockBuilder('Zikula\Core\AbstractBundle') |
127 | 127 | ->disableOriginalConstructor() |
@@ -110,6 +110,9 @@ |
||
110 | 110 | $this->assertEquals($expected, $this->extract('delete.html.twig')); |
111 | 111 | } |
112 | 112 | |
113 | + /** |
|
114 | + * @param string $file |
|
115 | + */ |
|
113 | 116 | private function extract($file, ZikulaTwigFileExtractor $extractor = null) |
114 | 117 | { |
115 | 118 | if (!is_file($file = __DIR__.'/Fixture/'.$file)) { |
@@ -75,7 +75,7 @@ |
||
75 | 75 | ->getMock(); |
76 | 76 | $kernel |
77 | 77 | ->method('getBundles') |
78 | - ->will($this->returnCallback(function () { |
|
78 | + ->will($this->returnCallback(function() { |
|
79 | 79 | $bundle = $this |
80 | 80 | ->getMockBuilder('Zikula\Core\AbstractBundle') |
81 | 81 | ->disableOriginalConstructor() |
@@ -29,8 +29,8 @@ |
||
29 | 29 | { |
30 | 30 | $this->tokenParser = new SwitchTokenParser(); |
31 | 31 | $this->twigParser = $this->getMockBuilder('Twig_Parser') |
32 | - ->disableOriginalConstructor() |
|
33 | - ->getMock(); |
|
32 | + ->disableOriginalConstructor() |
|
33 | + ->getMock(); |
|
34 | 34 | $this->tokenParser->setParser($this->twigParser); |
35 | 35 | } |
36 | 36 |
@@ -87,8 +87,8 @@ |
||
87 | 87 | $output->writeln(sprintf("Installing assets using the <comment>%s</comment> option", $input->getOption('symlink') ? 'symlink' : 'hard copy')); |
88 | 88 | foreach ($bundles as $bundle) { |
89 | 89 | if (is_dir($originDir = $bundle->getPath() . '/Resources/public')) { |
90 | - $bundlesDir = $targetArg . '/'.$type.'s/'; |
|
91 | - $targetDir = $bundlesDir . preg_replace('/'.$type.'$/', '', strtolower($bundle->getName())); |
|
90 | + $bundlesDir = $targetArg . '/' . $type . 's/'; |
|
91 | + $targetDir = $bundlesDir . preg_replace('/' . $type . '$/', '', strtolower($bundle->getName())); |
|
92 | 92 | $output->writeln(sprintf('Installing assets for <comment>%s</comment> into <comment>%s</comment>', $bundle->getNamespace(), $targetDir)); |
93 | 93 | $filesystem->remove($targetDir); |
94 | 94 | if ($input->getOption('symlink')) { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | <info>php %command.full_name% web --symlink --relative</info> |
58 | 58 | |
59 | -EOT |
|
59 | +eot |
|
60 | 60 | ); |
61 | 61 | } |
62 | 62 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | } |
65 | 65 | $requestUri = $event->getRequest()->getRequestUri(); |
66 | 66 | $frontController = $this->variableApi->getSystemVar('entrypoint', 'index.php'); |
67 | - $stripEntryPoint = (bool) $this->variableApi->getSystemVar('shorturlsstripentrypoint', false); |
|
67 | + $stripEntryPoint = (bool)$this->variableApi->getSystemVar('shorturlsstripentrypoint', false); |
|
68 | 68 | $containsFrontController = (strpos($requestUri, "$frontController") !== false); |
69 | 69 | |
70 | 70 | if ($containsFrontController && $stripEntryPoint) { |
@@ -110,11 +110,11 @@ discard block |
||
110 | 110 | $scripts = isset($options['scripts']) ? $options['scripts'] : []; |
111 | 111 | if (!empty($scripts)) { |
112 | 112 | // Put all scripts into a build.js file. |
113 | - $result = $this->aggregateScripts($package, $scripts, $name.DIRECTORY_SEPARATOR.$name.'-built.js'); |
|
113 | + $result = $this->aggregateScripts($package, $scripts, $name . DIRECTORY_SEPARATOR . $name . '-built.js'); |
|
114 | 114 | if ($result) { |
115 | 115 | // If the aggregation was successful, add the script to the |
116 | 116 | // packages array. |
117 | - $component['main'] = $name.'-built.js'; |
|
117 | + $component['main'] = $name . '-built.js'; |
|
118 | 118 | |
119 | 119 | // Add the component to the packages array. |
120 | 120 | $json['packages'][] = $component; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | foreach ($scripts as $script) { |
165 | 165 | // Collect each candidate from a glob file search. |
166 | - $path = $this->getVendorDir($package).DIRECTORY_SEPARATOR.$script; |
|
166 | + $path = $this->getVendorDir($package) . DIRECTORY_SEPARATOR . $script; |
|
167 | 167 | $matches = $this->fs->recursiveGlobFiles($path); |
168 | 168 | foreach ($matches as $match) { |
169 | 169 | $assets->add(new FileAsset($match)); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | // Write the file if there are any JavaScript assets. |
175 | 175 | if (!empty($js)) { |
176 | - $destination = $this->componentDir.DIRECTORY_SEPARATOR.$file; |
|
176 | + $destination = $this->componentDir . DIRECTORY_SEPARATOR . $file; |
|
177 | 177 | $this->fs->ensureDirectoryExists(dirname($destination)); |
178 | 178 | |
179 | 179 | return file_put_contents($destination, $js); |
@@ -208,7 +208,7 @@ |
||
208 | 208 | if (typeof exports !== "undefined" && typeof module !== "undefined") { |
209 | 209 | module.exports = components; |
210 | 210 | } |
211 | -EOT; |
|
211 | +eot; |
|
212 | 212 | |
213 | 213 | return $output; |
214 | 214 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | { |
44 | 44 | $text = preg_replace_callback( |
45 | 45 | '/<a [^>]*href\s*=\s*\"?([^>\"]*)\"?[^>]*>(.*?)<\/a.*?>/i', |
46 | - function ($matches) { |
|
46 | + function($matches) { |
|
47 | 47 | // @todo - work out why some links need decoding twice (&amp;....) |
48 | 48 | $this->links[] = html_entity_decode(html_entity_decode($matches[1])); |
49 | 49 | // return the replaced link |
@@ -57,7 +57,7 @@ |
||
57 | 57 | $i = 1; |
58 | 58 | foreach ($filters as $w_key => $w_value) { |
59 | 59 | $qb->andWhere($qb->expr()->eq('tbl.' . $w_key, '?' . $i)) |
60 | - ->setParameter($i, $w_value); |
|
60 | + ->setParameter($i, $w_value); |
|
61 | 61 | $i++; |
62 | 62 | } |
63 | 63 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | } |
58 | 58 | $headers = ''; |
59 | 59 | foreach ($assets as $asset) { |
60 | - $headers .= '<link rel="stylesheet" href="'.$asset.'" type="text/css">'."\n"; |
|
60 | + $headers .= '<link rel="stylesheet" href="' . $asset . '" type="text/css">' . "\n"; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | return $headers; |