Skip to content

Commit

Permalink
chore: fix code indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jsantos42 committed Oct 11, 2024
1 parent 54017d8 commit 5a23e0d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions plugins/CorePluginsAdmin/Commands/InstallPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ protected function doExecute(): int
$output = $this->getOutput();
$pluginManager = Manager::getInstance();

if (!Marketplace::isMarketplaceEnabled()) {
$output->writeln(sprintf("<error>Marketplace is not enabled, can't install plugins.</error>"));
return self::FAILURE;
}
if (!Marketplace::isMarketplaceEnabled()) {
$output->writeln(sprintf("<error>Marketplace is not enabled, can't install plugins.</error>"));
return self::FAILURE;
}

$pluginNames = $input->getArgument('plugin');

Expand Down Expand Up @@ -68,7 +68,7 @@ private function installPlugin(string $pluginName): void
$pluginInstaller->installOrUpdatePluginFromMarketplace($pluginName);

$pluginManager = Manager::getInstance();
$pluginManager->loadPlugin($pluginName);
$pluginManager->installLoadedPlugins();
$pluginManager->loadPlugin($pluginName);
$pluginManager->installLoadedPlugins();
}
}
6 changes: 3 additions & 3 deletions plugins/Marketplace/Api/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ public function getDownloadUrl($pluginOrThemeName)
{
$plugin = $this->getPluginInfo($pluginOrThemeName);

if (empty($plugin['isDownloadable'])) {
throw new Exception('Plugin is not downloadable. License may be missing or expired.');
}
if (empty($plugin['isDownloadable'])) {
throw new Exception('Plugin is not downloadable. License may be missing or expired.');
}

if (empty($plugin['versions'])) {
throw new Exception('Plugin has no versions.');
Expand Down
12 changes: 6 additions & 6 deletions plugins/Marketplace/tests/System/Api/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ public function testGetDownloadUrl()
$this->assertRegExp('/\d+\.\d+\.\d+/', $version);
}

public function testGetDownloadUrlMissingLicense()
{
$this->expectException(\Piwik\Plugins\Marketplace\Api\Exception::class);
$this->expectExceptionMessage('Plugin is not downloadable');
public function testGetDownloadUrlMissingLicense()
{
$this->expectException(\Piwik\Plugins\Marketplace\Api\Exception::class);
$this->expectExceptionMessage('Plugin is not downloadable');

$this->client->getDownloadUrl('FormAnalytics');
}
$this->client->getDownloadUrl('FormAnalytics');
}

public function testClientResponseShouldBeCached()
{
Expand Down

0 comments on commit 5a23e0d

Please sign in to comment.