@@ -20,7 +20,7 @@ |
||
20 | 20 | /** |
21 | 21 | * Ensure the timezone is set; |
22 | 22 | */ |
23 | -if (version_compare(phpversion(),'5.3.0') >= 0) { |
|
23 | +if (version_compare(phpversion(), '5.3.0') >= 0) { |
|
24 | 24 | $tz = @ini_get('date.timezone'); |
25 | 25 | if (empty($tz)) { |
26 | 26 | date_default_timezone_set(@date_default_timezone_get()); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | class Application extends \LCI\MODX\Console\Application |
13 | 13 | { |
14 | 14 | // @see http://patorjk.com/software/taag/#p=display&f=Slant&t=Console |
15 | - protected static $logo = __DIR__ . '/art/orchestrator.txt'; |
|
15 | + protected static $logo = __DIR__.'/art/orchestrator.txt'; |
|
16 | 16 | |
17 | 17 | protected static $name = 'Orchestrator Console'; |
18 | 18 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | foreach ($commands as $command) { |
81 | 81 | $class = new $command(); |
82 | 82 | |
83 | - if (is_object($class) ) { |
|
83 | + if (is_object($class)) { |
|
84 | 84 | if (method_exists($class, 'setConsole')) { |
85 | 85 | $class->setConsole($this->console); |
86 | 86 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | if ($saved) { |
45 | 45 | $this->blender->outSuccess('orchestrator MediaSource has been installed'); |
46 | - } else { |
|
46 | + } else { |
|
47 | 47 | $this->blender->out('orchestrator MediaSource was not installed', true); |
48 | 48 | } |
49 | 49 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | // already loaded do nothing |
12 | 12 | } else { |
13 | 13 | /** @var string $file */ |
14 | - $file = $modx->getOption('orchestrator.vendor_path', null, MODX_CORE_PATH . 'components/orchestrator/vendor/') . 'autoload.php'; |
|
14 | + $file = $modx->getOption('orchestrator.vendor_path', null, MODX_CORE_PATH.'components/orchestrator/vendor/').'autoload.php'; |
|
15 | 15 | |
16 | 16 | if (file_exists($file)) { |
17 | 17 | require_once $file; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $composer = $event->getComposer(); |
29 | 29 | |
30 | 30 | $vendorDir = $composer->getConfig()->get('vendor-dir'); |
31 | - require $vendorDir . '/autoload.php'; |
|
31 | + require $vendorDir.'/autoload.php'; |
|
32 | 32 | |
33 | 33 | Orchestrator::installComposerPackage('lci/blend'); |
34 | 34 | Orchestrator::install(); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | /** @var Composer $composer */ |
55 | 55 | $composer = $event->getComposer(); |
56 | 56 | $vendorDir = $composer->getConfig()->get('vendor-dir'); |
57 | - require $vendorDir . '/autoload.php'; |
|
57 | + require $vendorDir.'/autoload.php'; |
|
58 | 58 | |
59 | 59 | Orchestrator::install(); |
60 | 60 | Orchestrator::updateComposerPackage('lci/blend'); |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | // this is the root composer.json data |
91 | 91 | $vendorDir = $composer->getConfig()->get('vendor-dir'); |
92 | 92 | |
93 | - if (file_exists($vendorDir . '/autoload.php')) { |
|
94 | - require $vendorDir . '/autoload.php'; |
|
93 | + if (file_exists($vendorDir.'/autoload.php')) { |
|
94 | + require $vendorDir.'/autoload.php'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | if ($currentPackage->getName() == 'lci\orchestrator') { |
@@ -94,22 +94,22 @@ discard block |
||
94 | 94 | $self = new Orchestrator(); |
95 | 95 | $self->setMode(0755); |
96 | 96 | |
97 | - if (file_exists($package_path . 'public')) { |
|
97 | + if (file_exists($package_path.'public')) { |
|
98 | 98 | $destination = MODX_BASE_PATH; |
99 | 99 | if (isset($config['LCI_ORCHESTRATOR_PUBLIC_PATH']) && file_exists($config['LCI_ORCHESTRATOR_PUBLIC_PATH'])) { |
100 | 100 | $destination = $config['LCI_ORCHESTRATOR_PUBLIC_PATH']; |
101 | 101 | } |
102 | 102 | |
103 | - $self->copyDirectory($package_path . 'public', $destination); |
|
103 | + $self->copyDirectory($package_path.'public', $destination); |
|
104 | 104 | } |
105 | 105 | |
106 | - if (file_exists($package_path . 'assets')) { |
|
106 | + if (file_exists($package_path.'assets')) { |
|
107 | 107 | $destination = MODX_ASSETS_PATH; |
108 | 108 | if (isset($config['LCI_ORCHESTRATOR_ASSETS_PATH']) && file_exists($config['LCI_ORCHESTRATOR_ASSETS_PATH'])) { |
109 | 109 | $destination = $config['LCI_ORCHESTRATOR_ASSETS_PATH']; |
110 | 110 | } |
111 | 111 | |
112 | - $self->copyDirectory($package_path . 'assets', $destination); |
|
112 | + $self->copyDirectory($package_path.'assets', $destination); |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * |
120 | 120 | * @throws \LCI\Blend\Exception\MigratorException |
121 | 121 | */ |
122 | - public static function installComposerPackage($project, $type='master') |
|
122 | + public static function installComposerPackage($project, $type = 'master') |
|
123 | 123 | { |
124 | 124 | $path = static ::getPackagePath($project); |
125 | 125 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @param string $type |
134 | 134 | * @throws \LCI\Blend\Exception\MigratorException |
135 | 135 | */ |
136 | - public static function updateComposerPackage($project, $type='master') |
|
136 | + public static function updateComposerPackage($project, $type = 'master') |
|
137 | 137 | { |
138 | 138 | $path = static ::getPackagePath($project); |
139 | 139 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | { |
150 | 150 | static::loadOrchestratorPackageInfo(); |
151 | 151 | |
152 | - foreach(static::$packages as $existing_package) { |
|
152 | + foreach (static::$packages as $existing_package) { |
|
153 | 153 | static::updateComposerPackage($existing_package); |
154 | 154 | } |
155 | 155 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * @param string $type |
160 | 160 | * @throws \LCI\Blend\Exception\MigratorException |
161 | 161 | */ |
162 | - public static function uninstallComposerPackage($project, $type='master') |
|
162 | + public static function uninstallComposerPackage($project, $type = 'master') |
|
163 | 163 | { |
164 | 164 | $path = static ::getPackagePath($project); |
165 | 165 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * |
177 | 177 | * @throws \LCI\Blend\Exception\MigratorException |
178 | 178 | */ |
179 | - protected static function runMigrations($project, $config=[], $method='up', $type='master') |
|
179 | + protected static function runMigrations($project, $config = [], $method = 'up', $type = 'master') |
|
180 | 180 | { |
181 | 181 | /** @var \LCI\MODX\Console\Console $console */ |
182 | 182 | $console = static::getConsole(); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * @param bool $include_src |
203 | 203 | * @return string |
204 | 204 | */ |
205 | - protected static function getPackagePath($package='lci/orchestrator', $include_src = true) |
|
205 | + protected static function getPackagePath($package = 'lci/orchestrator', $include_src = true) |
|
206 | 206 | { |
207 | 207 | if (empty(static::$modx)) { |
208 | 208 | /** @var \LCI\MODX\Console\Console $console */ |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | null, |
216 | 216 | (defined('MODX_CORE_PATH') ? MODX_CORE_PATH.'vendor/' : dirname(__DIR__)) |
217 | 217 | ); |
218 | - $path .= $package . DIRECTORY_SEPARATOR; |
|
218 | + $path .= $package.DIRECTORY_SEPARATOR; |
|
219 | 219 | |
220 | 220 | if ($include_src) { |
221 | - $path .= 'src' . DIRECTORY_SEPARATOR; |
|
221 | + $path .= 'src'.DIRECTORY_SEPARATOR; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | return $path; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | if (!static::$packages) { |
253 | 253 | static::$packages = []; |
254 | 254 | |
255 | - static::$package_file = $console->getConfigFilePaths()['config_dir'] . 'lci_orchestrator_package.php'; |
|
255 | + static::$package_file = $console->getConfigFilePaths()['config_dir'].'lci_orchestrator_package.php'; |
|
256 | 256 | |
257 | 257 | if (file_exists(static::$package_file)) { |
258 | 258 | static::$packages = include static::$package_file; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | static::loadOrchestratorPackageInfo(); |
269 | 269 | if (in_array($package, static::$packages)) { |
270 | 270 | $temp = []; |
271 | - foreach(static::$packages as $existing_package) { |
|
271 | + foreach (static::$packages as $existing_package) { |
|
272 | 272 | if ($existing_package == $package) { |
273 | 273 | continue; |
274 | 274 | } |
@@ -300,8 +300,8 @@ discard block |
||
300 | 300 | */ |
301 | 301 | protected static function writeCacheFile($file, $data) |
302 | 302 | { |
303 | - $content = '<?php ' . PHP_EOL . |
|
304 | - 'return ' . var_export($data, true) . ';'; |
|
303 | + $content = '<?php '.PHP_EOL. |
|
304 | + 'return '.var_export($data, true).';'; |
|
305 | 305 | |
306 | 306 | file_put_contents($file, $content); |
307 | 307 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | if ($describe) { |
60 | - $output->writeln(PHP_EOL.'### Class: '. get_class($orchestratorDeploy).PHP_EOL); |
|
60 | + $output->writeln(PHP_EOL.'### Class: '.get_class($orchestratorDeploy).PHP_EOL); |
|
61 | 61 | $orchestratorDeploy->describe($output); |
62 | 62 | |
63 | 63 | } else { |