diff --git a/.github/workflows/cs-fix.yml b/.github/workflows/cs-fix.yml new file mode 100644 index 00000000..db5860c9 --- /dev/null +++ b/.github/workflows/cs-fix.yml @@ -0,0 +1,16 @@ +--- + +on: # yamllint disable-line rule:truthy + push: + branches: + - '*' + +name: Fix Code Style + +jobs: + cs-fix: + permissions: + contents: write + uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master + +... diff --git a/tests/ORM/Functional/Driver/Common/Integration/Case6/CaseTest.php b/tests/ORM/Functional/Driver/Common/Integration/Case6/CaseTest.php index 951643fe..0cc8a193 100644 --- a/tests/ORM/Functional/Driver/Common/Integration/Case6/CaseTest.php +++ b/tests/ORM/Functional/Driver/Common/Integration/Case6/CaseTest.php @@ -15,6 +15,20 @@ abstract class CaseTest extends BaseTest use IntegrationTestTrait; use TableTrait; + public function testSelect(): void + { + /** @var User $model */ + $model = (new Select($this->orm, User::class)) + ->wherePK(1) + ->fetchOne(); + + $this->assertSame('foo', $model->getLogin()); + $this->expectException(\Error::class); + $this->expectExceptionMessage('Cannot access non-public property ' . User::class . '::$login'); + + $model->login = 'new login'; + } + public function setUp(): void { // Init DB @@ -35,18 +49,4 @@ public function setUp(): void ], ); } - - public function testSelect(): void - { - /** @var User $model */ - $model = (new Select($this->orm,User::class)) - ->wherePK(1) - ->fetchOne(); - - $this->assertSame('foo', $model->getLogin()); - $this->expectException(\Error::class); - $this->expectExceptionMessage('Cannot access non-public property ' . User::class . '::$login'); - - $model->login = 'new login'; - } } diff --git a/tests/ORM/Functional/Driver/Common/Integration/Case6/Entity/User.php b/tests/ORM/Functional/Driver/Common/Integration/Case6/Entity/User.php index 44095601..74d6e8f0 100644 --- a/tests/ORM/Functional/Driver/Common/Integration/Case6/Entity/User.php +++ b/tests/ORM/Functional/Driver/Common/Integration/Case6/Entity/User.php @@ -16,7 +16,7 @@ public function __construct(string $login) public function getId(): ?string { - return $this->id === null ? null : (string)$this->id; + return $this->id === null ? null : (string) $this->id; } public function getLogin(): string