diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..5433f35
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,49 @@
+name: Tests
+
+on:
+ pull_request:
+ branches: [main]
+ push:
+ branches: [main]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Install PHP 8.4
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: "8.4"
+ ini-values: date.timezone='UTC'
+ extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, pgsql, pdo_pgsql, bcmath, soap, intl, gd, exif, iconv, imagick
+ coverage: pcov
+ tools: composer:v2
+
+ - name: Add PHP symlink for php84
+ run: sudo ln -s /usr/bin/php /usr/bin/php84
+
+ - name: Validate composer.json and composer.lock
+ run: composer validate --strict
+
+ - name: Run PHP Lint
+ uses: overtrue/phplint@9.5.6
+ with:
+ path: ./src
+
+# - name: Cache Composer packages
+# uses: actions/cache@v3
+# with:
+# path: vendor
+# key: ${{ runner.os }}-php-${{ hashFiles('composer.lock') }}
+# restore-keys: |
+# ${{ runner.os }}-php-
+
+ - name: Install dependencies
+ run: composer test-init
+
+# - name: Static analysis
+# run: composer qa
diff --git a/.gitignore b/.gitignore
index fd322bd..15699a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
/docs/
/release/
/symlinks.cmd
+/vendor/
diff --git a/Gruntfile.js b/Gruntfile.js
index 5d6a61c..be12490 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -19,11 +19,6 @@ module.exports = function(grunt) {
},
// Task configurations
- phplint: {
- plugin: [
- '<%= dirs.plugin %>/**/*.php'
- ]
- },
// phpdocumentor: {
// options: {
// command: 'run'
@@ -225,7 +220,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// grunt.loadNpmTasks('grunt-phpdocumentor');
- grunt.loadNpmTasks('grunt-phplint');
grunt.loadNpmTasks('grunt-wp-i18n');
// TODO: Check out plugin-grunt-tasks ( https://github.com/Yoast/plugin-grunt-tasks )
@@ -234,11 +228,10 @@ module.exports = function(grunt) {
grunt.registerTask('ctd', ['checktextdomain']);
// grunt.registerTask('phpdoc', ['phpdocumentor']);
- grunt.registerTask('default', ['jshint', 'phplint:plugin', 'csslint:plugin', 'ctd:plugin']);
+ grunt.registerTask('default', ['jshint', 'csslint:plugin', 'ctd:plugin']);
grunt.registerTask('build:release', [
'jshint',
- 'phplint:plugin',
'csslint:plugin',
'ctd:plugin',
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..b0e17d0
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,60 @@
+{
+ "name": "igorcode/i-order-terms",
+ "description": "I Order Terms - WordPress plugin",
+ "homepage": "https://github.com/IgorCode/i-order-terms",
+ "type": "project",
+ "license": "GPL-2.0-only",
+ "authors": [
+ {
+ "name": "Igor Jerosimić",
+ "homepage": "https://igor.jerosimic.net",
+ "role": "Developer"
+ }
+ ],
+
+ "minimum-stability": "stable",
+ "require": {
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^2.1"
+ },
+ "config": {
+ "process-timeout": 600
+ },
+ "repositories": [
+ {
+ "type": "composer",
+ "url": "https://wpackagist.org"
+ }
+ ],
+
+ "scripts": {
+ "qa-phpstan": [
+ "./vendor/bin/phpstan analyse --configuration phpstan.neon"
+ ],
+ "qa": [
+ "# PHPStan Lint",
+ "@qa-phpstan"
+ ],
+ "dev-init": [
+ "# Composer update",
+ "composer update"
+ ],
+ "prod-init": [
+ "# Composer install",
+ "composer install --prefer-dist --no-dev --no-scripts --optimize-autoloader"
+ ],
+ "test-init": [
+ "# Composer install",
+ "composer install --no-progress --optimize-autoloader --prefer-dist"
+ ]
+ },
+ "scripts-descriptions": {
+ "qa": "Run QA on code.",
+ "qa-phpstan": "Run static analyses with phpstan.",
+ "dev-init": "Init dev environment.",
+ "prod-init": "Init prod environment.",
+ "test-init": "Init test environment."
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..2db631a
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,79 @@
+{
+ "_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": "1bdc2270090a1dc942528821c1b26268",
+ "packages": [],
+ "packages-dev": [
+ {
+ "name": "phpstan/phpstan",
+ "version": "2.1.11",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan.git",
+ "reference": "8ca5f79a8f63c49b2359065832a654e1ec70ac30"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8ca5f79a8f63c49b2359065832a654e1ec70ac30",
+ "reference": "8ca5f79a8f63c49b2359065832a654e1ec70ac30",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4|^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": "2025-03-24T13:45:00+00:00"
+ }
+ ],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": {
+ "php": ">=7.0.0"
+ },
+ "platform-dev": [],
+ "plugin-api-version": "2.3.0"
+}
diff --git a/package-lock.json b/package-lock.json
index f7c8f19..afa97e1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -18,7 +18,6 @@
"grunt-contrib-jshint": "~3.2.0",
"grunt-contrib-uglify": "~5.2.2",
"grunt-contrib-watch": "~1.1.0",
- "grunt-phplint": "~0.1.0",
"grunt-wp-i18n": "~1.0.3",
"time-grunt": "~2.0.0"
},
@@ -298,19 +297,6 @@
"integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==",
"dev": true
},
- "node_modules/cache-swap": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/cache-swap/-/cache-swap-0.3.0.tgz",
- "integrity": "sha512-rwePCa4iVqXHrEEmQEoLR3Kea4aCTCf7JfX+mJA4Fd61Vb738TItRRv1v++emp9wfnRUKbXpIYfRJY4ThWK09g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "mkdirp": "^0.5.1",
- "object-assign": "^4.0.1",
- "rimraf": "^2.4.0"
- }
- },
"node_modules/call-bind-apply-helpers": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
@@ -393,20 +379,6 @@
"node": ">=0.8"
}
},
- "node_modules/coffee-script": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz",
- "integrity": "sha512-QjQ1T4BqyHv19k6XSfdhy/QLlIOhywz0ekBUCa9h71zYMJlfDTGan/Z1JXzYkZ6v8R+GhvL/p4FZPbPW8WNXlg==",
- "deprecated": "CoffeeScript on NPM has moved to \"coffeescript\" (no hyphen)",
- "dev": true,
- "bin": {
- "cake": "bin/cake",
- "coffee": "bin/coffee"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -1613,392 +1585,6 @@
"node": ">=10"
}
},
- "node_modules/grunt-phplint": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/grunt-phplint/-/grunt-phplint-0.1.0.tgz",
- "integrity": "sha512-Fac/6pP1VEZhTNSN5kMc341yxyLVr7uvSChzBmAV4XOANH2MTf1eIeY7cTRER+PyY054dkdN/Eh6z2CG1nuaYw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cache-swap": "~0.3.0",
- "grunt": "~0.4.1"
- }
- },
- "node_modules/grunt-phplint/node_modules/argparse": {
- "version": "0.1.16",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz",
- "integrity": "sha512-LjmC2dNpdn2L4UzyoaIr11ELYoLn37ZFy9zObrQFHsSuOepeUEMKnM8w5KL4Tnrp2gy88rRuQt6Ky8Bjml+Baw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "underscore": "~1.7.0",
- "underscore.string": "~2.4.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/argparse/node_modules/underscore.string": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
- "integrity": "sha512-yxkabuCaIBnzfIvX3kBxQqCs0ar/bfJwDnFEHJUm/ZrRVhT3IItdRF5cZjARLzEnyQYtIUhsZ2LG2j3HidFOFQ==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/async": {
- "version": "0.1.22",
- "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz",
- "integrity": "sha512-2tEzliJmf5fHNafNwQLJXUasGzQCVctvsNkXmnlELHwypU0p08/rHohYvkqKIjyXpx+0rkrYv6QbhJ+UF4QkBg==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/colors": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz",
- "integrity": "sha512-OsSVtHK8Ir8r3+Fxw/b4jS1ZLPXkV6ZxDRJQzeD7qo0SqMXWrHDM71DgYzPMHY8SFJ0Ao+nNU2p1MmwdzKqPrw==",
- "dev": true,
- "engines": {
- "node": ">=0.1.90"
- }
- },
- "node_modules/grunt-phplint/node_modules/dateformat": {
- "version": "1.0.2-1.2.3",
- "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz",
- "integrity": "sha512-AXvW8g7tO4ilk5HgOWeDmPi/ZPaCnMJ+9Cg1I3p19w6mcvAAXBuuGEXAxybC+Djj1PSZUiHUcyoYu7WneCX8gQ==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/esprima": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
- "integrity": "sha512-rp5dMKN8zEs9dfi9g0X1ClLmV//WRyk/R15mppFNICIFRG5P92VP7Z04p8pk++gABo9W2tY+kHyu6P1mEHgmTA==",
- "dev": true,
- "bin": {
- "esparse": "bin/esparse.js",
- "esvalidate": "bin/esvalidate.js"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/findup-sync": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz",
- "integrity": "sha512-yjftfYnF4ThYEvKEV/kEFR15dmtyXTAh3vQnzpJUoc7Naj5y1P0Ck7Zs1+Vroa00E3KT3IYsk756S+8WA5dNLw==",
- "dev": true,
- "dependencies": {
- "glob": "~3.2.9",
- "lodash": "~2.4.1"
- },
- "engines": {
- "node": ">= 0.6.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/findup-sync/node_modules/glob": {
- "version": "3.2.11",
- "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
- "integrity": "sha512-hVb0zwEZwC1FXSKRPFTeOtN7AArJcJlI6ULGLtrstaswKNlrTJqAA+1lYlSUop4vjA423xlBzqfVS3iWGlqJ+g==",
- "deprecated": "Glob versions prior to v9 are no longer supported",
- "dev": true,
- "license": "BSD",
- "dependencies": {
- "inherits": "2",
- "minimatch": "0.3"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/findup-sync/node_modules/lodash": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
- "integrity": "sha512-Kak1hi6/hYHGVPmdyiZijoQyz5x2iGVzs6w9GYB/HiXEtylY7tIoYEROMjvM1d9nXJqPOrG2MNPMn01bJ+S0Rw==",
- "dev": true,
- "engines": [
- "node",
- "rhino"
- ],
- "license": "MIT"
- },
- "node_modules/grunt-phplint/node_modules/findup-sync/node_modules/minimatch": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
- "integrity": "sha512-WFX1jI1AaxNTZVOHLBVazwTWKaQjoykSzCBNXB72vDTCzopQGtyP91tKdFK5cv1+qMwPyiTu1HqUriqplI8pcA==",
- "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "lru-cache": "2",
- "sigmund": "~1.0.0"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/getobject": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz",
- "integrity": "sha512-hIGEBfnHcZpWkXPsAVeVmpYDvfy/matVl03yOY91FPmnpCC12Lm5izNxCjO3lHAeO6uaTwMxu7g450Siknlhig==",
- "dev": true,
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/glob": {
- "version": "3.1.21",
- "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
- "integrity": "sha512-ANhy2V2+tFpRajE3wN4DhkNQ08KDr0Ir1qL12/cUe5+a7STEK8jkW4onUYuY8/06qAFuT5je7mjAqzx0eKI2tQ==",
- "deprecated": "Glob versions prior to v9 are no longer supported",
- "dev": true,
- "license": "BSD",
- "dependencies": {
- "graceful-fs": "~1.2.0",
- "inherits": "1",
- "minimatch": "~0.2.11"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/glob/node_modules/inherits": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
- "integrity": "sha512-Al67oatbRSo3RV5hRqIoln6Y5yMVbJSIn4jEJNL7VCImzq/kLr7vvb6sFRJXqr8rpHc/2kJOM+y0sPKN47VdzA==",
- "dev": true
- },
- "node_modules/grunt-phplint/node_modules/graceful-fs": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
- "integrity": "sha512-iiTUZ5vZ+2ZV+h71XAgwCSu6+NAizhFU3Yw8aC/hH5SQ3SnISqEqAek40imAFGtDcwJKNhXvSY+hzIolnLwcdQ==",
- "deprecated": "please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js",
- "dev": true,
- "license": "BSD",
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/grunt": {
- "version": "0.4.5",
- "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz",
- "integrity": "sha512-1iq3ylLjzXqz/KSq1OAE2qhnpcbkF2WyhsQcavZt+YmgvHu0EbPMEhGhy2gr0FP67isHpRdfwjB5WVeXXcJemQ==",
- "dev": true,
- "dependencies": {
- "async": "~0.1.22",
- "coffee-script": "~1.3.3",
- "colors": "~0.6.2",
- "dateformat": "1.0.2-1.2.3",
- "eventemitter2": "~0.4.13",
- "exit": "~0.1.1",
- "findup-sync": "~0.1.2",
- "getobject": "~0.1.0",
- "glob": "~3.1.21",
- "grunt-legacy-log": "~0.1.0",
- "grunt-legacy-util": "~0.2.0",
- "hooker": "~0.2.3",
- "iconv-lite": "~0.2.11",
- "js-yaml": "~2.0.5",
- "lodash": "~0.9.2",
- "minimatch": "~0.2.12",
- "nopt": "~1.0.10",
- "rimraf": "~2.2.8",
- "underscore.string": "~2.2.1",
- "which": "~1.0.5"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/grunt-legacy-log": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz",
- "integrity": "sha512-qYs/uM0ImdzwIXLhS4O5WLV5soAM+PEqqHI/hzSxlo450ERSccEhnXqoeDA9ZozOdaWuYnzTOTwRcVRogleMxg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "colors": "~0.6.2",
- "grunt-legacy-log-utils": "~0.1.1",
- "hooker": "~0.2.3",
- "lodash": "~2.4.1",
- "underscore.string": "~2.3.3"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/grunt-legacy-log-utils": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz",
- "integrity": "sha512-D0vbUX00TFYCKNZtcZzemMpwT8TR/FdRs1pmfiBw6qnUw80PfsjV+lhIozY/3eJ3PSG2zj89wd2mH/7f4tNAlw==",
- "dev": true,
- "dependencies": {
- "colors": "~0.6.2",
- "lodash": "~2.4.1",
- "underscore.string": "~2.3.3"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/grunt-legacy-log-utils/node_modules/lodash": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
- "integrity": "sha512-Kak1hi6/hYHGVPmdyiZijoQyz5x2iGVzs6w9GYB/HiXEtylY7tIoYEROMjvM1d9nXJqPOrG2MNPMn01bJ+S0Rw==",
- "dev": true,
- "engines": [
- "node",
- "rhino"
- ],
- "license": "MIT"
- },
- "node_modules/grunt-phplint/node_modules/grunt-legacy-log-utils/node_modules/underscore.string": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
- "integrity": "sha512-hbD5MibthuDAu4yA5wxes5bzFgqd3PpBJuClbRxaNddxfdsz+qf+1kHwrGQFrmchmDHb9iNU+6EHDn8uj0xDJg==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/grunt-legacy-log/node_modules/lodash": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
- "integrity": "sha512-Kak1hi6/hYHGVPmdyiZijoQyz5x2iGVzs6w9GYB/HiXEtylY7tIoYEROMjvM1d9nXJqPOrG2MNPMn01bJ+S0Rw==",
- "dev": true,
- "engines": [
- "node",
- "rhino"
- ],
- "license": "MIT"
- },
- "node_modules/grunt-phplint/node_modules/grunt-legacy-log/node_modules/underscore.string": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
- "integrity": "sha512-hbD5MibthuDAu4yA5wxes5bzFgqd3PpBJuClbRxaNddxfdsz+qf+1kHwrGQFrmchmDHb9iNU+6EHDn8uj0xDJg==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/grunt-legacy-util": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz",
- "integrity": "sha512-cXPbfF8aM+pvveQeN1K872D5fRm30xfJWZiS63Y8W8oyIPLClCsmI8bW96Txqzac9cyL4lRqEBhbhJ3n5EzUUQ==",
- "dev": true,
- "dependencies": {
- "async": "~0.1.22",
- "exit": "~0.1.1",
- "getobject": "~0.1.0",
- "hooker": "~0.2.3",
- "lodash": "~0.9.2",
- "underscore.string": "~2.2.1",
- "which": "~1.0.5"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/iconv-lite": {
- "version": "0.2.11",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
- "integrity": "sha512-KhmFWgaQZY83Cbhi+ADInoUQ8Etn6BG5fikM9syeOjQltvR45h7cRKJ/9uvQEuD61I3Uju77yYce0/LhKVClQw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/js-yaml": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz",
- "integrity": "sha512-VEKcIksckDBUhg2JS874xVouiPkywVUh4yyUmLCDe1Zg3bCd6M+F1eGPenPeHLc2XC8pp9G8bsuofK0NeEqRkA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "argparse": "~ 0.1.11",
- "esprima": "~ 1.0.2"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- },
- "engines": {
- "node": ">= 0.6.0"
- }
- },
- "node_modules/grunt-phplint/node_modules/lodash": {
- "version": "0.9.2",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz",
- "integrity": "sha512-LVbt/rjK62gSbhehDVKL0vlaime4Y1IBixL+bKeNfoY4L2zab/jGrxU6Ka05tMA/zBxkTk5t3ivtphdyYupczw==",
- "dev": true,
- "engines": [
- "node",
- "rhino"
- ],
- "license": "MIT"
- },
- "node_modules/grunt-phplint/node_modules/minimatch": {
- "version": "0.2.14",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
- "integrity": "sha512-zZ+Jy8lVWlvqqeM8iZB7w7KmQkoJn8djM585z88rywrEbzoqawVa9FR5p2hwD+y74nfuKOjmNvi9gtWJNLqHvA==",
- "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "lru-cache": "2",
- "sigmund": "~1.0.0"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/nopt": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
- "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "abbrev": "1"
- },
- "bin": {
- "nopt": "bin/nopt.js"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/rimraf": {
- "version": "2.2.8",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
- "integrity": "sha512-R5KMKHnPAQaZMqLOsyuyUmcIjSeDm+73eoqQpaXA7AZ22BL+6C+1mcUscgOsNd8WVlJuvlgAPsegcx7pjlV0Dg==",
- "deprecated": "Rimraf versions prior to v4 are no longer supported",
- "dev": true,
- "license": "MIT",
- "bin": {
- "rimraf": "bin.js"
- }
- },
- "node_modules/grunt-phplint/node_modules/underscore.string": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz",
- "integrity": "sha512-3FVmhXqelrj6gfgp3Bn6tOavJvW0dNH2T+heTD38JRxIrAbiuzbqjknszoOYj3DyFB1nWiLj208Qt2no/L4cIA==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/grunt-phplint/node_modules/which": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz",
- "integrity": "sha512-E87fdQ/eRJr9W1X4wTPejNy9zTW3FI2vpCZSJ/HAY+TkjKVC0TUm1jk6vn2Z7qay0DQy0+RBGdXxj+RmmiGZKQ==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "which": "bin/which"
- }
- },
"node_modules/grunt-wp-i18n": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/grunt-wp-i18n/-/grunt-wp-i18n-1.0.3.tgz",
@@ -2559,13 +2145,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/lru-cache": {
- "version": "2.7.3",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
- "integrity": "sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ==",
- "dev": true,
- "license": "ISC"
- },
"node_modules/make-iterator": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
@@ -2689,16 +2268,16 @@
}
},
"node_modules/mkdirp": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
- "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"dev": true,
"license": "MIT",
- "dependencies": {
- "minimist": "^1.2.6"
- },
"bin": {
"mkdirp": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">=10"
}
},
"node_modules/ms": {
@@ -2727,19 +2306,6 @@
"wpi18n": "bin/wpi18n"
}
},
- "node_modules/node-wp-i18n/node_modules/mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
@@ -3288,13 +2854,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/sigmund": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
- "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==",
- "dev": true,
- "license": "ISC"
- },
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -3553,12 +3112,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/underscore": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
- "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==",
- "dev": true
- },
"node_modules/underscore.string": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz",
diff --git a/package.json b/package.json
index 7cf7d13..208fbaa 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,6 @@
"grunt-contrib-jshint": "~3.2.0",
"grunt-contrib-uglify": "~5.2.2",
"grunt-contrib-watch": "~1.1.0",
- "grunt-phplint": "~0.1.0",
"grunt-wp-i18n": "~1.0.3",
"time-grunt": "~2.0.0"
}
diff --git a/phpstan.neon b/phpstan.neon
new file mode 100644
index 0000000..c66541d
--- /dev/null
+++ b/phpstan.neon
@@ -0,0 +1,13 @@
+parameters:
+ level: 8
+ tipsOfTheDay: false
+
+# bootstrapFiles:
+# - src/i-order-terms.php
+ parallel:
+ buffer: 5073741824 # 5GB
+ processTimeout: 300.00
+ phpVersion: 80400
+
+ paths:
+ - src