diff --git a/Admin/Install/Structures/Lang/en.lang.php b/Admin/Install/Structures/Lang/en.lang.php index 18d3ea7..8355484 100755 --- a/Admin/Install/Structures/Lang/en.lang.php +++ b/Admin/Install/Structures/Lang/en.lang.php @@ -13,5 +13,5 @@ declare(strict_types=1); return [ - '0100' => '' + '0100' => '', ]; diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 23e49ab..5c3894b 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace Modules\Accounting\Controller; +use phpOMS\Message\Http\RequestStatusCode; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; -use phpOMS\Message\Http\RequestStatusCode; use phpOMS\Model\Message\FormValidation; /** @@ -31,7 +31,7 @@ use phpOMS\Model\Message\FormValidation; */ final class ApiController extends Controller { - /** + /** * Api method to create an account * * @param RequestAbstract $request Request diff --git a/Models/AccountAbstract.php b/Models/AccountAbstract.php index 50d7c27..305b0ae 100755 --- a/Models/AccountAbstract.php +++ b/Models/AccountAbstract.php @@ -85,9 +85,9 @@ abstract class AccountAbstract /** * Get entry. * - * @param \DateTime $start Interval start + * @param \DateTime $start Interval start * @param null|\DateTime $end Interval end - * @param int $dateType Date type by witch the entries should be filtered + * @param int $dateType Date type by witch the entries should be filtered * * @return array * diff --git a/Models/BalanceL11n.php b/Models/BalanceL11n.php index 74b2a2c..eca5cc2 100644 --- a/Models/BalanceL11n.php +++ b/Models/BalanceL11n.php @@ -111,11 +111,11 @@ class BalanceL11n implements \JsonSerializable, ArrayableInterface public function toArray() : array { return [ - 'id' => $this->id, - 'name' => $this->name, + 'id' => $this->id, + 'name' => $this->name, 'description' => $this->description, - 'balance' => $this->balance, - 'language' => $this->language, + 'balance' => $this->balance, + 'language' => $this->language, ]; } diff --git a/Models/CostCenter.php b/Models/CostCenter.php index e9a1ee8..6cf5354 100755 --- a/Models/CostCenter.php +++ b/Models/CostCenter.php @@ -84,8 +84,8 @@ class CostCenter public function toArray() : array { return [ - 'id' => $this->id, - 'code' => $this->code, + 'id' => $this->id, + 'code' => $this->code, 'parent' => $this->parent, ]; } diff --git a/Models/CostCenterL11n.php b/Models/CostCenterL11n.php index bfd327e..28acbe6 100644 --- a/Models/CostCenterL11n.php +++ b/Models/CostCenterL11n.php @@ -111,11 +111,11 @@ class CostCenterL11n implements \JsonSerializable, ArrayableInterface public function toArray() : array { return [ - 'id' => $this->id, - 'name' => $this->name, + 'id' => $this->id, + 'name' => $this->name, 'description' => $this->description, - 'costcenter' => $this->costcenter, - 'language' => $this->language, + 'costcenter' => $this->costcenter, + 'language' => $this->language, ]; } diff --git a/Models/CostObject.php b/Models/CostObject.php index be0626c..05b2f16 100755 --- a/Models/CostObject.php +++ b/Models/CostObject.php @@ -84,8 +84,8 @@ class CostObject public function toArray() : array { return [ - 'id' => $this->id, - 'code' => $this->code, + 'id' => $this->id, + 'code' => $this->code, 'parent' => $this->parent, ]; } diff --git a/Models/CostObjectL11n.php b/Models/CostObjectL11n.php index 2daa7d4..0899168 100644 --- a/Models/CostObjectL11n.php +++ b/Models/CostObjectL11n.php @@ -111,11 +111,11 @@ class CostObjectL11n implements \JsonSerializable, ArrayableInterface public function toArray() : array { return [ - 'id' => $this->id, - 'name' => $this->name, + 'id' => $this->id, + 'name' => $this->name, 'description' => $this->description, - 'costobject' => $this->costobject, - 'language' => $this->language, + 'costobject' => $this->costobject, + 'language' => $this->language, ]; } diff --git a/Models/Creditor.php b/Models/Creditor.php index a0b2c16..7a6fca8 100755 --- a/Models/Creditor.php +++ b/Models/Creditor.php @@ -60,7 +60,7 @@ class Creditor public function toArray() : array { return [ - 'id' => $this->id, + 'id' => $this->id, 'account' => $this->account, ]; } diff --git a/Models/Debitor.php b/Models/Debitor.php index ec8364b..de07d08 100755 --- a/Models/Debitor.php +++ b/Models/Debitor.php @@ -60,7 +60,7 @@ class Debitor public function toArray() : array { return [ - 'id' => $this->id, + 'id' => $this->id, 'account' => $this->account, ]; } diff --git a/Theme/Backend/Lang/no.lang.php b/Theme/Backend/Lang/no.lang.php index 6e82b94..0c77deb 100755 --- a/Theme/Backend/Lang/no.lang.php +++ b/Theme/Backend/Lang/no.lang.php @@ -22,7 +22,7 @@ return ['Accounting' => [ 'CostCenter' => 'Kostnadssted', 'CostCenters' => 'Kostnadssteder', 'CostObject' => 'Kostnadsbærer', - 'CostObjects' => 'Kostnads ​​objekter', + 'CostObjects' => "Kostnads \u{200b}\u{200b}objekter", 'Created' => 'laget', 'Creator' => 'skaperen', 'Credit' => 'Kreditt', diff --git a/Theme/Backend/Lang/sv.lang.php b/Theme/Backend/Lang/sv.lang.php index f39975b..3cf4fe0 100755 --- a/Theme/Backend/Lang/sv.lang.php +++ b/Theme/Backend/Lang/sv.lang.php @@ -22,7 +22,7 @@ return ['Accounting' => [ 'CostCenter' => 'Kostnadscenter', 'CostCenters' => 'Kostnadsställen', 'CostObject' => 'Kostnadsobjekt', - 'CostObjects' => 'Kostnads ​​Objects', + 'CostObjects' => "Kostnads \u{200b}\u{200b}Objects", 'Created' => 'Skapad', 'Creator' => 'Skapare', 'Credit' => 'Kreditera', diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 051ac7e..f5fc99c 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -392,4 +392,4 @@ function phpServe() : void }); } -phpServe(); +\phpServe(); diff --git a/tests/Controller/Api/ApiControllerBatchEntryTrait.php b/tests/Controller/Api/ApiControllerBatchEntryTrait.php index f899196..b17bcdf 100644 --- a/tests/Controller/Api/ApiControllerBatchEntryTrait.php +++ b/tests/Controller/Api/ApiControllerBatchEntryTrait.php @@ -27,7 +27,7 @@ trait ApiControllerBatchEntryTrait */ public function testApiBatchEntryCreate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -45,7 +45,7 @@ trait ApiControllerBatchEntryTrait */ public function testApiBatchEntryCreateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -61,7 +61,7 @@ trait ApiControllerBatchEntryTrait */ public function testApiBatchEntryUpdate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -79,7 +79,7 @@ trait ApiControllerBatchEntryTrait */ public function testApiBatchEntryUpdateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -95,7 +95,7 @@ trait ApiControllerBatchEntryTrait */ public function testApiRecurringEntryCreate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -113,7 +113,7 @@ trait ApiControllerBatchEntryTrait */ public function testApiRecurringEntryCreateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -129,7 +129,7 @@ trait ApiControllerBatchEntryTrait */ public function testApiRecurringEntryUpdate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -147,7 +147,7 @@ trait ApiControllerBatchEntryTrait */ public function testApiRecurringEntryUpdateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; diff --git a/tests/Controller/Api/ApiControllerCostCenterTrait.php b/tests/Controller/Api/ApiControllerCostCenterTrait.php index b9070d4..6511dfb 100644 --- a/tests/Controller/Api/ApiControllerCostCenterTrait.php +++ b/tests/Controller/Api/ApiControllerCostCenterTrait.php @@ -27,7 +27,7 @@ trait ApiControllerCostCenterTrait */ public function testApiCostCenterCreate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -45,7 +45,7 @@ trait ApiControllerCostCenterTrait */ public function testApiCostCenterCreateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -61,7 +61,7 @@ trait ApiControllerCostCenterTrait */ public function testApiCostCenterUpdate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -79,7 +79,7 @@ trait ApiControllerCostCenterTrait */ public function testApiCostCenterUpdateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; diff --git a/tests/Controller/Api/ApiControllerCostObjectTrait.php b/tests/Controller/Api/ApiControllerCostObjectTrait.php index 9d3507e..cad2023 100644 --- a/tests/Controller/Api/ApiControllerCostObjectTrait.php +++ b/tests/Controller/Api/ApiControllerCostObjectTrait.php @@ -27,7 +27,7 @@ trait ApiControllerCostObjectTrait */ public function testApiCostObjectCreate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -45,7 +45,7 @@ trait ApiControllerCostObjectTrait */ public function testApiCostObjectCreateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -61,7 +61,7 @@ trait ApiControllerCostObjectTrait */ public function testApiCostObjectUpdate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -79,7 +79,7 @@ trait ApiControllerCostObjectTrait */ public function testApiCostObjectUpdateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; diff --git a/tests/Controller/Api/ApiControllerTaxKeyTrait.php b/tests/Controller/Api/ApiControllerTaxKeyTrait.php index ed384e5..43a9b00 100644 --- a/tests/Controller/Api/ApiControllerTaxKeyTrait.php +++ b/tests/Controller/Api/ApiControllerTaxKeyTrait.php @@ -27,7 +27,7 @@ trait ApiControllerTaxKeyTrait */ public function testApiTaxKeyCreate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -45,7 +45,7 @@ trait ApiControllerTaxKeyTrait */ public function testApiTaxKeyCreateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -61,7 +61,7 @@ trait ApiControllerTaxKeyTrait */ public function testApiTaxKeyUpdate() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; @@ -79,7 +79,7 @@ trait ApiControllerTaxKeyTrait */ public function testApiTaxKeyUpdateInvalid() : void { - $response = new HttpResponse(); + $response = new HttpResponse(); $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index c5ddba5..856c02b 100644 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -15,13 +15,13 @@ declare(strict_types=1); namespace Modules\Accounting\tests\Controller; use Model\CoreSettings; -use Modules\Admin\Models\AccountPermission; use Modules\Accounting\tests\Controller\Api\ApiControllerAccountTrait; +use Modules\Accounting\tests\Controller\Api\ApiControllerBatchEntryTrait; use Modules\Accounting\tests\Controller\Api\ApiControllerCostCenterTrait; use Modules\Accounting\tests\Controller\Api\ApiControllerCostObjectTrait; -use Modules\Accounting\tests\Controller\Api\ApiControllerTaxKeyTrait; use Modules\Accounting\tests\Controller\Api\ApiControllerEntryTrait; -use Modules\Accounting\tests\Controller\Api\ApiControllerBatchEntryTrait; +use Modules\Accounting\tests\Controller\Api\ApiControllerTaxKeyTrait; +use Modules\Admin\Models\AccountPermission; use phpOMS\Account\Account; use phpOMS\Account\AccountManager; use phpOMS\Account\PermissionType; diff --git a/tests/Models/AccountAbstractTest.php b/tests/Models/AccountAbstractTest.php index c37a739..47adee5 100644 --- a/tests/Models/AccountAbstractTest.php +++ b/tests/Models/AccountAbstractTest.php @@ -37,8 +37,8 @@ final class AccountAbstractTest extends \PHPUnit\Framework\TestCase public function testDefault() : void { self::assertEquals(0, $this->class->getId()); - self::assertEquals(null, $this->class->summaryAccount); - self::assertEquals(null, $this->class->getEntryById(0)); + self::assertNull($this->class->summaryAccount); + self::assertNull($this->class->getEntryById(0)); self::assertEquals([], $this->class->getEntriesByDate(new \DateTime())); } } diff --git a/tests/Models/BalanceL11nTest.php b/tests/Models/BalanceL11nTest.php index a415c8f..2049451 100644 --- a/tests/Models/BalanceL11nTest.php +++ b/tests/Models/BalanceL11nTest.php @@ -81,18 +81,18 @@ final class BalanceL11nTest extends \PHPUnit\Framework\TestCase */ public function testSerialize() : void { - $this->l11n->name = 'Title'; + $this->l11n->name = 'Title'; $this->l11n->description = 'Description'; - $this->l11n->balance = 2; + $this->l11n->balance = 2; $this->l11n->setLanguage(ISO639x1Enum::_DE); self::assertEquals( [ - 'id' => 0, - 'name' => 'Title', + 'id' => 0, + 'name' => 'Title', 'description' => 'Description', - 'balance' => 2, - 'language' => ISO639x1Enum::_DE, + 'balance' => 2, + 'language' => ISO639x1Enum::_DE, ], $this->l11n->jsonSerialize() ); diff --git a/tests/Models/BatchPostingTest.php b/tests/Models/BatchPostingTest.php index 7ab9306..190df6d 100644 --- a/tests/Models/BatchPostingTest.php +++ b/tests/Models/BatchPostingTest.php @@ -41,7 +41,7 @@ final class BatchPostingTest extends \PHPUnit\Framework\TestCase self::assertEquals(0, $this->batch->creator); self::assertEquals('', $this->batch->description); self::assertEquals(0, $this->batch->count()); - self::assertEquals(null, $this->batch->getPosting(1)); + self::assertNull($this->batch->getPosting(1)); self::assertInstanceOf('\DateTimeImmutable', $this->batch->created); } } diff --git a/tests/Models/CostCenterL11nTest.php b/tests/Models/CostCenterL11nTest.php index 51fc4f9..88e4261 100644 --- a/tests/Models/CostCenterL11nTest.php +++ b/tests/Models/CostCenterL11nTest.php @@ -81,18 +81,18 @@ final class CostCenterL11nTest extends \PHPUnit\Framework\TestCase */ public function testSerialize() : void { - $this->l11n->name = 'Title'; - $this->l11n->description = 'Description'; + $this->l11n->name = 'Title'; + $this->l11n->description = 'Description'; $this->l11n->costcenter = 2; $this->l11n->setLanguage(ISO639x1Enum::_DE); self::assertEquals( [ - 'id' => 0, - 'name' => 'Title', + 'id' => 0, + 'name' => 'Title', 'description' => 'Description', - 'costcenter' => 2, - 'language' => ISO639x1Enum::_DE, + 'costcenter' => 2, + 'language' => ISO639x1Enum::_DE, ], $this->l11n->jsonSerialize() ); diff --git a/tests/Models/CostCenterTest.php b/tests/Models/CostCenterTest.php index 2301920..a37121c 100755 --- a/tests/Models/CostCenterTest.php +++ b/tests/Models/CostCenterTest.php @@ -72,8 +72,8 @@ final class CostCenterTest extends \PHPUnit\Framework\TestCase self::assertEquals( [ - 'id' => 0, - 'code' => '123', + 'id' => 0, + 'code' => '123', 'parent' => null, ], $this->cc->jsonSerialize() diff --git a/tests/Models/CostObjectL11nTest.php b/tests/Models/CostObjectL11nTest.php index 80be056..515677b 100644 --- a/tests/Models/CostObjectL11nTest.php +++ b/tests/Models/CostObjectL11nTest.php @@ -81,18 +81,18 @@ final class CostObjectL11nTest extends \PHPUnit\Framework\TestCase */ public function testSerialize() : void { - $this->l11n->name = 'Title'; - $this->l11n->description = 'Description'; + $this->l11n->name = 'Title'; + $this->l11n->description = 'Description'; $this->l11n->costobject = 2; $this->l11n->setLanguage(ISO639x1Enum::_DE); self::assertEquals( [ - 'id' => 0, - 'name' => 'Title', + 'id' => 0, + 'name' => 'Title', 'description' => 'Description', - 'costobject' => 2, - 'language' => ISO639x1Enum::_DE, + 'costobject' => 2, + 'language' => ISO639x1Enum::_DE, ], $this->l11n->jsonSerialize() ); diff --git a/tests/Models/CostObjectTest.php b/tests/Models/CostObjectTest.php index a74f3a5..81ceab6 100755 --- a/tests/Models/CostObjectTest.php +++ b/tests/Models/CostObjectTest.php @@ -72,8 +72,8 @@ final class CostObjectTest extends \PHPUnit\Framework\TestCase self::assertEquals( [ - 'id' => 0, - 'code' => '123', + 'id' => 0, + 'code' => '123', 'parent' => null, ], $this->co->jsonSerialize() diff --git a/tests/Models/CreditorTest.php b/tests/Models/CreditorTest.php index d53658b..10ef5ff 100644 --- a/tests/Models/CreditorTest.php +++ b/tests/Models/CreditorTest.php @@ -48,7 +48,7 @@ final class CreditorTest extends \PHPUnit\Framework\TestCase { self::assertEquals( [ - 'id' => 0, + 'id' => 0, 'account' => null, ], $this->creditor->jsonSerialize() diff --git a/tests/Models/DebitorTest.php b/tests/Models/DebitorTest.php index 0f7f69c..61d0f7f 100644 --- a/tests/Models/DebitorTest.php +++ b/tests/Models/DebitorTest.php @@ -48,7 +48,7 @@ final class DebitorTest extends \PHPUnit\Framework\TestCase { self::assertEquals( [ - 'id' => 0, + 'id' => 0, 'account' => null, ], $this->debitor->jsonSerialize()