@@ -31,7 +31,6 @@ |
||
31 | 31 | use Eccube\Common\Constant; |
32 | 32 | use Eccube\Entity\Plugin; |
33 | 33 | use Eccube\Exception\PluginException; |
34 | -use Eccube\Plugin\ConfigManager; |
|
35 | 34 | use Eccube\Plugin\ConfigManager as PluginConfigManager; |
36 | 35 | use Eccube\Repository\PluginEventHandlerRepository; |
37 | 36 | use Eccube\Repository\PluginRepository; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | if (!empty($config_cache)) { |
175 | 175 | $meta = $config_cache; |
176 | 176 | } else { |
177 | - $meta = $this->readYml($dir . '/config.yml'); |
|
177 | + $meta = $this->readYml($dir.'/config.yml'); |
|
178 | 178 | } |
179 | 179 | } catch (\Symfony\Component\Yaml\Exception\ParseException $e) { |
180 | 180 | throw new PluginException($e->getMessage(), $e->getCode(), $e); |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | $enabledPluginEntityDirs[] = $entityDir; |
358 | 358 | } else { |
359 | 359 | $index = array_search($entityDir, $enabledPluginEntityDirs); |
360 | - if ($index >=0 ) { |
|
360 | + if ($index >= 0) { |
|
361 | 361 | array_splice($enabledPluginEntityDirs, $index, 1); |
362 | 362 | } |
363 | 363 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | foreach ($this->paths as $path) { |
75 | - if ( ! is_dir($path)) { |
|
75 | + if (!is_dir($path)) { |
|
76 | 76 | throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
77 | 77 | } |
78 | 78 | |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), |
82 | 82 | \RecursiveIteratorIterator::LEAVES_ONLY |
83 | 83 | ), |
84 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
84 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
85 | 85 | \RecursiveRegexIterator::GET_MATCH |
86 | 86 | ); |
87 | 87 | |
88 | 88 | foreach ($iterator as $file) { |
89 | 89 | $sourceFile = $file[0]; |
90 | 90 | |
91 | - if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
91 | + if (!preg_match('(^phar:)i', $sourceFile)) { |
|
92 | 92 | $sourceFile = realpath($sourceFile); |
93 | 93 | } |
94 | 94 | |
@@ -133,15 +133,15 @@ discard block |
||
133 | 133 | $namespaceEndIndex = $tokens->getNextTokenOfKind($namespaceIndex, [';']); |
134 | 134 | $namespace = $tokens->generatePartialCode($tokens->getNextMeaningfulToken($namespaceIndex), $tokens->getPrevMeaningfulToken($namespaceEndIndex)); |
135 | 135 | $className = $tokens[$classNameTokenIndex]->getContent(); |
136 | - $fqcn = $namespace . '\\' . $className; |
|
137 | - if (class_exists($fqcn) && ! $this->isTransient($fqcn)) { |
|
136 | + $fqcn = $namespace.'\\'.$className; |
|
137 | + if (class_exists($fqcn) && !$this->isTransient($fqcn)) { |
|
138 | 138 | if (in_array($sourceFile, $this->newProxyFiles)) { |
139 | - $newClassName = $className . Str::random(12); |
|
139 | + $newClassName = $className.Str::random(12); |
|
140 | 140 | $tokens[$classNameTokenIndex] = new Token([T_STRING, $newClassName]); |
141 | 141 | $newFilePath = $this->outputDir."${newClassName}.php"; |
142 | 142 | file_put_contents($newFilePath, $tokens->generateCode()); |
143 | 143 | require_once $newFilePath; |
144 | - $results[] = $namespace . "\\${newClassName}"; |
|
144 | + $results[] = $namespace."\\${newClassName}"; |
|
145 | 145 | } else { |
146 | 146 | $results[] = $fqcn; |
147 | 147 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | public function updateSchema($generatedFiles) |
46 | 46 | { |
47 | - $outputDir = sys_get_temp_dir() . '/proxy_' . Str::random(12); |
|
47 | + $outputDir = sys_get_temp_dir().'/proxy_'.Str::random(12); |
|
48 | 48 | mkdir($outputDir); |
49 | 49 | |
50 | 50 | try { |