diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-08 09:31:49 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-08 09:31:49 +0400 |
commit | 84eba85074891bfa6a718ae413a1d87ced4f28ca (patch) | |
tree | 6df358670aba14da2883dd68434b326edc6a50fe /plugins/CorePluginsAdmin/PluginInstaller.php | |
parent | 1fa8da9b963e99e08c829fe6491e8ccf2d1054e2 (diff) |
Applying phpstorm code style PSR refs #3771
Diffstat (limited to 'plugins/CorePluginsAdmin/PluginInstaller.php')
-rw-r--r-- | plugins/CorePluginsAdmin/PluginInstaller.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/CorePluginsAdmin/PluginInstaller.php b/plugins/CorePluginsAdmin/PluginInstaller.php index 10d7b454bd..b517b91b73 100644 --- a/plugins/CorePluginsAdmin/PluginInstaller.php +++ b/plugins/CorePluginsAdmin/PluginInstaller.php @@ -9,8 +9,8 @@ * @package CorePluginsAdmin */ namespace Piwik\Plugins\CorePluginsAdmin; -use Piwik\Filechecks; +use Piwik\Filechecks; use Piwik\Filesystem; use Piwik\SettingsPiwik; use Piwik\Unzip; @@ -22,7 +22,7 @@ use Piwik\Unzip; class PluginInstaller { const PATH_TO_DOWNLOAD = '/tmp/latest/plugins/'; - const PATH_TO_EXTRACT = '/plugins/'; + const PATH_TO_EXTRACT = '/plugins/'; private $pluginName; @@ -33,7 +33,7 @@ class PluginInstaller public function installOrUpdatePluginFromMarketplace() { - $tmpPluginZip = PIWIK_USER_PATH . self::PATH_TO_DOWNLOAD . $this->pluginName . '.zip'; + $tmpPluginZip = PIWIK_USER_PATH . self::PATH_TO_DOWNLOAD . $this->pluginName . '.zip'; $tmpPluginFolder = PIWIK_USER_PATH . self::PATH_TO_DOWNLOAD . $this->pluginName; $tmpPluginZip = SettingsPiwik::rewriteTmpPathWithHostname($tmpPluginZip); @@ -87,7 +87,7 @@ class PluginInstaller } catch (\Exception $e) { try { - $downloadUrl = $marketplace->getDownloadUrl($this->pluginName); + $downloadUrl = $marketplace->getDownloadUrl($this->pluginName); $errorMessage = sprintf('Failed to download plugin from %s: %s', $downloadUrl, $e->getMessage()); } catch (\Exception $ex) { @@ -144,7 +144,7 @@ class PluginInstaller if (!preg_match('/^[a-zA-Z0-9_-]+$/', $metadata->name)) { throw new PluginInstallerException('The plugin name specified in plugin.json contains illegal characters. ' . - 'Plugin name can only contain following characters: [a-zA-Z0-9-_].'); + 'Plugin name can only contain following characters: [a-zA-Z0-9-_].'); } if (empty($metadata->version)) { @@ -201,7 +201,7 @@ class PluginInstaller } $from = $tmpPluginFolder . DIRECTORY_SEPARATOR . $firstSubFolder; - $to = $tmpPluginFolder . DIRECTORY_SEPARATOR . $this->pluginName; + $to = $tmpPluginFolder . DIRECTORY_SEPARATOR . $this->pluginName; rename($from, $to); } @@ -238,7 +238,7 @@ class PluginInstaller private function makeSurePluginNameIsValid() { try { - $marketplace = new MarketplaceApiClient(); + $marketplace = new MarketplaceApiClient(); $pluginDetails = $marketplace->getPluginInfo($this->pluginName); } catch (\Exception $e) { throw new PluginInstallerException($e->getMessage()); |