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
4 changes: 2 additions & 2 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
- name: Install Dependencies
run: composer update --no-interaction --no-progress

- name: Run PHPCS
run: composer run cs
- name: Run cs fixer
run: composer run cs-dry-run

- name: Run PHPStan
run: composer run static
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
- name: Install cdependencies
run: composer update --no-interaction --no-progress

- name: Tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ vendor/
/composer.lock
/.phpunit.result.cache
/.phpunit.cache
/.php-cs-fixer.cache
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"require-dev": {
"phpunit/phpunit": "^11.5",
"squizlabs/php_codesniffer": "^3.2",
"phpstan/phpstan": "^1.2.0"
"phpstan/phpstan": "^2.1",
"friendsofphp/php-cs-fixer": "*"
},
"require": {
"php" : ">=8.2",
Expand All @@ -37,9 +37,13 @@
"psr-4": { "PhpSchool\\CliMenuTest\\": "test/" }
},
"scripts" : {
"cs-dry-run" : [
"php-cs-fixer check src --rules=@PSR12",
"php-cs-fixer check test --rules=@PSR12"
],
"cs" : [
"phpcs src --standard=PSR2",
"phpcs test --standard=PSR2"
"php-cs-fixer fix src --rules=@PSR12",
"php-cs-fixer fix test --rules=@PSR12"
],
"static" : [
"phpstan analyse src --level=7"
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
parameters:
checkMissingIterableValueType: false
3 changes: 2 additions & 1 deletion src/Action/ExitAction.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace PhpSchool\CliMenu\Action;
Expand All @@ -10,7 +11,7 @@
*/
class ExitAction
{
public function __invoke(CliMenu $menu) : void
public function __invoke(CliMenu $menu): void
{
$menu->close();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Action/GoBackAction.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace PhpSchool\CliMenu\Action;
Expand All @@ -10,7 +11,7 @@
*/
class GoBackAction
{
public function __invoke(CliMenu $menu) : void
public function __invoke(CliMenu $menu): void
{
if ($parent = $menu->getParent()) {
$menu->closeThis();
Expand Down
Loading