Skip to content

Commit

Permalink
Configure CS fixer in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Jan 7, 2025
1 parent 40399b8 commit b46510f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/cs-fix.yml
Original file line number Diff line number Diff line change
@@ -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

...
28 changes: 14 additions & 14 deletions tests/ORM/Functional/Driver/Common/Integration/Case6/CaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b46510f

Please sign in to comment.