@@ -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 | } |
@@ -11,11 +11,11 @@ |
||
11 | 11 | |
12 | 12 | namespace Zikula\Composer\Process; |
13 | 13 | |
14 | -use ComponentInstaller\Process\Process; |
|
15 | -use Assetic\Asset\StringAsset; |
|
16 | -use Composer\Json\JsonFile; |
|
17 | 14 | use Assetic\Asset\AssetCollection; |
18 | 15 | use Assetic\Asset\FileAsset; |
16 | +use Assetic\Asset\StringAsset; |
|
17 | +use ComponentInstaller\Process\Process; |
|
18 | +use Composer\Json\JsonFile; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Builds the require.js configuration. |
@@ -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; |
@@ -47,7 +47,7 @@ |
||
47 | 47 | } |
48 | 48 | if (isset($component)) { |
49 | 49 | $qb->andWhere("p.component LIKE :permgrpparts") |
50 | - ->setParameter('permgrpparts', $component.'%'); |
|
50 | + ->setParameter('permgrpparts', $component . '%'); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | return $qb->getQuery()->getResult(); |