@@ -17,24 +17,24 @@ |
||
17 | 17 | */ |
18 | 18 | class UnregisterCommand extends ModuleCommand |
19 | 19 | { |
20 | - /** |
|
21 | - * {@inheritdoc} |
|
22 | - */ |
|
23 | - protected function configure() |
|
24 | - { |
|
25 | - parent::configure(); |
|
20 | + /** |
|
21 | + * {@inheritdoc} |
|
22 | + */ |
|
23 | + protected function configure() |
|
24 | + { |
|
25 | + parent::configure(); |
|
26 | 26 | |
27 | - $this->setName('module:unregister') |
|
28 | - ->setDescription('Uninstall module'); |
|
29 | - } |
|
27 | + $this->setName('module:unregister') |
|
28 | + ->setDescription('Uninstall module'); |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * {@inheritdoc} |
|
33 | - */ |
|
34 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
35 | - { |
|
36 | - $module = new Module($input->getArgument('module')); |
|
37 | - $module->unRegister(); |
|
38 | - $output->writeln(sprintf('unregistered <info>%s</info>', $module->getName())); |
|
39 | - } |
|
31 | + /** |
|
32 | + * {@inheritdoc} |
|
33 | + */ |
|
34 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
35 | + { |
|
36 | + $module = new Module($input->getArgument('module')); |
|
37 | + $module->unRegister(); |
|
38 | + $output->writeln(sprintf('unregistered <info>%s</info>', $module->getName())); |
|
39 | + } |
|
40 | 40 | } |
41 | 41 | \ No newline at end of file |
@@ -19,38 +19,38 @@ |
||
19 | 19 | */ |
20 | 20 | class UpdateCommand extends ModuleCommand |
21 | 21 | { |
22 | - use CanRestartTrait; |
|
22 | + use CanRestartTrait; |
|
23 | 23 | |
24 | - /** |
|
25 | - * {@inheritdoc} |
|
26 | - */ |
|
27 | - protected function configure() |
|
28 | - { |
|
29 | - parent::configure(); |
|
24 | + /** |
|
25 | + * {@inheritdoc} |
|
26 | + */ |
|
27 | + protected function configure() |
|
28 | + { |
|
29 | + parent::configure(); |
|
30 | 30 | |
31 | - $this->setName('module:update') |
|
32 | - ->setDescription('Load module updates from Marketplace') |
|
33 | - ->addOption('beta', 'b', InputOption::VALUE_NONE, 'Allow the installation of beta releases'); |
|
34 | - } |
|
31 | + $this->setName('module:update') |
|
32 | + ->setDescription('Load module updates from Marketplace') |
|
33 | + ->addOption('beta', 'b', InputOption::VALUE_NONE, 'Allow the installation of beta releases'); |
|
34 | + } |
|
35 | 35 | |
36 | - /** |
|
37 | - * {@inheritdoc} |
|
38 | - */ |
|
39 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
40 | - { |
|
41 | - $module = new Module($input->getArgument('module')); |
|
42 | - $modulesUpdated = null; |
|
43 | - while ($module->update($modulesUpdated)) |
|
44 | - { |
|
45 | - if (is_array($modulesUpdated)) |
|
46 | - { |
|
47 | - foreach ($modulesUpdated as $moduleName => $moduleVersion) |
|
48 | - { |
|
49 | - $output->writeln(sprintf('updated %s to <info>%s</info>', $moduleName, $moduleVersion)); |
|
50 | - } |
|
51 | - } |
|
52 | - return $this->restartScript($input, $output); |
|
53 | - } |
|
54 | - return 0; |
|
55 | - } |
|
36 | + /** |
|
37 | + * {@inheritdoc} |
|
38 | + */ |
|
39 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
40 | + { |
|
41 | + $module = new Module($input->getArgument('module')); |
|
42 | + $modulesUpdated = null; |
|
43 | + while ($module->update($modulesUpdated)) |
|
44 | + { |
|
45 | + if (is_array($modulesUpdated)) |
|
46 | + { |
|
47 | + foreach ($modulesUpdated as $moduleName => $moduleVersion) |
|
48 | + { |
|
49 | + $output->writeln(sprintf('updated %s to <info>%s</info>', $moduleName, $moduleVersion)); |
|
50 | + } |
|
51 | + } |
|
52 | + return $this->restartScript($input, $output); |
|
53 | + } |
|
54 | + return 0; |
|
55 | + } |
|
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -17,24 +17,24 @@ |
||
17 | 17 | */ |
18 | 18 | class RemoveCommand extends ModuleCommand |
19 | 19 | { |
20 | - /** |
|
21 | - * {@inheritdoc} |
|
22 | - */ |
|
23 | - protected function configure() |
|
24 | - { |
|
25 | - parent::configure(); |
|
20 | + /** |
|
21 | + * {@inheritdoc} |
|
22 | + */ |
|
23 | + protected function configure() |
|
24 | + { |
|
25 | + parent::configure(); |
|
26 | 26 | |
27 | - $this->setName('module:remove') |
|
28 | - ->setDescription('Uninstall and remove module folder from system'); |
|
29 | - } |
|
27 | + $this->setName('module:remove') |
|
28 | + ->setDescription('Uninstall and remove module folder from system'); |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * {@inheritdoc} |
|
33 | - */ |
|
34 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
35 | - { |
|
36 | - $module = new Module($input->getArgument('module')); |
|
37 | - $module->remove(); |
|
38 | - $output->writeln(sprintf('removed <info>%s</info>', $module->getName())); |
|
39 | - } |
|
31 | + /** |
|
32 | + * {@inheritdoc} |
|
33 | + */ |
|
34 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
35 | + { |
|
36 | + $module = new Module($input->getArgument('module')); |
|
37 | + $module->remove(); |
|
38 | + $output->writeln(sprintf('removed <info>%s</info>', $module->getName())); |
|
39 | + } |
|
40 | 40 | } |
41 | 41 | \ No newline at end of file |
@@ -36,11 +36,11 @@ |
||
36 | 36 | throw new ArgumentTypeException('callChain', 'array'); |
37 | 37 | } |
38 | 38 | |
39 | - $chain .= '->' . $method . '(' . static::convertArgsToString($methodArgs) . ')'; |
|
39 | + $chain .= '->'.$method.'('.static::convertArgsToString($methodArgs).')'; |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | - return '\\' . $className . '::agent(' . static::convertArgsToString($args) . ')' . $chain . ';'; |
|
43 | + return '\\'.$className.'::agent('.static::convertArgsToString($args).')'.$chain.';'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | protected static function convertArgsToString(array $args) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function setInterval($seconds) |
119 | 119 | { |
120 | - $this->interval = (int)$seconds; |
|
120 | + $this->interval = (int) $seconds; |
|
121 | 121 | |
122 | 122 | return $this; |
123 | 123 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function setPeriodically($periodically) |
133 | 133 | { |
134 | - $this->periodically = (bool)$periodically; |
|
134 | + $this->periodically = (bool) $periodically; |
|
135 | 135 | |
136 | 136 | return $this; |
137 | 137 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function setActive($active) |
147 | 147 | { |
148 | - $this->active = (bool)$active; |
|
148 | + $this->active = (bool) $active; |
|
149 | 149 | |
150 | 150 | return $this; |
151 | 151 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function setSort($sort) |
175 | 175 | { |
176 | - $this->sort = (int)$sort; |
|
176 | + $this->sort = (int) $sort; |
|
177 | 177 | |
178 | 178 | return $this; |
179 | 179 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function setUserId($userId) |
189 | 189 | { |
190 | - $this->userId = (int)$userId; |
|
190 | + $this->userId = (int) $userId; |
|
191 | 191 | |
192 | 192 | return $this; |
193 | 193 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | protected function initialize(InputInterface $input, OutputInterface $output) |
86 | 86 | { |
87 | - $this->tmplDir = __DIR__ . '/../../../tmpl'; |
|
87 | + $this->tmplDir = __DIR__.'/../../../tmpl'; |
|
88 | 88 | $this->questionHelper = $this->getHelper('question'); |
89 | 89 | |
90 | 90 | parent::initialize($input, $output); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $this->createEnvironmentsDir($input, $output); |
101 | 101 | $this->createConfiguration($input, $output); |
102 | 102 | |
103 | - $output->writeln('<info>' . static::COMPLETED_LOGO . '</info>'); |
|
103 | + $output->writeln('<info>'.static::COMPLETED_LOGO.'</info>'); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | */ |
112 | 112 | protected function createEnvironmentsDir(InputInterface $input, OutputInterface $output) |
113 | 113 | { |
114 | - $targetDir = getcwd() . '/' . $this->envDir; |
|
115 | - $tmplDir = $this->tmplDir . '/environments'; |
|
114 | + $targetDir = getcwd().'/'.$this->envDir; |
|
115 | + $tmplDir = $this->tmplDir.'/environments'; |
|
116 | 116 | |
117 | 117 | $output->writeln(' - Environment settings'); |
118 | 118 | |
119 | 119 | if (file_exists($targetDir)) { |
120 | 120 | $question = new ConfirmationQuestion( |
121 | - ' <error>Directory ' . $targetDir . ' already exists</error>' . PHP_EOL |
|
121 | + ' <error>Directory '.$targetDir.' already exists</error>'.PHP_EOL |
|
122 | 122 | . ' <info>Overwrite? [Y/n]</info> ', |
123 | 123 | true, |
124 | 124 | '/^(y|j)/i' |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $iterator = new \RecursiveIteratorIterator($tmplIterator, \RecursiveIteratorIterator::SELF_FIRST); |
135 | 135 | |
136 | 136 | foreach ($iterator as $item) { |
137 | - $itemPath = $targetDir . '/' . $iterator->getSubPathName(); |
|
137 | + $itemPath = $targetDir.'/'.$iterator->getSubPathName(); |
|
138 | 138 | |
139 | 139 | if ($item->isDir()) { |
140 | 140 | $fs->mkdir($itemPath); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
146 | - $output->writeln(' Created directory settings of environments: <comment>' . $targetDir . '</comment>'); |
|
146 | + $output->writeln(' Created directory settings of environments: <comment>'.$targetDir.'</comment>'); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -154,13 +154,13 @@ discard block |
||
154 | 154 | */ |
155 | 155 | protected function createConfiguration(InputInterface $input, OutputInterface $output) |
156 | 156 | { |
157 | - $path = $this->getApplication()->getRoot() . '/.jedi.php'; |
|
157 | + $path = $this->getApplication()->getRoot().'/.jedi.php'; |
|
158 | 158 | |
159 | 159 | $output->writeln(' - Configuration'); |
160 | 160 | |
161 | 161 | if (file_exists($path)) { |
162 | 162 | $question = new ConfirmationQuestion( |
163 | - ' <error>Configuration file ' . $path . ' already exists</error>' . PHP_EOL |
|
163 | + ' <error>Configuration file '.$path.' already exists</error>'.PHP_EOL |
|
164 | 164 | . ' <info>Overwrite? [Y/n]</info> ', |
165 | 165 | true, |
166 | 166 | '/^(y|j)/i' |
@@ -174,20 +174,20 @@ discard block |
||
174 | 174 | $fs = new Filesystem(); |
175 | 175 | |
176 | 176 | $question = new Question(' <info>Enter path to web directory relative to ' |
177 | - . $this->getApplication()->getRoot() . ':</info> ' . PHP_EOL |
|
178 | - . ' (or do not specify if you are already in the web directory)' . PHP_EOL); |
|
177 | + . $this->getApplication()->getRoot().':</info> '.PHP_EOL |
|
178 | + . ' (or do not specify if you are already in the web directory)'.PHP_EOL); |
|
179 | 179 | |
180 | - $question->setValidator(function ($answer) use ($fs) { |
|
180 | + $question->setValidator(function($answer) use ($fs) { |
|
181 | 181 | $path = $answer; |
182 | 182 | |
183 | 183 | if ($answer === null) { |
184 | 184 | $path = $this->getApplication()->getRoot(); |
185 | 185 | } elseif (!$fs->isAbsolutePath($answer)) { |
186 | - $path = $this->getApplication()->getRoot() . '/' . $answer; |
|
186 | + $path = $this->getApplication()->getRoot().'/'.$answer; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | if (!is_dir($path)) { |
190 | - throw new \RuntimeException('Directory "' . $path . '" is missing'); |
|
190 | + throw new \RuntimeException('Directory "'.$path.'" is missing'); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | return $answer; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | $webDir = $this->questionHelper->ask($input, $output, $question); |
197 | 197 | |
198 | - $content = file_get_contents($this->tmplDir . '/.jedi.php'); |
|
198 | + $content = file_get_contents($this->tmplDir.'/.jedi.php'); |
|
199 | 199 | $content = str_replace( |
200 | 200 | ['%web-dir%', '%env-dir%'], |
201 | 201 | [addslashes($webDir), addslashes($this->envDir)], |
@@ -203,6 +203,6 @@ discard block |
||
203 | 203 | ); |
204 | 204 | $fs->dumpFile($path, $content); |
205 | 205 | |
206 | - $output->writeln(' Created configuration file of application <comment>' . $path . '</comment>'); |
|
206 | + $output->writeln(' Created configuration file of application <comment>'.$path.'</comment>'); |
|
207 | 207 | } |
208 | 208 | } |
209 | 209 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | if ($ex = $APPLICATION->GetException()) { |
39 | - throw new static($message ? $message . ': ' . $ex->GetString() : $ex->GetString()); |
|
39 | + throw new static($message ? $message.': '.$ex->GetString() : $ex->GetString()); |
|
40 | 40 | } else { |
41 | 41 | throw new static($message ? $message : 'Unknown exception'); |
42 | 42 | } |
@@ -101,22 +101,22 @@ discard block |
||
101 | 101 | $exitCode = parent::doRun($input, $output); |
102 | 102 | |
103 | 103 | if ($this->getConfiguration() === null) { |
104 | - $output->writeln(PHP_EOL . '<error>No configuration loaded.</error> ' |
|
104 | + $output->writeln(PHP_EOL.'<error>No configuration loaded.</error> ' |
|
105 | 105 | . 'Please run <info>init</info> command first'); |
106 | 106 | } else { |
107 | 107 | switch ($this->getBitrixStatus()) { |
108 | 108 | case static::BITRIX_STATUS_UNAVAILABLE: |
109 | - $output->writeln(PHP_EOL . sprintf('<error>No Bitrix kernel found in %s.</error> ' |
|
109 | + $output->writeln(PHP_EOL.sprintf('<error>No Bitrix kernel found in %s.</error> ' |
|
110 | 110 | . 'Please run <info>env:init</info> command to configure', $this->getDocumentRoot())); |
111 | 111 | break; |
112 | 112 | |
113 | 113 | case static::BITRIX_STATUS_NO_DB_CONNECTION: |
114 | - $output->writeln(PHP_EOL . '<error>Bitrix database connection is unavailable.</error>'); |
|
114 | + $output->writeln(PHP_EOL.'<error>Bitrix database connection is unavailable.</error>'); |
|
115 | 115 | break; |
116 | 116 | |
117 | 117 | case static::BITRIX_STATUS_COMPLETE: |
118 | 118 | if ($this->getCommandName($input) === null) { |
119 | - $output->writeln(PHP_EOL . sprintf('Using Bitrix <info>kernel v%s</info>.</info>', SM_VERSION), |
|
119 | + $output->writeln(PHP_EOL.sprintf('Using Bitrix <info>kernel v%s</info>.</info>', SM_VERSION), |
|
120 | 120 | OutputInterface::VERBOSITY_VERY_VERBOSE); |
121 | 121 | } |
122 | 122 | break; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $commands = []; |
169 | 169 | |
170 | 170 | foreach (ModuleManager::getInstalledModules() as $module) { |
171 | - $cliFile = getLocalPath('modules/' . $module['ID'] . '/cli.php'); |
|
171 | + $cliFile = getLocalPath('modules/'.$module['ID'].'/cli.php'); |
|
172 | 172 | |
173 | 173 | if ($cliFile === false) { |
174 | 174 | continue; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | continue; |
177 | 177 | } |
178 | 178 | |
179 | - $config = include_once $this->getDocumentRoot() . $cliFile; |
|
179 | + $config = include_once $this->getDocumentRoot().$cliFile; |
|
180 | 180 | |
181 | 181 | if (isset($config['commands']) && is_array($config['commands'])) { |
182 | 182 | $commands = array_merge($commands, $config['commands']); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $this->configuration = include $path; |
205 | 205 | |
206 | 206 | if (!is_array($this->configuration)) { |
207 | - throw new ConfigurationException('Configuration file ' . $path . ' must return an array'); |
|
207 | + throw new ConfigurationException('Configuration file '.$path.' must return an array'); |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | $filesystem = new Filesystem(); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | if ($filesystem->isAbsolutePath($this->configuration['web-dir'])) { |
213 | 213 | $this->setDocumentRoot($this->configuration['web-dir']); |
214 | 214 | } else { |
215 | - $this->setDocumentRoot($this->getRoot() . '/' . $this->configuration['web-dir']); |
|
215 | + $this->setDocumentRoot($this->getRoot().'/'.$this->configuration['web-dir']); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | if (!is_dir($_SERVER['DOCUMENT_ROOT'])) { |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | /** @noinspection PhpUnusedLocalVariableInspection */ |
259 | 259 | $DB, $DBType, $DBHost, $DBLogin, $DBPassword, $DBName, $DBDebug, $DBDebugToFile, $APPLICATION, $USER, $DBSQLServerType; |
260 | 260 | |
261 | - require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'; |
|
261 | + require_once $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'; |
|
262 | 262 | |
263 | 263 | if (defined('B_PROLOG_INCLUDED') && B_PROLOG_INCLUDED === true) { |
264 | 264 | $this->bitrixStatus = static::BITRIX_STATUS_COMPLETE; |
@@ -278,8 +278,8 @@ discard block |
||
278 | 278 | public function checkBitrix() |
279 | 279 | { |
280 | 280 | if ( |
281 | - !is_file($_SERVER['DOCUMENT_ROOT'] . '/bitrix/.settings.php') |
|
282 | - && !is_file($_SERVER['DOCUMENT_ROOT'] . '/bitrix/.settings_extra.php') |
|
281 | + !is_file($_SERVER['DOCUMENT_ROOT'].'/bitrix/.settings.php') |
|
282 | + && !is_file($_SERVER['DOCUMENT_ROOT'].'/bitrix/.settings_extra.php') |
|
283 | 283 | ) { |
284 | 284 | return false; |
285 | 285 | } |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | |
324 | 324 | $this->initializeBitrix(); |
325 | 325 | |
326 | - spl_autoload_register(function ($className) { |
|
326 | + spl_autoload_register(function($className) { |
|
327 | 327 | $file = ltrim($className, "\\"); |
328 | 328 | $file = strtr($file, Loader::ALPHA_UPPER, Loader::ALPHA_LOWER); |
329 | 329 | $file = str_replace('\\', '/', $file); |
@@ -342,16 +342,16 @@ discard block |
||
342 | 342 | return false; |
343 | 343 | } |
344 | 344 | |
345 | - $module = array_shift($arFile) . '.' . array_shift($arFile); |
|
345 | + $module = array_shift($arFile).'.'.array_shift($arFile); |
|
346 | 346 | |
347 | 347 | if (!Loader::includeModule($module)) { |
348 | 348 | return false; |
349 | 349 | } |
350 | 350 | |
351 | - $path = getLocalPath('/modules/' . $module . '/' . implode('/', $arFile) . '.php'); |
|
351 | + $path = getLocalPath('/modules/'.$module.'/'.implode('/', $arFile).'.php'); |
|
352 | 352 | |
353 | 353 | if ($path !== false) { |
354 | - include_once $this->getDocumentRoot() . $path; |
|
354 | + include_once $this->getDocumentRoot().$path; |
|
355 | 355 | } |
356 | 356 | }); |
357 | 357 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function register() |
109 | 109 | { |
110 | 110 | if (!$this->isRegistered()) { |
111 | - $moduleObject =& $this->getObject(); |
|
111 | + $moduleObject = & $this->getObject(); |
|
112 | 112 | |
113 | 113 | /** |
114 | 114 | * It's important to check if module class defines InstallDB method (it must register module) |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | if (!$moduleObject->InstallDB() && BitrixException::hasException()) { |
125 | 125 | throw new Exception\ModuleInstallException( |
126 | - get_class($moduleObject) . '::InstallDB() returned false', |
|
126 | + get_class($moduleObject).'::InstallDB() returned false', |
|
127 | 127 | $this->name |
128 | 128 | ); |
129 | 129 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | /** @noinspection PhpVoidFunctionResultUsedInspection */ |
134 | 134 | if (!$moduleObject->InstallFiles() && BitrixException::hasException()) { |
135 | 135 | throw new Exception\ModuleInstallException( |
136 | - get_class($moduleObject) . '::InstallFiles() returned false', |
|
136 | + get_class($moduleObject).'::InstallFiles() returned false', |
|
137 | 137 | $this->name |
138 | 138 | ); |
139 | 139 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | { |
159 | 159 | if (!$this->isRegistered()) { |
160 | 160 | if (!$this->exist()) { |
161 | - require_once($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/classes/general/update_client_partner.php'); |
|
161 | + require_once($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/main/classes/general/update_client_partner.php'); |
|
162 | 162 | |
163 | 163 | if (!\CUpdateClientPartner::LoadModuleNoDemand( |
164 | 164 | $this->getName(), |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | /** @noinspection PhpVoidFunctionResultUsedInspection */ |
200 | 200 | if (!$moduleObject->UnInstallFiles() && BitrixException::hasException()) { |
201 | 201 | throw new Exception\ModuleUninstallException( |
202 | - get_class($moduleObject) . '::UnInstallFiles() returned false', |
|
202 | + get_class($moduleObject).'::UnInstallFiles() returned false', |
|
203 | 203 | $this->name |
204 | 204 | ); |
205 | 205 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | /** @noinspection PhpVoidFunctionResultUsedInspection */ |
210 | 210 | if (!$moduleObject->UnInstallDB() && BitrixException::hasException()) { |
211 | 211 | throw new Exception\ModuleUninstallException( |
212 | - get_class($moduleObject) . '::UnInstallFiles() returned false', |
|
212 | + get_class($moduleObject).'::UnInstallFiles() returned false', |
|
213 | 213 | $this->name |
214 | 214 | ); |
215 | 215 | } |
@@ -231,10 +231,10 @@ discard block |
||
231 | 231 | $this->unRegister(); |
232 | 232 | } |
233 | 233 | |
234 | - $path = getLocalPath('modules/' . $this->getName()); |
|
234 | + $path = getLocalPath('modules/'.$this->getName()); |
|
235 | 235 | |
236 | 236 | if ($path) { |
237 | - (new Filesystem())->remove($_SERVER['DOCUMENT_ROOT'] . $path); |
|
237 | + (new Filesystem())->remove($_SERVER['DOCUMENT_ROOT'].$path); |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | unset($this->object); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function update(&$modulesUpdated = null) |
255 | 255 | { |
256 | - require_once($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/classes/general/update_client_partner.php'); |
|
256 | + require_once($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/main/classes/general/update_client_partner.php'); |
|
257 | 257 | |
258 | 258 | if (!$this->isThirdParty()) { |
259 | 259 | throw new Exception\ModuleUpdateException('Kernel module updates are currently not supported.', |
@@ -294,14 +294,14 @@ discard block |
||
294 | 294 | $updateDir = null; |
295 | 295 | |
296 | 296 | if (!\CUpdateClientPartner::UnGzipArchive($updateDir, $errorMessage, true)) { |
297 | - throw new Exception\ModuleUpdateException('[CL02] UnGzipArchive failed. ' . $errorMessage, |
|
297 | + throw new Exception\ModuleUpdateException('[CL02] UnGzipArchive failed. '.$errorMessage, |
|
298 | 298 | $this->getName()); |
299 | 299 | } |
300 | 300 | |
301 | 301 | $this->validateUpdate($updateDir); |
302 | 302 | |
303 | 303 | if (isset($updateDescription["DATA"]["#"]["NOUPDATES"])) { |
304 | - \CUpdateClientPartner::ClearUpdateFolder($_SERVER["DOCUMENT_ROOT"] . "/bitrix/updates/" . $updateDir); |
|
304 | + \CUpdateClientPartner::ClearUpdateFolder($_SERVER["DOCUMENT_ROOT"]."/bitrix/updates/".$updateDir); |
|
305 | 305 | return false; |
306 | 306 | } |
307 | 307 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | } |
321 | 321 | } |
322 | 322 | } else { |
323 | - throw new Exception\ModuleUpdateException('[CL04] UpdateStepModules failed. ' . $errorMessage, |
|
323 | + throw new Exception\ModuleUpdateException('[CL04] UpdateStepModules failed. '.$errorMessage, |
|
324 | 324 | $this->getName()); |
325 | 325 | } |
326 | 326 | |
@@ -336,14 +336,14 @@ discard block |
||
336 | 336 | { |
337 | 337 | $errorMessage = null; |
338 | 338 | if (!\CUpdateClientPartner::CheckUpdatability($updateDir, $errorMessage)) { |
339 | - throw new Exception\ModuleUpdateException('[CL03] CheckUpdatability failed. ' . $errorMessage, |
|
339 | + throw new Exception\ModuleUpdateException('[CL03] CheckUpdatability failed. '.$errorMessage, |
|
340 | 340 | $this->getName()); |
341 | 341 | } |
342 | 342 | |
343 | 343 | if (isset($updateDescription["DATA"]["#"]["ERROR"])) { |
344 | 344 | $errorMessage = ""; |
345 | 345 | foreach ($updateDescription["DATA"]["#"]["ERROR"] as $errorDescription) { |
346 | - $errorMessage .= "[" . $errorDescription["@"]["TYPE"] . "] " . $errorDescription["#"]; |
|
346 | + $errorMessage .= "[".$errorDescription["@"]["TYPE"]."] ".$errorDescription["#"]; |
|
347 | 347 | } |
348 | 348 | throw new Exception\ModuleUpdateException($errorMessage, $this->getName()); |
349 | 349 | } |