diff --git a/.gitignore b/.gitignore index 57301af..7ea4369 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ application/tmp application/plugins/admin application/plugins/ application/install +vendor diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6e791cb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,22 @@ +fail_fast: true +repos: + - repo: git@github.com:justin-at-demac/pre-commit-php.git + rev: 3.0.1 + hooks: + - id: php-lint + #- id: php-cbf + #files: \.(php)$ + - id: php-no-var_dumps + - id: php-no-exits + #- id: php-cs + #files: \.(php)$ + - id: php-stan + files: \.(php)$ + args: ["--configuration=phpstan.neon"] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: check-json + - id: check-xml + - id: check-yaml + - id: check-merge-conflict diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..4e95374 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "phpstan/phpstan": "^1.11" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..a69bf08 --- /dev/null +++ b/composer.lock @@ -0,0 +1,77 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "e9c4fafa828c232a9015abc7fdf24c75", + "packages": [], + "packages-dev": [ + { + "name": "phpstan/phpstan", + "version": "1.11.3", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "e64220a05c1209fc856d58e789c3b7a32c0bb9a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e64220a05c1209fc856d58e789c3b7a32c0bb9a5", + "reference": "e64220a05c1209fc856d58e789c3b7a32c0bb9a5", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2024-05-31T13:53:37+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +}