Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
toby7002 committed Oct 19, 2023
1 parent 9d3ce90 commit cb7c980
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/thebigcrafter/omp/OhMyPMMP.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use pocketmine\plugin\PluginBase;
use pocketmine\utils\SingletonTrait;
use pocketmine\utils\TextFormat;
use Symfony\Component\Filesystem\Path;
use thebigcrafter\Fluorine\Fluorine;
use thebigcrafter\Iodine\Iodine;
Expand Down
5 changes: 1 addition & 4 deletions src/thebigcrafter/omp/cache/InstalledPluginCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

namespace thebigcrafter\omp\cache;

use function count;
use function sort;

class InstalledPluginCache
{
public function __construct(private string $name, private string $version, private string $description)
Expand All @@ -28,7 +25,7 @@ public function getVersion() : string {
return $this->version;
}

public function getDescription(): string {
public function getDescription() : string {
return $this->description;
}
}
1 change: 0 additions & 1 deletion src/thebigcrafter/omp/cache/InstalledPluginsPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace thebigcrafter\omp\cache;

use Generator;
use SplObjectStorage;

final class InstalledPluginsPool {
Expand Down
3 changes: 0 additions & 3 deletions src/thebigcrafter/omp/commands/subcommands/HelpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

use CortexPE\Commando\BaseSubCommand;
use pocketmine\command\CommandSender;
use pocketmine\Server;
use thebigcrafter\omp\OhMyPMMP;
use function phpversion;

class HelpCommand extends BaseSubCommand {
protected function prepare() : void {
Expand Down
13 changes: 9 additions & 4 deletions src/thebigcrafter/omp/commands/subcommands/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@
use CortexPE\Commando\args\RawStringArgument;
use CortexPE\Commando\BaseSubCommand;
use pocketmine\command\CommandSender;
use pocketmine\Server;
use thebigcrafter\omp\cache\InstalledPluginCache;
use thebigcrafter\omp\cache\InstalledPluginsPool;
use thebigcrafter\omp\cache\PluginCache;
use thebigcrafter\omp\cache\PluginsPool;
use thebigcrafter\omp\OhMyPMMP;
use function phpversion;
use function ceil;
use function count;
use function implode;
use function iterator_count;
use function max;
use function var_dump;
use const PHP_EOL;

class ListCommand extends BaseSubCommand {
const PLUGINS_PER_PAGE = 10;
Expand Down Expand Up @@ -99,7 +104,7 @@ public function onRun(CommandSender $sender,string $aliasUsed,array $args) : voi
}
}

private function renderPluginsBlock(CommandSender $sender, PluginCache $plugin): void
private function renderPluginsBlock(CommandSender $sender, PluginCache $plugin) : void
{
$sender->sendMessage("================" . PHP_EOL);
$sender->sendMessage("# " . OhMyPMMP::getLanguage()->translate("command.list.plugin.name", ["name" => $plugin->getName()]));
Expand All @@ -112,7 +117,7 @@ private function renderPluginsBlock(CommandSender $sender, PluginCache $plugin):
$sender->sendMessage("================" . PHP_EOL . PHP_EOL);
}

private function renderInstalledPluginsBlock(CommandSender $sender, InstalledPluginCache $plugin): void
private function renderInstalledPluginsBlock(CommandSender $sender, InstalledPluginCache $plugin) : void
{
$sender->sendMessage("================" . PHP_EOL);
$sender->sendMessage("# " . OhMyPMMP::getLanguage()->translate("command.list.plugin.name", ["name" => $plugin->getName()]));
Expand Down
1 change: 1 addition & 0 deletions src/thebigcrafter/omp/lang/OMPLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function setDefaultLanguage(string $name) : void

/**
* @param array<string, string> $placeholders
* @throws Exception
*/
public function translate(string $key, array $placeholders = []) : string
{
Expand Down
8 changes: 0 additions & 8 deletions src/thebigcrafter/omp/tasks/CacheInstalledPlugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,12 @@

namespace thebigcrafter\omp\tasks;

use pocketmine\utils\InternetException;
use thebigcrafter\Iodine\Future;
use thebigcrafter\Iodine\Iodine;
use thebigcrafter\omp\cache\InstalledPluginCache;
use thebigcrafter\omp\cache\InstalledPluginsPool;
use thebigcrafter\omp\cache\PluginCache;
use thebigcrafter\omp\cache\PluginsPool;
use thebigcrafter\omp\cache\PluginVersion;
use thebigcrafter\omp\OhMyPMMP;
use thebigcrafter\omp\utils\Internet;
use thebigcrafter\omp\Vars;
use function array_merge;
use function count;
use function json_decode;
use function sort;

class CacheInstalledPlugins
Expand Down

0 comments on commit cb7c980

Please sign in to comment.