From bc8c30052c4c17555bf343aec6d969293ca4aa3d Mon Sep 17 00:00:00 2001 From: Formatter Bot Date: Sun, 10 Apr 2022 16:09:45 +0000 Subject: [PATCH] Automated formatting changes --- Account/PermissionAbstract.php | 18 +++++++++--------- Application/StatusAbstract.php | 1 - DataStorage/Database/Mapper/ReadMapper.php | 2 +- Image/Skew.php | 2 +- Module/ModuleManager.php | 1 - Module/PackageManager.php | 1 - Socket/Server/Server.php | 2 +- .../Database/TestModel/BaseModel.php | 2 +- .../Database/TestModel/BaseModelMapper.php | 2 +- tests/Module/InstallerAbstractTest.php | 1 - 10 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Account/PermissionAbstract.php b/Account/PermissionAbstract.php index 63b2031af..d98f6be68 100755 --- a/Account/PermissionAbstract.php +++ b/Account/PermissionAbstract.php @@ -443,7 +443,7 @@ class PermissionAbstract implements \JsonSerializable case PermissionType::PERMISSION: $this->hasPermission = true; break; - }; + } } /** @@ -523,15 +523,15 @@ class PermissionAbstract implements \JsonSerializable public function jsonSerialize() : mixed { return [ - 'id' => $this->id, - 'unit' => $this->unit, - 'app' => $this->app, - 'module' => $this->module, - 'from' => $this->from, + 'id' => $this->id, + 'unit' => $this->unit, + 'app' => $this->app, + 'module' => $this->module, + 'from' => $this->from, 'category' => $this->category, - 'element' => $this->element, - 'component' => $this->component, - 'permission' => $this->getPermission(), + 'element' => $this->element, + 'component' => $this->component, + 'permission' => $this->getPermission(), ]; } } diff --git a/Application/StatusAbstract.php b/Application/StatusAbstract.php index 6680c620b..1fffffd14 100644 --- a/Application/StatusAbstract.php +++ b/Application/StatusAbstract.php @@ -14,7 +14,6 @@ declare(strict_types=1); namespace phpOMS\Application; -use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\System\File\PathException; use phpOMS\System\File\PermissionException; use phpOMS\Utils\Parser\Php\ArrayParser; diff --git a/DataStorage/Database/Mapper/ReadMapper.php b/DataStorage/Database/Mapper/ReadMapper.php index dae1b3195..298b3932b 100644 --- a/DataStorage/Database/Mapper/ReadMapper.php +++ b/DataStorage/Database/Mapper/ReadMapper.php @@ -245,7 +245,7 @@ final class ReadMapper extends DataMapperAbstract $results = $sth->fetchAll(\PDO::FETCH_ASSOC); } } catch (\Throwable $t) { - $results = false; + $results = false; \var_dump($q = $query->toSql()); \var_dump($t->getMessage()); } diff --git a/Image/Skew.php b/Image/Skew.php index ba99cd48b..558e8fa80 100644 --- a/Image/Skew.php +++ b/Image/Skew.php @@ -72,7 +72,7 @@ final class Skew $bestScore = 0; $bestDegree = 0; - for ($i = -$maxDegree; $i < $maxDegree; $i += 1) { + for ($i = -$maxDegree; $i < $maxDegree; ++$i) { if ($i === 0) { continue; } diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index ea55a3d2e..f1df01d32 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -18,7 +18,6 @@ use phpOMS\Application\ApplicationAbstract; use phpOMS\Application\ApplicationInfo; use phpOMS\Autoloader; use phpOMS\DataStorage\Database\Query\Builder; -use phpOMS\Message\Http\HttpRequest; use phpOMS\Message\RequestAbstract; use phpOMS\Module\Exception\InvalidModuleException; diff --git a/Module/PackageManager.php b/Module/PackageManager.php index c22bb40c4..4bf9bcf53 100644 --- a/Module/PackageManager.php +++ b/Module/PackageManager.php @@ -20,7 +20,6 @@ use phpOMS\System\File\Local\LocalStorage; use phpOMS\System\File\PathException; use phpOMS\System\OperatingSystem; use phpOMS\System\SystemType; -use phpOMS\System\SystemUtils; use phpOMS\Utils\IO\Zip\Zip; use phpOMS\Utils\StringUtils; diff --git a/Socket/Server/Server.php b/Socket/Server/Server.php index f6ddd7511..ef4eb187e 100644 --- a/Socket/Server/Server.php +++ b/Socket/Server/Server.php @@ -272,7 +272,7 @@ class Server extends SocketAbstract $this->app->logger->debug('Connecting client...'); $this->app->accountManager->add(new NullAccount(1)); $this->clientManager->add($client = new ClientConnection(new NullAccount(1), $socket)); - $this->conn[$client->getId()] = $socket; + $this->conn[$client->getId()] = $socket; $this->app->logger->debug('Connected client.'); } diff --git a/tests/DataStorage/Database/TestModel/BaseModel.php b/tests/DataStorage/Database/TestModel/BaseModel.php index 8a33563eb..1e24b17a0 100755 --- a/tests/DataStorage/Database/TestModel/BaseModel.php +++ b/tests/DataStorage/Database/TestModel/BaseModel.php @@ -68,7 +68,7 @@ class BaseModel $this->belongsToOne = new BelongsToModel(); $this->serializable = new class() implements SerializableInterface { - public $value = ''; + public $value = ''; public function serialize() : string { diff --git a/tests/DataStorage/Database/TestModel/BaseModelMapper.php b/tests/DataStorage/Database/TestModel/BaseModelMapper.php index 0efa15e07..e6d3af81c 100755 --- a/tests/DataStorage/Database/TestModel/BaseModelMapper.php +++ b/tests/DataStorage/Database/TestModel/BaseModelMapper.php @@ -33,7 +33,7 @@ class BaseModelMapper extends DataMapperFactory 'test_base_float' => ['name' => 'test_base_float', 'type' => 'float', 'internal' => 'float'], 'test_base_json' => ['name' => 'test_base_json', 'type' => 'Json', 'internal' => 'json'], 'test_base_json_serializable' => ['name' => 'test_base_json_serializable', 'type' => 'Json', 'internal' => 'jsonSerializable'], - 'test_base_serializable' => ['name' => 'test_base_serializable', 'type' => 'Serializable', 'internal' => 'serializable'], + 'test_base_serializable' => ['name' => 'test_base_serializable', 'type' => 'Serializable', 'internal' => 'serializable'], 'test_base_datetime' => ['name' => 'test_base_datetime', 'type' => 'DateTime', 'internal' => 'datetime'], 'test_base_datetime_null' => ['name' => 'test_base_datetime_null', 'type' => 'DateTime', 'internal' => 'datetime_null'], 'test_base_owns_one_self' => ['name' => 'test_base_owns_one_self', 'type' => 'int', 'internal' => 'ownsOneSelf'], diff --git a/tests/Module/InstallerAbstractTest.php b/tests/Module/InstallerAbstractTest.php index d51f1e710..c9d9e42ea 100644 --- a/tests/Module/InstallerAbstractTest.php +++ b/tests/Module/InstallerAbstractTest.php @@ -18,7 +18,6 @@ require_once __DIR__ . '/../Autoloader.php'; use Model\CoreSettings; use phpOMS\Application\ApplicationAbstract; -use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\InstallerAbstract; use phpOMS\Module\ModuleInfo;