diff --git a/justfile b/justfile index 9954e4b9..07e04916 100644 --- a/justfile +++ b/justfile @@ -2,13 +2,25 @@ default: @just --list -# Runs rector, showing what changes will be make -rector-dry-run: - tools/vendor/bin/rector process --config=tools/rector.php --dry-run src tests +# ------------------------------------------------------------------- +# Front-end stuff +# ------------------------------------------------------------------- -# Runs rector, and updates the source files -rector: - tools/vendor/bin/rector process --config=tools/rector.php src tests +# Builds/optimizes JS and CSS +build: + cd frontEndSrc && npm run build && cd .. + +# Builds/optimizes CSS +css: + composer run-script build:css + +# Builds/optimizes JS +js: + composer run-script build:js + +# ------------------------------------------------------------------- +# Code Quality and Formatting +# ------------------------------------------------------------------- # Check code formatting check-fmt: @@ -18,6 +30,22 @@ check-fmt: fmt: tools/vendor/bin/php-cs-fixer fix --verbose +# Runs phpstan code check +phpstan: + composer run-script phpstan + +# Runs rector, showing what changes will be make +rector-dry-run: + tools/vendor/bin/rector process --config=tools/rector.php --dry-run src tests + +# Runs rector, and updates the source files +rector: + tools/vendor/bin/rector process --config=tools/rector.php src tests + +# ------------------------------------------------------------------- +# Testing +# ------------------------------------------------------------------- + # Run tests test: composer run-script test @@ -26,10 +54,14 @@ test: test-update: composer run-script test-update -# Update the per-file header comments -update-headers: - php tools/update_header_comments.php - # Run unit tests and generate test-coverage report coverage: - composer run-script coverage \ No newline at end of file + composer run-script coverage + +# ------------------------------------------------------------------- +# Misc +# ------------------------------------------------------------------- + +# Update the per-file header comments +update-headers: + php tools/update_header_comments.php \ No newline at end of file diff --git a/phpstan.neon b/phpstan.neon index 1706927e..3e66a005 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -9,11 +9,12 @@ parameters: - ./console - index.php ignoreErrors: - - "#Offset 'fields' does not exist on array#" - - '#Function imagepalletetotruecolor not found#' + - '#Unable to resolve the template type T#' + - '#imagepalletetotruecolor not found#' - '#Call to an undefined method Aura\\\Html\\\HelperLocator::[a-zA-Z0-9_]+\(\)#' - '#Call to an undefined method Query\\QueryBuilderInterface::[a-zA-Z0-9_]+\(\)#' - excludes_analyse: + excludePaths: + - src/Ion/Type/Stringy.php - tests/mocks.php - vendor # These are objects that basically can return anything diff --git a/tools/composer.json b/tools/composer.json index d1d3c047..d6a58ef1 100644 --- a/tools/composer.json +++ b/tools/composer.json @@ -1,6 +1,6 @@ { "require": { "friendsofphp/php-cs-fixer": "^3.6", - "rector/rector": "^0.15.21" + "rector/rector": "^0.16.0" } }