Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,37 @@ jobs:
uses: ./.github/workflows/prettier.yml
with:
pattern: "**/*.yml"

test-beautysh:
name: Test workflow (beautysh)
needs: format
uses: ./.github/workflows/beautysh.yml
with:
dir: tests/workflows
params: --force-function-style fnpar --indent-size 2

test-mkdocs:
name: Test workflow (mkdocs)
needs: format
uses: ./.github/workflows/mkdocs.yml
with:
plugins: mkdocs-literate-nav
params: --strict

test-php-cs-fixer:
name: Test workflow (php-cs-fixer)
needs: format
uses: ./.github/workflows/php-cs-fixer.yml
with:
params: --dry-run -v --allow-risky=yes --rules=@PSR12:risky .
params: --dry-run -v --rules=@Symfony .

test-prettier:
name: Test workflow (prettier)
needs: format
uses: ./.github/workflows/prettier.yml
with:
pattern: "**/*.json"

test-shellcheck:
name: Test workflow (shellcheck)
needs: format
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- name: Install php-cs-fixer
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: php-cs-fixer:3.38.2
php-version: 8.3
tools: php-cs-fixer:3.75

- name: Check code-style
run: php-cs-fixer fix ${{ inputs.params }}
22 changes: 10 additions & 12 deletions tests/workflows/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,22 @@
*/
class Mock
{
/**
* @var string
*/
protected string $message;
public const string ERROR_MSG = 'oh no!';

/**
* @param string $message
*/
public function __construct(string $message)
public function __construct(protected string $message)
{
$this->message = $message;
}

/**
* @return string
*/
public function getMessage(): string
{
return $this->message;
}

/**
* This should be called on error.
*/
protected function error(): never
{
throw new Exception(self::ERROR_MSG);
}
}