@@ -57,8 +57,7 @@ |
||
57 | 57 | try |
58 | 58 | { |
59 | 59 | $this->migrations->migrateDatabase($version); |
60 | - } |
|
61 | - catch (\Exception $exception) |
|
60 | + } catch (\Exception $exception) |
|
62 | 61 | { |
63 | 62 | $this->logger->critical( |
64 | 63 | 'Error migrating database', |
@@ -30,12 +30,12 @@ |
||
30 | 30 | $this->getApplication()->out('<info>Updating server to git HEAD</info>'); |
31 | 31 | |
32 | 32 | // Pull from remote repo |
33 | - $this->runCommand('cd ' . APPROOT . ' && git pull 2>&1'); |
|
33 | + $this->runCommand('cd '.APPROOT.' && git pull 2>&1'); |
|
34 | 34 | |
35 | 35 | $this->getApplication()->out('<info>Updating Composer resources</info>'); |
36 | 36 | |
37 | 37 | // Run Composer install |
38 | - $this->runCommand('cd ' . APPROOT . ' && composer install --no-dev -o 2>&1'); |
|
38 | + $this->runCommand('cd '.APPROOT.' && composer install --no-dev -o 2>&1'); |
|
39 | 39 | |
40 | 40 | $this->getApplication()->out('<info>Update complete</info>'); |
41 | 41 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $commands = []; |
56 | 56 | |
57 | 57 | /** @var \DirectoryIterator $fileInfo */ |
58 | - foreach (new \DirectoryIterator(__DIR__ . '/Commands') as $fileInfo) |
|
58 | + foreach (new \DirectoryIterator(__DIR__.'/Commands') as $fileInfo) |
|
59 | 59 | { |
60 | 60 | if ($fileInfo->isDot()) |
61 | 61 | { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | $command = $subFileInfo->getBasename('.php'); |
78 | - $className = __NAMESPACE__ . "\\Commands\\$namespace\\$command"; |
|
78 | + $className = __NAMESPACE__."\\Commands\\$namespace\\$command"; |
|
79 | 79 | |
80 | 80 | if (!class_exists($className)) |
81 | 81 | { |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | // If the class isn't instantiable, it isn't a valid command |
86 | 86 | if ((new \ReflectionClass($className))->isInstantiable()) |
87 | 87 | { |
88 | - $commands[strtolower("$namespace:" . str_replace('Command', '', $command))] = $this->getContainer()->get($className); |
|
88 | + $commands[strtolower("$namespace:".str_replace('Command', '', $command))] = $this->getContainer()->get($className); |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | } |
92 | 92 | else |
93 | 93 | { |
94 | 94 | $command = $fileInfo->getBasename('.php'); |
95 | - $className = __NAMESPACE__ . "\\Commands\\$command"; |
|
95 | + $className = __NAMESPACE__."\\Commands\\$command"; |
|
96 | 96 | |
97 | 97 | if (!class_exists($className)) |
98 | 98 | { |
@@ -85,8 +85,7 @@ |
||
85 | 85 | $commands[strtolower("$namespace:" . str_replace('Command', '', $command))] = $this->getContainer()->get($className); |
86 | 86 | } |
87 | 87 | } |
88 | - } |
|
89 | - else |
|
88 | + } else |
|
90 | 89 | { |
91 | 90 | $command = $fileInfo->getBasename('.php'); |
92 | 91 | $className = __NAMESPACE__ . "\\Commands\\$command"; |
@@ -87,15 +87,15 @@ |
||
87 | 87 | |
88 | 88 | // Allow the next patch release after this one |
89 | 89 | $nextPatch = $explodedVersion[2] + 1; |
90 | - $versions[] = $explodedVersion[0] . '.' . $explodedVersion[1] . '.' . $nextPatch; |
|
90 | + $versions[] = $explodedVersion[0].'.'.$explodedVersion[1].'.'.$nextPatch; |
|
91 | 91 | |
92 | 92 | // And allow the next minor release after this one |
93 | 93 | $nextMinor = $explodedVersion[1] + 1; |
94 | - $versions[] = $explodedVersion[0] . '.' . $nextMinor . '.0'; |
|
94 | + $versions[] = $explodedVersion[0].'.'.$nextMinor.'.0'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | // Store the version data now |
98 | - $path = APPROOT . '/versions/joomla.json'; |
|
98 | + $path = APPROOT.'/versions/joomla.json'; |
|
99 | 99 | |
100 | 100 | if (file_put_contents($path, json_encode($versions)) === false) |
101 | 101 | { |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | // Import the valid release listing |
158 | - $path = APPROOT . '/versions/joomla.json'; |
|
158 | + $path = APPROOT.'/versions/joomla.json'; |
|
159 | 159 | |
160 | 160 | if (!file_exists($path)) |
161 | 161 | { |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | } |
221 | 221 | |
222 | 222 | // Import the valid release listing |
223 | - $path = APPROOT . '/versions/php.json'; |
|
223 | + $path = APPROOT.'/versions/php.json'; |
|
224 | 224 | |
225 | 225 | if (!file_exists($path)) |
226 | 226 | { |
@@ -68,7 +68,7 @@ |
||
68 | 68 | { |
69 | 69 | return new Migrations( |
70 | 70 | $container->get('db'), |
71 | - new Filesystem(new Local(APPROOT . '/etc')) |
|
71 | + new Filesystem(new Local(APPROOT.'/etc')) |
|
72 | 72 | ); |
73 | 73 | } |
74 | 74 | } |
@@ -78,22 +78,19 @@ |
||
78 | 78 | if ($item->isHit()) |
79 | 79 | { |
80 | 80 | $body = $item->get(); |
81 | - } |
|
82 | - else |
|
81 | + } else |
|
83 | 82 | { |
84 | 83 | $body = $this->view->render(); |
85 | 84 | |
86 | 85 | $this->cacheData($key, $body); |
87 | 86 | } |
88 | - } |
|
89 | - else |
|
87 | + } else |
|
90 | 88 | { |
91 | 89 | $body = $this->view->render(); |
92 | 90 | |
93 | 91 | $this->cacheData($key, $body); |
94 | 92 | } |
95 | - } |
|
96 | - else |
|
93 | + } else |
|
97 | 94 | { |
98 | 95 | $body = $this->view->render(); |
99 | 96 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | // Serve cached data if the cache layer is enabled and the raw data source is not requested |
69 | 69 | if ($this->getApplication()->get('cache.enabled', false) && !$authorizedRaw) |
70 | 70 | { |
71 | - $key = md5(get_class($this->view) . __METHOD__ . $source); |
|
71 | + $key = md5(get_class($this->view).__METHOD__.$source); |
|
72 | 72 | |
73 | 73 | if ($this->cache->hasItem($key)) |
74 | 74 | { |
@@ -69,7 +69,7 @@ |
||
69 | 69 | // If the path is relative, make it absolute... Sorry Windows users, this breaks support for your environment |
70 | 70 | if (substr($path, 0, 1) !== '/') |
71 | 71 | { |
72 | - $path = APPROOT . '/' . $path; |
|
72 | + $path = APPROOT.'/'.$path; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | $options = [ |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | $level = strtoupper($config->get('log.application', $config->get('log.level', 'error'))); |
95 | 95 | |
96 | - return new StreamHandler(APPROOT . '/logs/stats.log', constant('\\Monolog\\Logger::' . $level)); |
|
96 | + return new StreamHandler(APPROOT.'/logs/stats.log', constant('\\Monolog\\Logger::'.$level)); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | // If database debugging is enabled then force the logger's error level to DEBUG, otherwise use the level defined in the app config |
114 | 114 | $level = $config->get('database.debug', false) ? 'DEBUG' : strtoupper($config->get('log.database', $config->get('log.level', 'error'))); |
115 | 115 | |
116 | - return new StreamHandler(APPROOT . '/logs/stats.log', constant('\\Monolog\\Logger::' . $level)); |
|
116 | + return new StreamHandler(APPROOT.'/logs/stats.log', constant('\\Monolog\\Logger::'.$level)); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * Registers the service provider with a DI container. |
27 | 27 | * |
28 | - * @param Container $container The DI container. |
|
28 | + * @param \Joomla\DI\Container $container The DI container. |
|
29 | 29 | * |
30 | 30 | * @return void |
31 | 31 | */ |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | /** |
57 | 57 | * Get the `monolog.processor.psr3` service |
58 | 58 | * |
59 | - * @param Container $container The DI container. |
|
59 | + * @param \Joomla\DI\Container $container The DI container. |
|
60 | 60 | * |
61 | - * @return PsrLogMessageProcessor |
|
61 | + * @return \Monolog\Processor\PsrLogMessageProcessor |
|
62 | 62 | */ |
63 | 63 | public function getMonologProcessorPsr3Service(Container $container) : PsrLogMessageProcessor |
64 | 64 | { |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Get the `monolog.processor.web` service |
70 | 70 | * |
71 | - * @param Container $container The DI container. |
|
71 | + * @param \Joomla\DI\Container $container The DI container. |
|
72 | 72 | * |
73 | - * @return WebProcessor |
|
73 | + * @return \Monolog\Processor\WebProcessor |
|
74 | 74 | */ |
75 | 75 | public function getMonologProcessorWebService(Container $container) : WebProcessor |
76 | 76 | { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | /** |
81 | 81 | * Get the `monolog.handler.application` service |
82 | 82 | * |
83 | - * @param Container $container The DI container. |
|
83 | + * @param \Joomla\DI\Container $container The DI container. |
|
84 | 84 | * |
85 | 85 | * @return StreamHandler |
86 | 86 | */ |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | /** |
98 | 98 | * Get the `monolog.handler.database` service |
99 | 99 | * |
100 | - * @param Container $container The DI container. |
|
100 | + * @param \Joomla\DI\Container $container The DI container. |
|
101 | 101 | * |
102 | 102 | * @return StreamHandler |
103 | 103 | */ |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | /** |
116 | 116 | * Get the `monolog.logger.application` service |
117 | 117 | * |
118 | - * @param Container $container The DI container. |
|
118 | + * @param \Joomla\DI\Container $container The DI container. |
|
119 | 119 | * |
120 | 120 | * @return Logger |
121 | 121 | */ |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | /** |
136 | 136 | * Get the `monolog.logger.cli` service |
137 | 137 | * |
138 | - * @param Container $container The DI container. |
|
138 | + * @param \Joomla\DI\Container $container The DI container. |
|
139 | 139 | * |
140 | 140 | * @return Logger |
141 | 141 | */ |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * Get the `monolog.logger.database` service |
154 | 154 | * |
155 | - * @param Container $container The DI container. |
|
155 | + * @param \Joomla\DI\Container $container The DI container. |
|
156 | 156 | * |
157 | 157 | * @return Logger |
158 | 158 | */ |