Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Luke Towers <[email protected]>
  • Loading branch information
jaxwilko and LukeTowers authored Jan 5, 2025
1 parent 6900cae commit d8d9850
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/system/classes/UpdateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function init()

public function isSystemSetup(): bool
{
return !Schema::hasTable($this->getMigrationTableName());
return Schema::hasTable($this->getMigrationTableName());
}

public function getMigrationTableName(): string
Expand Down
4 changes: 2 additions & 2 deletions modules/system/classes/extensions/ModuleManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function list(): array

public function create(string $extension): WinterExtension
{
throw new ApplicationException('Support for creating extensions needs implementing');
throw new ApplicationException('Support for creating modules is not implemented.');
}

public function install(WinterExtension|ExtensionSource|string $extension): WinterExtension
Expand Down Expand Up @@ -88,7 +88,7 @@ public function update(WinterExtension|string|null $extension = null, bool $migr
{
$modules = $this->getModuleList($extension);

$firstUp = UpdateManager::instance()->isSystemSetup();
$firstUp = !UpdateManager::instance()->isSystemSetup();

if ($firstUp) {
$this->repository->createRepository();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Exception;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Lang;
use October\Rain\Exception\ApplicationException;
use Winter\Storm\Exception\ApplicationException;
use System\Classes\Core\MarketPlaceApi;
use System\Models\Parameter;
use Winter\Storm\Support\Facades\Flash;
Expand Down
3 changes: 2 additions & 1 deletion modules/system/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ php artisan plugin:refresh Acme.Blog
> **Note:** If your plugin uses [configuration files](../plugin/settings#file-configuration), then you will need to run `System\Classes\PluginManager::instance()->registerAll(true);` in the `setUp` method of your tests. Below is an example of a base test case class that should be used if you need to test your plugin working with other plugins instead of in isolation.
```php
use System\Classes\Extensions\PluginManager;use System\Tests\Bootstrap\PluginTestCase;
use System\Classes\Extensions\PluginManager;
use System\Tests\Bootstrap\PluginTestCase;

class BaseTestCase extends PluginTestCase
{
Expand Down

0 comments on commit d8d9850

Please sign in to comment.