From b89a4561694d665ac77971e5e61490a20b672e18 Mon Sep 17 00:00:00 2001 From: 36pixel Date: Sun, 24 Sep 2023 00:34:46 +0200 Subject: [PATCH 1/6] add workflow files --- .github/workflows/code-style.yml | 43 +++++++++++++ .github/workflows/phpunit.yml | 83 ++++++++++++++++++++++++ .github/workflows/publish-to-redaxo.yml | 31 +++++---- .github/workflows/rexstan.yml | 84 +++++++++++++++++++++++++ .gitignore | 11 ++++ .php-cs-fixer.dist.php | 12 ++++ .tools/bootstrap.php | 13 ++++ .tools/rexstan.php | 40 ++++++++++++ composer.json | 18 ++++++ phpunit.xml.dist | 21 +++++++ tests/unit/name_test.php | 14 +++++ 11 files changed, 358 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/code-style.yml create mode 100644 .github/workflows/phpunit.yml create mode 100644 .github/workflows/rexstan.yml create mode 100644 .gitignore create mode 100644 .php-cs-fixer.dist.php create mode 100644 .tools/bootstrap.php create mode 100644 .tools/rexstan.php create mode 100755 composer.json create mode 100644 phpunit.xml.dist create mode 100644 tests/unit/name_test.php diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 0000000..040d6b4 --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,43 @@ +name: PHP-CS-Fixer + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +permissions: + contents: read + +jobs: + code-style: + if: github.event.pull_request.draft == false + + runs-on: ubuntu-latest + permissions: + contents: write # for Git to git apply + + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: gd, intl, pdo_mysql + coverage: none # disable xdebug, pcov + + # install dependencies from composer.json + - name: Install test dependencies + env: + COMPOSER: composer.json + run: composer install --prefer-dist --no-progress + + # run php-cs-fixer + - name: Run PHP CS Fixer + run: composer cs-fix + + # commit and push fixed files + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply php-cs-fixer changes diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..e4739d3 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,83 @@ +name: PHPUnit + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +permissions: + contents: read + +jobs: + phpunit: + + runs-on: ubuntu-latest + permissions: + contents: write # for Git to git apply + + steps: + - uses: actions/checkout@v3 + + # setup PHP v8, install some extensions + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: gd, intl, pdo_mysql, xml + coverage: none # disable xdebug, pcov + + # download the latest REDAXO release and unzip it + # credits https://blog.markvincze.com/download-artifacts-from-a-latest-github-release-in-sh-and-powershell/ + - name: Download latest REDAXO release + run: | + LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/redaxo/redaxo/releases/latest) + REDAXO_VERSION=$(echo $LATEST_RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') + echo "Downloaded REDAXO $REDAXO_VERSION" + curl -Ls -o redaxo.zip https://github.com/redaxo/redaxo/releases/download/$REDAXO_VERSION/redaxo_$REDAXO_VERSION.zip + unzip -oq redaxo.zip -d redaxo_cms + rm redaxo.zip + + # start mysql service, create a database called redaxo5, apply config patch + - name: Init database + run: | + sudo /etc/init.d/mysql start + mysql -uroot -h127.0.0.1 -proot -e 'create database redaxo5;' + + # run REDAXO setup with the following parameters + # Language: de + # DB password: root + # Create DB: no + # Admin username: admin + # Admin password: adminpassword + # Error E-mail: test@redaxo.invalid + - name: Setup REDAXO + run: | + php redaxo_cms/redaxo/bin/console setup:run -n --lang=de_de --agree-license --db-host=127.0.0.1 --db-name=redaxo5 --db-password=root --db-createdb=no --db-setup=normal --admin-username=admin --admin-password=adminpassword --error-email=test@redaxo.invalid --ansi + php redaxo_cms/redaxo/bin/console config:set --type boolean debug.enabled true + php redaxo_cms/redaxo/bin/console config:set --type boolean debug.throw_always_exception true + + # copy Addon files, ignore some directories... + # install the addon + # if the addon name does not match the repository name, ${{ github.event.repository.name }} must be replaced with the addon name + # if additional addons are needed, they can be installed via the console commands + # see: https://www.redaxo.org/doku/main/basis-addons#console + - name: Copy and install Addons + run: | + rsync -av --exclude='./vendor' --exclude='.github' --exclude='.git' --exclude='redaxo_cms' './' 'redaxo_cms/redaxo/src/addons/${{ github.event.repository.name }}' + redaxo_cms/redaxo/bin/console package:install '${{ github.event.repository.name }}' + + # install dependencies from composer.json + - name: Install test dependencies + working-directory: redaxo_cms/redaxo/src/addons/${{ github.event.repository.name }} + env: + COMPOSER: composer.json + run: composer install --prefer-dist --no-progress + + - name: Setup Problem Matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + # run unit tests, see composer.json + - name: Run phpunit + working-directory: redaxo_cms/redaxo/src/addons/${{ github.event.repository.name }} + run: composer test diff --git a/.github/workflows/publish-to-redaxo.yml b/.github/workflows/publish-to-redaxo.yml index bd703c7..4eb4faf 100644 --- a/.github/workflows/publish-to-redaxo.yml +++ b/.github/workflows/publish-to-redaxo.yml @@ -1,17 +1,24 @@ name: Publish release on: - release: - types: - - published + release: + types: + - published jobs: - redaxo_publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: FriendsOfREDAXO/installer-action@v1 - with: - myredaxo-username: ${{ secrets.MYREDAXO_USERNAME }} - myredaxo-api-key: ${{ secrets.MYREDAXO_API_KEY }} - description: ${{ github.event.release.body }} + redaxo_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: "8.2" + - uses: ramsey/composer-install@v2 + with: + composer-options: "--no-dev" + - uses: FriendsOfREDAXO/installer-action@v1 + with: + myredaxo-username: ${{ secrets.MYREDAXO_USERNAME }} + myredaxo-api-key: ${{ secrets.MYREDAXO_API_KEY }} + description: ${{ github.event.release.body }} + diff --git a/.github/workflows/rexstan.yml b/.github/workflows/rexstan.yml new file mode 100644 index 0000000..4e01605 --- /dev/null +++ b/.github/workflows/rexstan.yml @@ -0,0 +1,84 @@ +name: rexstan + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + types: [opened, synchronize, reopened, ready_for_review] + +permissions: + contents: read + +jobs: + rexstan: + env: + ADDON_KEY: ${{ github.event.repository.name }} + + runs-on: ubuntu-latest + permissions: + contents: write # for Git to git apply + + steps: + - uses: actions/checkout@v3 + + # setup PHP v8, install some extensions + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: gd, intl, pdo_mysql, xml + coverage: none # disable xdebug, pcov + + # download the latest REDAXO release and unzip it + # credits https://blog.markvincze.com/download-artifacts-from-a-latest-github-release-in-sh-and-powershell/ + - name: Download latest REDAXO release + run: | + LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/redaxo/redaxo/releases/latest) + REDAXO_VERSION=$(echo $LATEST_RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') + echo "Downloaded REDAXO $REDAXO_VERSION" + curl -Ls -o redaxo.zip https://github.com/redaxo/redaxo/releases/download/$REDAXO_VERSION/redaxo_$REDAXO_VERSION.zip + unzip -oq redaxo.zip -d redaxo_cms + rm redaxo.zip + + # start mysql service, create a database called redaxo5, apply config patch + - name: Init database + run: | + sudo /etc/init.d/mysql start + mysql -uroot -h127.0.0.1 -proot -e 'create database redaxo5;' + + # run REDAXO setup with the following parameters + # Language: de + # DB password: root + # Create DB: no + # Admin username: admin + # Admin password: adminpassword + # Error E-mail: test@redaxo.invalid + - name: Setup REDAXO + run: | + php redaxo_cms/redaxo/bin/console setup:run -n --lang=de_de --agree-license --db-host=127.0.0.1 --db-name=redaxo5 --db-password=root --db-createdb=no --db-setup=normal --admin-username=admin --admin-password=adminpassword --error-email=test@redaxo.invalid --ansi + php redaxo_cms/redaxo/bin/console config:set --type boolean debug.enabled true + php redaxo_cms/redaxo/bin/console config:set --type boolean debug.throw_always_exception true + + # copy Addon files, ignore some directories... + # install the addon + # if the addon name does not match the repository name, ${{ github.event.repository.name }} must be replaced with the addon name + # install latest rexstan + # if additional addons are needed, they can be installed via the console commands + # see: https://www.redaxo.org/doku/main/basis-addons#console + - name: Copy and install Addons + run: | + rsync -av --exclude='./vendor' --exclude='.github' --exclude='.git' --exclude='redaxo_cms' './' 'redaxo_cms/redaxo/src/addons/${{ github.event.repository.name }}' + redaxo_cms/redaxo/bin/console install:download 'rexstan' '1.*' + redaxo_cms/redaxo/bin/console package:install 'rexstan' + redaxo_cms/redaxo/bin/console package:install '${{ github.event.repository.name }}' + + # execute rexstan.php to create the needed user-config.neon + - name: Execute .tools/rexstan.php + run: php -f redaxo/src/addons/${{ github.event.repository.name }}/.tools/rexstan.php + working-directory: redaxo_cms + + # run rexstan + - id: rexstan + name: Run rexstan + run: redaxo_cms/redaxo/bin/console rexstan:analyze diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fe505a --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +.DS_Store + +/.idea/ +.vscode + +/vendor/ + +.php-cs-fixer.cache +.phpunit.result.cache +/.phpunit.cache/ + diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..034718e --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,12 @@ +in(__DIR__) + ->exclude('vendor') +; + +return (new Redaxo\PhpCsFixerConfig\Config()) + ->setFinder($finder) + ; diff --git a/.tools/bootstrap.php b/.tools/bootstrap.php new file mode 100644 index 0000000..56c33b7 --- /dev/null +++ b/.tools/bootstrap.php @@ -0,0 +1,13 @@ + + + + + + + + + tests/unit + + + diff --git a/tests/unit/name_test.php b/tests/unit/name_test.php new file mode 100644 index 0000000..fe487ae --- /dev/null +++ b/tests/unit/name_test.php @@ -0,0 +1,14 @@ + Date: Sun, 24 Sep 2023 01:19:15 +0200 Subject: [PATCH 2/6] add composer --- composer.lock | 3601 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3601 insertions(+) create mode 100644 composer.lock diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..e344e99 --- /dev/null +++ b/composer.lock @@ -0,0 +1,3601 @@ +{ + "_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": "470a649c3cc65ceaacbaa03beecfaf12", + "packages": [], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.28.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "113e09fea3d2306319ffaa2423fe3de768b28cff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/113e09fea3d2306319ffaa2423fe3de768b28cff", + "reference": "113e09fea3d2306319ffaa2423fe3de768b28cff", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "composer/xdebug-handler": "^3.0.3", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0", + "sebastian/diff": "^4.0 || ^5.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/polyfill-mbstring": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27", + "symfony/process": "^5.4 || ^6.0", + "symfony/stopwatch": "^5.4 || ^6.0" + }, + "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.0", + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.0", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.5.3", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.16", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", + "symfony/phpunit-bridge": "^6.2.3", + "symfony/yaml": "^5.4 || ^6.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.28.0" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2023-09-22T20:43:40+00:00" + }, + { + "name": "kubawerlos/php-cs-fixer-custom-fixers", + "version": "v3.16.2", + "source": { + "type": "git", + "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", + "reference": "d3f2590069d06ba49ad24cac03f802e8ad0aaeba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/d3f2590069d06ba49ad24cac03f802e8ad0aaeba", + "reference": "d3f2590069d06ba49ad24cac03f802e8ad0aaeba", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-tokenizer": "*", + "friendsofphp/php-cs-fixer": "^3.22", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.4 || ^10.0.14" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpCsFixerCustomFixers\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kuba Werłos", + "email": "werlos@gmail.com" + } + ], + "description": "A set of custom fixers for PHP CS Fixer", + "support": { + "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.16.2" + }, + "time": "2023-08-06T13:50:15+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.17.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + }, + "time": "2023-08-13T19:53:39+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.29", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.15", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-09-19T04:57:46+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.13", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.28", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-09-19T05:39:22+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "redaxo/php-cs-fixer-config", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/redaxo/php-cs-fixer-config.git", + "reference": "3734ba2e456e4a3267894fafc514702c06c6715d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/redaxo/php-cs-fixer-config/zipball/3734ba2e456e4a3267894fafc514702c06c6715d", + "reference": "3734ba2e456e4a3267894fafc514702c06c6715d", + "shasum": "" + }, + "require": { + "friendsofphp/php-cs-fixer": "^3.17.0", + "kubawerlos/php-cs-fixer-custom-fixers": "^3.14.0", + "php": "^8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Redaxo\\PhpCsFixerConfig\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "REDAXO Team", + "email": "info@redaxo.org" + } + ], + "description": "php-cs-fixer config for REDAXO", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/redaxo/php-cs-fixer-config/issues", + "source": "https://github.com/redaxo/php-cs-fixer-config/tree/2.2.0" + }, + "time": "2023-07-02T15:24:30+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:35:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bde739e7565280bda77be70044ac1047bc007e34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-02T09:26:13+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v6.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", + "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-16T10:10:12+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-06T06:56:43+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-06-01T08:30:39+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.3.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.3.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-31T08:31:44+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-12T14:21:09+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "875e90aeea2777b6f135677f618529449334a612" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "42292d99c55abe617799667f454222c54c60e229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-28T09:04:16+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/process", + "version": "v6.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-07T10:39:22+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-16T10:14:28+00:00" + }, + { + "name": "symfony/string", + "version": "v6.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "53d1a83225002635bca3482fcbf963001313fb68" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", + "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-05T08:41:27+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.3.0" +} From e761005db4633c3f11c5e048585a7b77c14498f0 Mon Sep 17 00:00:00 2001 From: 36pixel Date: Sun, 24 Sep 2023 01:26:37 +0200 Subject: [PATCH 3/6] update unit test --- tests/unit/mblock_test.php | 19 +++++++++++++++++++ tests/unit/name_test.php | 14 -------------- 2 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 tests/unit/mblock_test.php delete mode 100644 tests/unit/name_test.php diff --git a/tests/unit/mblock_test.php b/tests/unit/mblock_test.php new file mode 100644 index 0000000..9b538a6 --- /dev/null +++ b/tests/unit/mblock_test.php @@ -0,0 +1,19 @@ +
'; + + static::assertEquals($expected, $actual, 'Mblock::show() should return a propper html form.'); + } +} diff --git a/tests/unit/name_test.php b/tests/unit/name_test.php deleted file mode 100644 index fe487ae..0000000 --- a/tests/unit/name_test.php +++ /dev/null @@ -1,14 +0,0 @@ - Date: Sun, 24 Sep 2023 01:33:04 +0200 Subject: [PATCH 4/6] cs fix --- boot.php | 11 +- lib/MBlock/DTO/MBlockElement.php | 23 +--- lib/MBlock/DTO/MBlockItem.php | 36 ++--- .../Decorator/MBlockFormItemDecorator.php | 43 +++--- lib/MBlock/Decorator/MBlockReplacerTrait.php | 39 +++--- lib/MBlock/Handler/MBlockValueHandler.php | 46 +++---- lib/MBlock/MBlock.php | 56 +++----- lib/MBlock/Parser/MBlockParser.php | 7 +- .../Processor/MBlockRexFormProcessor.php | 58 ++++---- lib/MBlock/Processor/mblock_rex_form.php | 22 +-- .../Provider/MBlockTemplateFileProvider.php | 19 +-- .../Replacer/MBlockBootstrapReplacer.php | 20 ++- .../Replacer/MBlockCheckboxReplacer.php | 6 +- lib/MBlock/Replacer/MBlockCountReplacer.php | 6 +- .../Replacer/MBlockSystemButtonReplacer.php | 129 +++++++----------- lib/MBlock/Replacer/MBlockValueReplacer.php | 18 +-- lib/MBlock/Utils/MBlockPageHelper.php | 9 +- lib/MBlock/Utils/MBlockSettingsHelper.php | 9 +- lib/MBlock/Utils/MBlockThemeHelper.php | 34 +++-- lib/yform/action/mblock_db_query.php | 2 +- pages/demo.demo_html.php | 2 +- pages/demo.demo_mform.php | 2 +- pages/index.php | 2 +- pages/info.php | 6 +- pages/overview.php | 46 +++---- pages/rexform_demo.php | 28 ++-- tests/unit/mblock_test.php | 3 +- update.php | 8 +- 28 files changed, 294 insertions(+), 396 deletions(-) diff --git a/boot.php b/boot.php index c800ac7..d401c76 100644 --- a/boot.php +++ b/boot.php @@ -21,13 +21,14 @@ // register extensions // alfred post post - rex_extension::register('REX_FORM_SAVED', function (rex_extension_point $params) { + rex_extension::register('REX_FORM_SAVED', static function (rex_extension_point $params) { /** @var rex_form|null $form */ $form = ($params->hasParam('form')) ? $params->getParam('form') : null; - if ($form instanceof mblock_rex_form) - return MBlockRexFormProcessor::postPostSaveAction($params->getSubject(), $form, $_POST); // execute post post - else - return $params->getSubject(); + if ($form instanceof mblock_rex_form) { + return MBlockRexFormProcessor::postPostSaveAction($params->getSubject(), $form, $_POST); + } // execute post post + + return $params->getSubject(); }); // assets diff --git a/lib/MBlock/DTO/MBlockElement.php b/lib/MBlock/DTO/MBlockElement.php index d297a74..c4a2f61 100644 --- a/lib/MBlock/DTO/MBlockElement.php +++ b/lib/MBlock/DTO/MBlockElement.php @@ -7,26 +7,17 @@ class MBlockElement { - const KEY = ""; + public const KEY = ''; - /** - * @var - */ public $settings; - /** - * @var string - */ + /** @var string */ public $output; - /** - * @var string - */ + /** @var string */ public $form; - /** - * @var int - */ + /** @var int */ public $index; /** @@ -95,7 +86,7 @@ public function setIndex($index) */ public function getKeys() { - $keys = array(); + $keys = []; foreach (get_object_vars($this) as $f => $v) { $keys[] = sprintf(self::KEY, $f); } @@ -108,10 +99,10 @@ public function getKeys() */ public function getValues() { - $values = array(); + $values = []; foreach (get_object_vars($this) as $f => $v) { $values[] = $v; } return $values; } -} \ No newline at end of file +} diff --git a/lib/MBlock/DTO/MBlockItem.php b/lib/MBlock/DTO/MBlockItem.php index c2a6800..429d8ab 100644 --- a/lib/MBlock/DTO/MBlockItem.php +++ b/lib/MBlock/DTO/MBlockItem.php @@ -7,40 +7,26 @@ class MBlockItem { - /** - * @var array - */ + /** @var array */ public $result; - /** - * @var integer - */ + /** @var int */ public $id; - /** - * @var integer - */ + /** @var int */ public $valueId; - /** - * @var integer - */ + /** @var int */ public $systemId; - /** - * @var string - */ + /** @var string */ public $systemName; - /** - * @var string - */ + /** @var string */ public $form; - /** - * @var array - */ - public $payload = array(); + /** @var array */ + public $payload = []; /** * @return array @@ -169,7 +155,7 @@ public function setForm($form) */ public function getPayload($key = null) { - if (!is_null($key) && array_key_exists($key, $this->payload)) { + if (null !== $key && array_key_exists($key, $this->payload)) { return $this->payload[$key]; } return $this->payload; @@ -187,8 +173,6 @@ public function setPayload($payload) } /** - * @param $key - * @param $value * @return $this * @author Joachim Doerr */ @@ -197,4 +181,4 @@ public function addPayload($key, $value) $this->payload[$key] = $value; return $this; } -} \ No newline at end of file +} diff --git a/lib/MBlock/Decorator/MBlockFormItemDecorator.php b/lib/MBlock/Decorator/MBlockFormItemDecorator.php index e6ea43a..dcc6f93 100644 --- a/lib/MBlock/Decorator/MBlockFormItemDecorator.php +++ b/lib/MBlock/Decorator/MBlockFormItemDecorator.php @@ -10,11 +10,10 @@ class MBlockFormItemDecorator use \MBlock\Decorator\MBlockDOMTrait; /** - * @param MBlockItem $item - * @return String + * @return string * @author Joachim Doerr */ - static public function decorateFormItem(MBlockItem $item) + public static function decorateFormItem(MBlockItem $item) { $dom = self::createDom($item->getForm()); @@ -58,8 +57,8 @@ static public function decorateFormItem(MBlockItem $item) /** @var DOMElement $match */ foreach ($matches as $match) { // continue by media elements - if (strpos($match->getAttribute('id'), 'REX_MEDIA') !== false - or strpos($match->getAttribute('id'), 'REX_LINK') !== false) { + if (str_contains($match->getAttribute('id'), 'REX_MEDIA') + || str_contains($match->getAttribute('id'), 'REX_LINK')) { continue; } // label for and id change @@ -74,8 +73,9 @@ static public function decorateFormItem(MBlockItem $item) foreach ($match->childNodes as $child) { switch ($child->nodeName) { case 'optgroup': - foreach ($child->childNodes as $nodeChild) + foreach ($child->childNodes as $nodeChild) { self::replaceOptionSelect($match, $nodeChild, $item); + } break; case 'option': if (isset($child->tagName)) { @@ -93,20 +93,18 @@ static public function decorateFormItem(MBlockItem $item) } /** - * @param DOMElement $element - * @param MBlockItem $item * @author Joachim Doerr */ protected static function replaceName(DOMElement $element, MBlockItem $item) { // replace attribute id preg_match('/\]\[\d+\]\[/', $element->getAttribute('name'), $matches); - if ($matches) $element->setAttribute('name', str_replace($matches[0], '][' . $item->getId() . '][', $element->getAttribute('name'))); + if ($matches) { + $element->setAttribute('name', str_replace($matches[0], '][' . $item->getId() . '][', $element->getAttribute('name'))); + } } /** - * @param DOMElement $element - * @param MBlockItem $item * @param bool $valueEmpty * @author Joachim Doerr */ @@ -132,7 +130,7 @@ protected static function replaceValue(DOMElement $element, MBlockItem $item, $v case 'textarea': if ($matches && array_key_exists($matches[1], $item->getResult())) { $result = $item->getResult(); - $id = uniqid(md5(rand(1000, 9999)), true); + $id = uniqid(md5(random_int(1000, 9999)), true); // node value cannot contains & // so set a unique id there we replace later with the right value $element->nodeValue = $id; @@ -140,7 +138,7 @@ protected static function replaceValue(DOMElement $element, MBlockItem $item, $v $valueResult = $result[$matches[1]]; // add the id to the result value - $result[$matches[1]] = array('id' => $id, 'value' => $valueResult); + $result[$matches[1]] = ['id' => $id, 'value' => $valueResult]; // reset result $item->setResult($result); @@ -154,8 +152,6 @@ protected static function replaceValue(DOMElement $element, MBlockItem $item, $v } /** - * @param DOMElement $element - * @param MBlockItem $item * @author Joachim Doerr */ protected static function replaceSelectedData(DOMElement $element, MBlockItem $item) @@ -178,8 +174,6 @@ protected static function replaceSelectedData(DOMElement $element, MBlockItem $i } /** - * @param DOMElement $element - * @param MBlockItem $item * @author Joachim Doerr */ protected static function replaceChecked(DOMElement $element, MBlockItem $item) @@ -201,9 +195,6 @@ protected static function replaceChecked(DOMElement $element, MBlockItem $item) } /** - * @param DOMElement $select - * @param DOMElement $option - * @param MBlockItem $item * @author Joachim Doerr */ protected static function replaceOptionSelect(DOMElement $select, DOMElement $option, MBlockItem $item) @@ -236,20 +227,19 @@ protected static function replaceOptionSelect(DOMElement $select, DOMElement $op } /** - * @param DOMDocument $dom - * @param DOMElement $element - * @param MBlockItem $item * @return bool * @author Joachim Doerr */ protected static function replaceForId(DOMDocument $dom, DOMElement $element, MBlockItem $item) { // get input id - if (!$elementId = $element->getAttribute('id')) return true; + if (!$elementId = $element->getAttribute('id')) { + return true; + } // ignore system elements - if (strpos($elementId, 'REX_MEDIA') !== false - or strpos($elementId, 'REX_LINK') !== false) { + if (str_contains($elementId, 'REX_MEDIA') + || str_contains($elementId, 'REX_LINK')) { return false; } @@ -271,7 +261,6 @@ protected static function replaceForId(DOMDocument $dom, DOMElement $element, MB } /** - * @param DOMElement $element * @return mixed * @author Joachim Doerr */ diff --git a/lib/MBlock/Decorator/MBlockReplacerTrait.php b/lib/MBlock/Decorator/MBlockReplacerTrait.php index bea480d..7caf3c6 100644 --- a/lib/MBlock/Decorator/MBlockReplacerTrait.php +++ b/lib/MBlock/Decorator/MBlockReplacerTrait.php @@ -2,46 +2,46 @@ /** * User: joachimdoerr * Date: 31.05.18 - * Time: 15:07 + * Time: 15:07. */ namespace MBlock\Decorator; - use DOMDocument; use DOMElement; +use IntlChar; + +use function count; trait MBlockDOMTrait { /** - * @param $html * @return DOMDocument * @author Joachim Doerr */ private static function createDom($html) { $dom = new DOMDocument(); - //replaces $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'); - $html = preg_replace_callback('/[\x{80}-\x{10FFFF}]/u', function ($match) { + // replaces $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'); + $html = preg_replace_callback('/[\x{80}-\x{10FFFF}]/u', static function ($match) { $utf8 = $match[0]; - return '&#' . \IntlChar::ord($utf8) . ';'; + return '&#' . IntlChar::ord($utf8) . ';'; }, htmlentities($html, ENT_COMPAT, 'UTF-8')); - $html = htmlspecialchars_decode($html,ENT_QUOTES); + $html = htmlspecialchars_decode($html, ENT_QUOTES); @$dom->loadHTML("$html"); $dom->preserveWhiteSpace = false; return $dom; } /** - * @param DOMDocument $dom * @return string * @author Joachim Doerr */ private static function saveHtml(DOMDocument $dom) { $html = $dom->saveHTML(); - if (strpos($html, '(.*)<\/body>/ism", $html, $matches); + if (str_contains($html, '(.*)<\\/body>/ism', $html, $matches); if (isset($matches[1])) { $html = $matches[1]; } @@ -50,23 +50,20 @@ private static function saveHtml(DOMDocument $dom) } /** - * @param DOMDocument $dom - * @param $element - * @param $class * @return array * @author Joachim Doerr */ private static function getElementsByClass(DOMDocument $dom, $element) { - $elementClass= explode('.', $element); + $elementClass = explode('.', $element); $element = $elementClass[0]; $class = $elementClass[1]; - $nodeList = array(); + $nodeList = []; $elements = $dom->getElementsByTagName($element); - if (sizeof($elements) > 0) { + if (count($elements) > 0) { /** @var DOMElement $element */ foreach ($elements as $element) { - if (strpos($element->getAttribute('class'), $class) !== false) { + if (str_contains($element->getAttribute('class'), $class)) { $nodeList[] = $element; } } @@ -75,8 +72,6 @@ private static function getElementsByClass(DOMDocument $dom, $element) } /** - * @param DOMDocument $dom - * @param $element * @return array * @author Joachim Doerr */ @@ -84,11 +79,11 @@ private static function getElementsByData(DOMDocument $dom, $element) { preg_match('/^.(\[.*?\])$/m', $element, $matches); $element = str_replace($matches[1], '', $matches[0]); - $data = str_replace(array('[',']','"'), '', $matches[1]); + $data = str_replace(['[', ']', '"'], '', $matches[1]); $data = explode('=', $data); - $nodeList = array(); + $nodeList = []; $elements = $dom->getElementsByTagName($element); - if (sizeof($elements) > 0) { + if (count($elements) > 0) { /** @var DOMElement $element */ foreach ($elements as $element) { if ($element->hasAttribute($data[0]) && $element->getAttribute($data[0]) == $data[1]) { diff --git a/lib/MBlock/Handler/MBlockValueHandler.php b/lib/MBlock/Handler/MBlockValueHandler.php index d8a1f72..c912ad5 100644 --- a/lib/MBlock/Handler/MBlockValueHandler.php +++ b/lib/MBlock/Handler/MBlockValueHandler.php @@ -9,30 +9,28 @@ class MBlockValueHandler { /** + * @throws rex_sql_exception * @return array * @author Joachim Doerr - * @throws rex_sql_exception */ public static function loadRexVars() { $sliceId = rex_request('slice_id', 'int', false); - $result = array(); + $result = []; - if (rex_get('function') == 'add') { + if ('add' == rex_get('function')) { return $result; } - - $prevent_action = false; - if (rex_addon::get('gridblock')->isAvailable()) - { - if (rex_gridblock::isBackend()) - { - $prevent_action = true; + + $prevent_action = false; + if (rex_addon::get('gridblock')->isAvailable()) { + if (rex_gridblock::isBackend()) { + $prevent_action = true; } } - // Get data from $_POST and ignore gridblock addon - // Should be chenged when https://github.com/redaxo/redaxo/issues/5298 is fixed. - if (rex_request('save', 'int') == 1 && $prevent_action == false) { + // Get data from $_POST and ignore gridblock addon + // Should be chenged when https://github.com/redaxo/redaxo/issues/5298 is fixed. + if (1 == rex_request('save', 'int') && false == $prevent_action) { $result = []; if (rex_request('REX_INPUT_VALUE', 'array')) { @@ -43,7 +41,7 @@ public static function loadRexVars() } } - if ($sliceId != false) { + if (false != $sliceId) { $table = rex::getTablePrefix() . 'article_slice'; $fields = '*'; $where = 'id="' . $_REQUEST['slice_id'] . '"'; @@ -58,7 +56,7 @@ public static function loadRexVars() $rows = $sql->getRows(); if ($rows > 0) { - for ($i = 1; $i <= 20; $i++) { + for ($i = 1; $i <= 20; ++$i) { $result['value'][$i] = $sql->getValue('value' . $i); if ($i <= 10) { @@ -70,8 +68,9 @@ public static function loadRexVars() $jsonResult = json_decode(htmlspecialchars_decode((string) $result['value'][$i]), true); - if (is_array($jsonResult)) + if (is_array($jsonResult)) { $result['value'][$i] = $jsonResult; + } } } } @@ -79,27 +78,26 @@ public static function loadRexVars() } /** - * @param $table * @param null|int $id + * @throws rex_sql_exception * @return array * @author Joachim Doerr - * @throws rex_sql_exception */ public static function loadFromTable($table, $id = 0) { $tableName = str_replace('yform_', '', $table[0]); $columnName = $table[1]; $attrType = (isset($table[2])) ? $table[2] : null; - $id = ($id == 0 && isset($table[3])) ? $table[3] : $id; + $id = (0 == $id && isset($table[3])) ? $table[3] : $id; $idField = 'id'; - if (strpos($id, '>>') !== false) { + if (str_contains($id, '>>')) { $explodedId = explode('>>', $id); $idField = $explodedId[0]; $id = $explodedId[1]; } - $result = array(); + $result = []; $sql = rex_sql::factory(); $sql->setQuery("SELECT * FROM $tableName WHERE $idField='$id' LIMIT 1"); @@ -108,18 +106,18 @@ public static function loadFromTable($table, $id = 0) if (array_key_exists($tableName . '.' . $columnName, $sql->getRow())) { $jsonResult = json_decode(htmlspecialchars_decode($sql->getRow()[$tableName . '.' . $columnName]), true); - if (!is_null($attrType) && is_array($jsonResult) && array_key_exists($attrType, $jsonResult)) { + if (null !== $attrType && is_array($jsonResult) && array_key_exists($attrType, $jsonResult)) { $jsonResult = $jsonResult[$attrType]; } $tableKey = ($table[0] != $tableName) ? $table[0] : $tableName; - if (is_array($jsonResult)) + if (is_array($jsonResult)) { $result['value'][$tableKey . '::' . $columnName] = $jsonResult; + } } } return $result; } } - diff --git a/lib/MBlock/MBlock.php b/lib/MBlock/MBlock.php index 676d1dc..a38e63c 100644 --- a/lib/MBlock/MBlock.php +++ b/lib/MBlock/MBlock.php @@ -7,21 +7,14 @@ class MBlock { + /** @var array */ + private static $items = []; - /** - * @var array - */ - private static $items = array(); + /** @var array */ + private static $result = []; - /** - * @var array - */ - private static $result = array(); - - /** - * @var array - */ - private static $output = array(); + /** @var array */ + private static $output = []; /** * MBlock constructor. @@ -36,23 +29,22 @@ public function __construct() } /** - * @param $id * @param string|MForm|mblock_rex_form|rex_yform $form * @param array $settings * @param null $theme - * @return mixed * @throws rex_sql_exception + * @return mixed */ - public static function show($id, $form, $settings = array(), $theme = null) + public static function show($id, $form, $settings = [], $theme = null) { $plain = false; if (!isset($_SESSION['mblock_count'])) { // set mblock count is not exist $_SESSION['mblock_count'] = 0; } - $_SESSION['mblock_count']++; + ++$_SESSION['mblock_count']; - if (is_integer($id) or is_numeric($id)) { + if (is_int($id) || is_numeric($id)) { // load rex value by id self::$result = MBlockValueHandler::loadRexVars(); @@ -60,17 +52,17 @@ public static function show($id, $form, $settings = array(), $theme = null) $form = $form->show(); } } else { - if (strpos($id, 'yform') !== false) { + if (str_contains($id, 'yform')) { $table = explode('::', $id); - if (sizeof($table) > 2) { + if (count($table) > 2) { $id = $table[0] . '::' . $table[1]; $settings['type_key'] = $table[2]; $post = rex_request::post($table[1]); - if (!is_null($post) && isset($post[$settings['type_key']])) { + if (null !== $post && isset($post[$settings['type_key']])) { self::$result['value'][$id] = $post[$settings['type_key']]; } - if (sizeof($table) > 3) { + if (count($table) > 3) { self::$result = MBlockValueHandler::loadFromTable($table); } } else { @@ -110,7 +102,7 @@ public static function show($id, $form, $settings = array(), $theme = null) $table = explode('::', $id); self::$result = MBlockValueHandler::loadFromTable($table, rex_request::get('id', 'int', 0)); - if (sizeof($table) > 2) { + if (count($table) > 2) { $id = $table[0] . '::' . $table[1]; $settings['type_key'] = array_pop($table); } @@ -126,7 +118,7 @@ public static function show($id, $form, $settings = array(), $theme = null) $plainItem = new MBlockItem(); $plainItem->setId(0) ->setValueId($id) - ->setResult(array()) + ->setResult([]) ->setForm($form) ->addPayload('plain_item', true); @@ -135,7 +127,7 @@ public static function show($id, $form, $settings = array(), $theme = null) // item result to item foreach (self::$result['value'][$id] as $jId => $values) { // init item - self::$items[$jId] = new MBlockItem; + self::$items[$jId] = new MBlockItem(); self::$items[$jId]->setId($jId) ->setValueId($id) ->setResult($values) @@ -152,21 +144,20 @@ public static function show($id, $form, $settings = array(), $theme = null) // create first element // don't loaded? - if (!self::$items && (!isset($settings['initial_hidden']) or $settings['initial_hidden'] != 1)) { + if (!self::$items && (!isset($settings['initial_hidden']) || 1 != $settings['initial_hidden'])) { // set plain item for add $plain = true; self::$items[0] = new MBlockItem(); self::$items[0]->setId(0) ->setValueId($id) - ->setResult(array()) + ->setResult([]) ->setForm($form); } - // foreach rex value json items /** @var MBlockItem $item */ foreach (static::$items as $count => $item) { - static::$output[] = self::createOutput($item, ($count + 1), $theme); + static::$output[] = self::createOutput($item, $count + 1, $theme); } $addText = (isset($settings['initial_button_text'])) ? ' ' . $settings['initial_button_text'] : ''; @@ -181,8 +172,7 @@ public static function show($id, $form, $settings = array(), $theme = null) // return wrapped from elements $output = MBlockParser::parseElement($wrapper, 'wrapper', $theme); - - if (($plain && array_key_exists('disable_null_view', $settings) && $settings['disable_null_view'] == true) and rex_request::get('function', 'string') != 'add') { + if (($plain && array_key_exists('disable_null_view', $settings) && true == $settings['disable_null_view']) && 'add' != rex_request::get('function', 'string')) { $buttonText = 'Show MBlock'; if (array_key_exists('null_view_button_text', $settings) && !empty($settings['null_view_button_text'])) { @@ -210,8 +200,6 @@ public static function show($id, $form, $settings = array(), $theme = null) } /** - * @param MBlockItem $item - * @param $count * @param null $theme * @return mixed * @author Joachim Doerr @@ -269,4 +257,4 @@ private static function reset() unset(self::$output[$key]); } } -} \ No newline at end of file +} diff --git a/lib/MBlock/Parser/MBlockParser.php b/lib/MBlock/Parser/MBlockParser.php index a254aa1..8509b02 100644 --- a/lib/MBlock/Parser/MBlockParser.php +++ b/lib/MBlock/Parser/MBlockParser.php @@ -8,7 +8,6 @@ class MBlockParser { /** - * @param MBlockElement $element * @param string $templateType * @param null $theme * @return mixed @@ -17,8 +16,8 @@ class MBlockParser public static function parseElement(MBlockElement $element, $templateType, $theme = null) { return str_replace( - array_merge(array(' />'), $element->getKeys()), - array_merge(array('/>'), $element->getValues()), + array_merge([' />'], $element->getKeys()), + array_merge(['/>'], $element->getValues()), MBlockTemplateFileProvider::loadTemplate($templateType, '', $theme)); } -} \ No newline at end of file +} diff --git a/lib/MBlock/Processor/MBlockRexFormProcessor.php b/lib/MBlock/Processor/MBlockRexFormProcessor.php index 05081ea..5f916df 100644 --- a/lib/MBlock/Processor/MBlockRexFormProcessor.php +++ b/lib/MBlock/Processor/MBlockRexFormProcessor.php @@ -8,12 +8,9 @@ class MBlockRexFormProcessor { /** - * @param $status - * @param mblock_rex_form $form - * @param array $post + * @throws rex_sql_exception * @return mixed * @author Joachim Doerr - * @throws rex_sql_exception */ public static function postPostSaveAction($status, mblock_rex_form $form, array $post) { @@ -21,15 +18,18 @@ public static function postPostSaveAction($status, mblock_rex_form $form, array $processIt = false; foreach ($post as $fieldRow => $fields) { - if (strpos($fieldRow, '_save') !== false OR strpos($fieldRow, '_apply') !== false) + if (str_contains($fieldRow, '_save') || str_contains($fieldRow, '_apply')) { $processIt = true; + } - if (strpos($fieldRow, '_apply') !== false) + if (str_contains($fieldRow, '_apply')) { $redirect = true; + } } - if ($processIt) + if ($processIt) { self::update($form, $post, $form->getSql()->getLastId()); + } if ($redirect) { if (($result = $form->validate()) === true) { @@ -45,8 +45,6 @@ public static function postPostSaveAction($status, mblock_rex_form $form, array } /** - * @param mblock_rex_form $form - * @param array $post * @param null $id * @author Joachim Doerr * @throws rex_sql_exception @@ -57,35 +55,45 @@ private static function update(mblock_rex_form $form, array $post, $id = null) $sql->setDebug(0); $sql->setTable($form->getTableName()); - if (!is_null($id) && $id != 0) + if (null !== $id && 0 != $id) { $sql->setWhere('id = ' . $id); - else + } else { $sql->setWhere($form->getWhereCondition()); + } - $updateValues = array(); - $rows = array(); + $updateValues = []; + $rows = []; $result = $form->getSql()->getRow(); - if (is_array($result) && sizeof($result) > 0) - foreach ($result as $row => $value) - if(is_array(json_decode($value, true))) { + if (is_array($result) && count($result) > 0) { + foreach ($result as $row => $value) { + if (is_array(json_decode($value, true))) { $newRow = explode('.', $row); $rows[] = array_pop($newRow); } + } + } - if (isset($post[$form->getName()])) - foreach ($post[$form->getName()] as $row => $field) - if (is_array($field)) + if (isset($post[$form->getName()])) { + foreach ($post[$form->getName()] as $row => $field) { + if (is_array($field)) { $updateValues[$row] = json_encode($field); + } + } + } // is row not in update list? - if (sizeof($rows) > 0) - foreach ($rows as $row) - if (!array_key_exists($row, $updateValues)) - $updateValues[$row] = NULL; + if (count($rows) > 0) { + foreach ($rows as $row) { + if (!array_key_exists($row, $updateValues)) { + $updateValues[$row] = null; + } + } + } - if (sizeof($updateValues) > 0) + if (count($updateValues) > 0) { $sql->setValues($updateValues)->update(); + } } -} \ No newline at end of file +} diff --git a/lib/MBlock/Processor/mblock_rex_form.php b/lib/MBlock/Processor/mblock_rex_form.php index 3e989b8..f592605 100644 --- a/lib/MBlock/Processor/mblock_rex_form.php +++ b/lib/MBlock/Processor/mblock_rex_form.php @@ -28,13 +28,13 @@ protected function save() /** @var rex_form_element $element */ foreach ($fieldsetElements as $element) { // read-only-fields nicht speichern - if (strpos($element->getAttribute('class'), 'form-control-static') !== false) { + if (str_contains($element->getAttribute('class'), 'form-control-static')) { continue; } // add by JD // must have for json array - if (strpos($element->getFieldName(), '][') !== false) { + if (str_contains($element->getFieldName(), '][')) { continue; } @@ -94,15 +94,17 @@ protected function save() */ public function get() { - if (rex_request::get('redirected', 'int', 0) == 1) { + if (1 == rex_request::get('redirected', 'int', 0)) { $list_name = rex_request::get('list', 'string'); $message = rex_request::get($list_name . '_msg', 'string'); - if ($message) - if (rex_request::get('msg_is_warning', 'int', 0) == 1) + if ($message) { + if (1 == rex_request::get('msg_is_warning', 'int', 0)) { $this->setWarning($message); - else + } else { $this->setMessage($message); + } + } } return parent::get(); } @@ -119,7 +121,6 @@ public function validate() /** * @param string $listMessage * @param string $listWarning - * @param array $params * @author Joachim Doerr */ public function redirect($listMessage = '', $listWarning = '', array $params = []) @@ -170,11 +171,11 @@ public function getElements($legend = '') foreach ($fieldsets as $fieldsetName => $fieldsetElements) { $s .= '
' . "\n"; - if ($legend != '' && $legend != $this->name) { + if ('' != $legend && $legend != $this->name) { $s .= '' . htmlspecialchars($legend) . '' . "\n"; } - if ($i == 0 && $addHeaders) { + if (0 == $i && $addHeaders) { foreach ($this->getHeaderElements() as $element) { // Callback $element->setValue($this->preView($fieldsetName, $element->getFieldName(), $element->getValue())); @@ -190,11 +191,10 @@ public function getElements($legend = '') $s .= $element->get(); } - $s .= '
' . "\n"; ++$i; } return $s; } -} \ No newline at end of file +} diff --git a/lib/MBlock/Provider/MBlockTemplateFileProvider.php b/lib/MBlock/Provider/MBlockTemplateFileProvider.php index 168f2ef..a5da69c 100644 --- a/lib/MBlock/Provider/MBlockTemplateFileProvider.php +++ b/lib/MBlock/Provider/MBlockTemplateFileProvider.php @@ -7,21 +7,20 @@ class MBlockTemplateFileProvider { - const DEFAULT_THEME = 'default_theme'; - const THEME_PATH = 'mblock/templates/%s/'; - const ELEMENTS_PATH = 'elements/'; + public const DEFAULT_THEME = 'default_theme'; + public const THEME_PATH = 'mblock/templates/%s/'; + public const ELEMENTS_PATH = 'elements/'; /** - * @param $templateType * @param string $subPath * @param null $theme * @param bool $stop * @return string * @author Joachim Doerr */ - public static function loadTemplate($templateType, $subPath = '', $theme = NULL, $stop = false) + public static function loadTemplate($templateType, $subPath = '', $theme = null, $stop = false) { - if (is_null($theme)) { + if (null === $theme) { $theme = rex_addon::get('mblock')->getConfig('mblock_theme'); } @@ -35,13 +34,15 @@ public static function loadTemplate($templateType, $subPath = '', $theme = NULL, // is template file exist? and template type not html if (file_exists($path . $file)) { // load theme file - $templateString = implode(file($path . $file, FILE_USE_INCLUDE_PATH)); + $templateString = implode('', file($path . $file, FILE_USE_INCLUDE_PATH)); } else { // stop recursion is default theme not founding - if (!$stop) return self::loadTemplate($templateType, $subPath, self::DEFAULT_THEME, true); + if (!$stop) { + return self::loadTemplate($templateType, $subPath, self::DEFAULT_THEME, true); + } } // exchange template string return $templateString; } -} \ No newline at end of file +} diff --git a/lib/MBlock/Replacer/MBlockBootstrapReplacer.php b/lib/MBlock/Replacer/MBlockBootstrapReplacer.php index ca817ed..203eddd 100644 --- a/lib/MBlock/Replacer/MBlockBootstrapReplacer.php +++ b/lib/MBlock/Replacer/MBlockBootstrapReplacer.php @@ -10,9 +10,7 @@ class MBlockBootstrapReplacer use \MBlock\Decorator\MBlockDOMTrait; /** - * @param MBlockItem $item - * @param $count - * @return String + * @return string * @author Joachim Doerr */ public static function replaceTabIds(MBlockItem $item, $count) @@ -26,7 +24,7 @@ public static function replaceTabIds(MBlockItem $item, $count) foreach ($matches as $key => $match) { $item->addPayload('replace-id', $key); - $href = str_replace('#','',$match->getAttribute('href')); + $href = str_replace('#', '', $match->getAttribute('href')); $newHref = $href . '_' . $count . $_SESSION['mblock_count'] . '00' . $key; $match->setAttribute('href', '#' . $newHref); @@ -52,9 +50,7 @@ public static function replaceTabIds(MBlockItem $item, $count) } /** - * @param MBlockItem $item - * @param $count - * @return String + * @return string * @author Joachim Doerr */ public static function replaceCollapseIds(MBlockItem $item, $count) @@ -68,11 +64,11 @@ public static function replaceCollapseIds(MBlockItem $item, $count) foreach ($matches as $key => $match) { $item->addPayload('replace-id', $key); - $href = str_replace('#','',$match->getAttribute('data-target')); + $href = str_replace('#', '', $match->getAttribute('data-target')); $newHref = $href . '_' . $count . $_SESSION['mblock_count'] . '00' . $key; $match->setAttribute('data-target', '#' . $newHref); if ($match->hasAttribute('data-parent')) { - $match->setAttribute('data-parent', '#accgr' . '_' . $count . $_SESSION['mblock_count'] . '00'); + $match->setAttribute('data-parent', '#accgr_' . $count . $_SESSION['mblock_count'] . '00'); } $next = $match->nextSibling; @@ -83,12 +79,12 @@ public static function replaceCollapseIds(MBlockItem $item, $count) $parent = $match->parentNode->parentNode; - if ($parent->hasAttribute('data-group-accordion') && $parent->getAttribute('data-group-accordion') == 1) { - $parent->setAttribute('id', 'accgr' . '_' . $count . $_SESSION['mblock_count'] . '00'); + if ($parent->hasAttribute('data-group-accordion') && 1 == $parent->getAttribute('data-group-accordion')) { + $parent->setAttribute('id', 'accgr_' . $count . $_SESSION['mblock_count'] . '00'); } } } // return the manipulated html output return self::saveHtml($dom); } -} \ No newline at end of file +} diff --git a/lib/MBlock/Replacer/MBlockCheckboxReplacer.php b/lib/MBlock/Replacer/MBlockCheckboxReplacer.php index 191ff7d..d283a34 100644 --- a/lib/MBlock/Replacer/MBlockCheckboxReplacer.php +++ b/lib/MBlock/Replacer/MBlockCheckboxReplacer.php @@ -10,9 +10,7 @@ class MBlockCheckboxReplacer use \MBlock\Decorator\MBlockDOMTrait; /** - * @param MBlockItem $item - * @param $count - * @return String + * @return string * @author Joachim Doerr */ public static function replaceCheckboxesBlockHolder(MBlockItem $item, $count) @@ -37,4 +35,4 @@ public static function replaceCheckboxesBlockHolder(MBlockItem $item, $count) // return the manipulated html output return ($holderInput) ? '' . self::saveHtml($dom) : self::saveHtml($dom); } -} \ No newline at end of file +} diff --git a/lib/MBlock/Replacer/MBlockCountReplacer.php b/lib/MBlock/Replacer/MBlockCountReplacer.php index b434944..7cf50c5 100644 --- a/lib/MBlock/Replacer/MBlockCountReplacer.php +++ b/lib/MBlock/Replacer/MBlockCountReplacer.php @@ -8,13 +8,11 @@ class MBlockCountReplacer { /** - * @param MBlockItem $item - * @param $count * @return mixed * @author Joachim Doerr */ public static function replaceCountKeys(MBlockItem $item, $count) { - return str_replace(array('%%MB_COUNT%%', '%MB_COUNT%'), array(''.$count.'', $count), $item->getForm()); + return str_replace(['%%MB_COUNT%%', '%MB_COUNT%'], ['' . $count . '', $count], $item->getForm()); } -} \ No newline at end of file +} diff --git a/lib/MBlock/Replacer/MBlockSystemButtonReplacer.php b/lib/MBlock/Replacer/MBlockSystemButtonReplacer.php index 094c6cf..2ce0454 100644 --- a/lib/MBlock/Replacer/MBlockSystemButtonReplacer.php +++ b/lib/MBlock/Replacer/MBlockSystemButtonReplacer.php @@ -8,11 +8,10 @@ class MBlockSystemButtonReplacer { use \MBlock\Decorator\MBlockDOMTrait; - const REX_VERSION = '5.12.1'; + public const REX_VERSION = '5.12.1'; /** - * @param MBlockItem $item - * @return String + * @return string * @author Joachim Doerr */ public static function replaceCustomLinkText(MBlockItem $item) @@ -27,14 +26,14 @@ public static function replaceCustomLinkText(MBlockItem $item) $value = ''; /** @var DOMElement $child */ foreach ($match->getElementsByTagName('input') as $child) { - if ($child->getAttribute('type') == 'hidden') { + if ('hidden' == $child->getAttribute('type')) { $value = $child->getAttribute('value'); break; } } /** @var DOMElement $child */ foreach ($match->getElementsByTagName('input') as $child) { - if ($child->getAttribute('type') == 'text') { + if ('text' == $child->getAttribute('type')) { // is numeric also link if (is_numeric($value)) { // add link art name @@ -54,9 +53,7 @@ public static function replaceCustomLinkText(MBlockItem $item) } /** - * @param MBlockItem $item - * @param $count - * @return String + * @return string * @author Joachim Doerr */ public static function replaceSystemButtons(MBlockItem $item, $count) @@ -79,23 +76,23 @@ public static function replaceSystemButtons(MBlockItem $item, $count) $type = $child->getAttribute('type'); // process by type - if (strpos($id, 'REX_MEDIA_') !== false && $type == 'text') { + if (str_contains($id, 'REX_MEDIA_') && 'text' == $type) { // media button self::processMedia($match, $item); } - if (strpos($id, 'REX_MEDIALIST_') !== false) { + if (str_contains($id, 'REX_MEDIALIST_')) { // medialist button self::processMediaList($match, $item); } - if (strpos($name, 'REX_LINK_') !== false && $type == 'text') { + if (str_contains($name, 'REX_LINK_') && 'text' == $type) { // link button - if (strpos($match->getAttribute('class'), 'custom-link') !== false) { + if (str_contains($match->getAttribute('class'), 'custom-link')) { self::processCustomLink($match, $item); } else { self::processLink($match, $item); } } - if (strpos($id, 'REX_LINKLIST_') !== false) { + if (str_contains($id, 'REX_LINKLIST_')) { // linklist button self::processLinkList($match, $item); } @@ -109,8 +106,6 @@ public static function replaceSystemButtons(MBlockItem $item, $count) } /** - * @param DOMElement $dom - * @param MBlockItem $item * @author Joachim Doerr */ protected static function processMedia(DOMElement $dom, MBlockItem $item) @@ -120,13 +115,13 @@ protected static function processMedia(DOMElement $dom, MBlockItem $item) // has children ? if ($dom->hasChildNodes()) { // replace name first child is input - if (strrpos($dom->firstChild->getAttribute('name'), 'REX_INPUT_MEDIA') !== false) { + if (false !== strrpos($dom->firstChild->getAttribute('name'), 'REX_INPUT_MEDIA')) { self::replaceName($dom->firstChild, $item, 'REX_INPUT_MEDIA'); } // change for id self::replaceId($dom->firstChild, $item); // change onclick id - if (rex_version::compare(rex::getVersion(),self::REX_VERSION, '>=')) { + if (rex_version::compare(rex::getVersion(), self::REX_VERSION, '>=')) { self::replaceOnClick($dom, $item, 'REXMedia(', '(\'?', '\'?,', '(\'', '\','); self::replaceOnClick($dom, $item, 'REXMedia(', '(\'?', '\'?\)', '(\'', '\')'); } else { @@ -137,8 +132,6 @@ protected static function processMedia(DOMElement $dom, MBlockItem $item) } /** - * @param DOMElement $dom - * @param MBlockItem $item * @author Joachim Doerr */ protected static function processMediaList(DOMElement $dom, MBlockItem $item) @@ -153,19 +146,19 @@ protected static function processMediaList(DOMElement $dom, MBlockItem $item) // $dom->firstChild->removeAttribute('name'); /** @var DOMElement $child */ foreach ($dom->getElementsByTagName('input') as $child) { - if (strrpos($child->getAttribute('name'), 'REX_INPUT_MEDIALIST') !== false) { + if (false !== strrpos($child->getAttribute('name'), 'REX_INPUT_MEDIALIST')) { // replace name self::replaceName($child, $item, 'REX_INPUT_MEDIALIST'); } // change id self::replaceId($child, $item); - if ($child->getAttribute('type') == 'hidden') { + if ('hidden' == $child->getAttribute('type')) { $name = $child->getAttribute('name'); } } /** @var DOMElement $child */ foreach ($dom->getElementsByTagName('select') as $child) { - if (strpos($child->getAttribute('id'), 'REX_MEDIALIST_SELECT_') !== false) { + if (str_contains($child->getAttribute('id'), 'REX_MEDIALIST_SELECT_')) { // replace name $child->setAttribute('name', str_replace($item->getSystemId(), $item->getId(), $child->getAttribute('name'))); // change id @@ -175,7 +168,7 @@ protected static function processMediaList(DOMElement $dom, MBlockItem $item) } } // change click id - if (rex_version::compare(rex::getVersion(),self::REX_VERSION, '>=')) { + if (rex_version::compare(rex::getVersion(), self::REX_VERSION, '>=')) { self::replaceOnClick($dom, $item, 'REXMedialist(', '(\'?', '\'?,', '(\'', '\','); self::replaceOnClick($dom, $item, 'REXMedialist(', '(\'?', '\'?\)', '(\'', '\')'); } else { @@ -187,8 +180,6 @@ protected static function processMediaList(DOMElement $dom, MBlockItem $item) } /** - * @param DOMElement $dom - * @param MBlockItem $item * @author Joachim Doerr */ protected static function processLink(DOMElement $dom, MBlockItem $item) @@ -201,13 +192,13 @@ protected static function processLink(DOMElement $dom, MBlockItem $item) /** @var DOMElement $child */ foreach ($dom->getElementsByTagName('input') as $child) { // hidden input - if (strrpos($child->getAttribute('name'), 'REX_INPUT_LINK') !== false) { + if (false !== strrpos($child->getAttribute('name'), 'REX_INPUT_LINK')) { // replace name self::replaceName($child, $item, 'REX_INPUT_LINK'); } // change id self::replaceId($child, $item); - if ($child->getAttribute('type') == 'hidden') { + if ('hidden' == $child->getAttribute('type')) { $name = $child->getAttribute('name'); } } @@ -216,8 +207,8 @@ protected static function processLink(DOMElement $dom, MBlockItem $item) // add link art name self::addArtName($dom->firstChild, $item, $name); // change click id - if (rex_version::compare(rex::getVersion(),self::REX_VERSION, '>=')) { - self::replaceOnClick($dom, $item, 'REXLink(', '(\'?', '\'?\)','(\'', '\')'); + if (rex_version::compare(rex::getVersion(), self::REX_VERSION, '>=')) { + self::replaceOnClick($dom, $item, 'REXLink(', '(\'?', '\'?\)', '(\'', '\')'); self::replaceOnClick($dom, $item, 'openLinkMap(', '_', '\'', '_', '\''); } else { self::replaceOnClick($dom, $item, 'REXLink(', '(', ')', '(', ')'); @@ -227,8 +218,6 @@ protected static function processLink(DOMElement $dom, MBlockItem $item) } /** - * @param DOMElement $dom - * @param MBlockItem $item * @author Joachim Doerr */ protected static function processCustomLink(DOMElement $dom, MBlockItem $item) @@ -244,7 +233,7 @@ protected static function processCustomLink(DOMElement $dom, MBlockItem $item) /** @var DOMElement $child */ foreach ($dom->getElementsByTagName('input') as $child) { // hidden input - if (strpos($child->getAttribute('name'), 'REX_INPUT_LINK') !== false) { + if (str_contains($child->getAttribute('name'), 'REX_INPUT_LINK')) { // replace name self::replaceName($child, $item, 'REX_INPUT_LINK'); } @@ -269,8 +258,6 @@ protected static function processCustomLink(DOMElement $dom, MBlockItem $item) } /** - * @param DOMElement $dom - * @param MBlockItem $item * @author Joachim Doerr */ protected static function processLinkList(DOMElement $dom, MBlockItem $item) @@ -282,8 +269,8 @@ protected static function processLinkList(DOMElement $dom, MBlockItem $item) if ($dom->hasChildNodes()) { /** @var DOMElement $child */ foreach ($dom->getElementsByTagName('input') as $child) { - if ($child->getAttribute('type') == 'hidden') { - if (strrpos($child->getAttribute('name'), 'REX_INPUT_LINKLIST') !== false) { + if ('hidden' == $child->getAttribute('type')) { + if (false !== strrpos($child->getAttribute('name'), 'REX_INPUT_LINKLIST')) { // replace name self::replaceName($child, $item, 'REX_INPUT_LINKLIST'); } @@ -294,7 +281,7 @@ protected static function processLinkList(DOMElement $dom, MBlockItem $item) } /** @var DOMElement $child */ foreach ($dom->getElementsByTagName('select') as $child) { - if (strpos($child->getAttribute('id'), 'REX_LINKLIST_SELECT_') !== false) { + if (str_contains($child->getAttribute('id'), 'REX_LINKLIST_SELECT_')) { // replace name $child->setAttribute('name', str_replace($item->getSystemId(), $item->getId(), $child->getAttribute('name'))); // replace id @@ -303,8 +290,8 @@ protected static function processLinkList(DOMElement $dom, MBlockItem $item) self::addLinkSelectOptions($child, $item, $name); } } - if (rex_version::compare(rex::getVersion(),self::REX_VERSION, '>=')) { - self::replaceOnClick($dom, $item, 'REXLinklist(', '(\'?', '\'?,','(\'', '\','); + if (rex_version::compare(rex::getVersion(), self::REX_VERSION, '>=')) { + self::replaceOnClick($dom, $item, 'REXLinklist(', '(\'?', '\'?,', '(\'', '\','); self::replaceOnClick($dom, $item, 'deleteREXLinklist(', '(\'?', '\'?', '(\'', '\''); } else { self::replaceOnClick($dom, $item, 'REXLinklist(', '(', ',', '(', ','); @@ -315,9 +302,6 @@ protected static function processLinkList(DOMElement $dom, MBlockItem $item) } /** - * @param DOMElement $dom - * @param MBlockItem $item - * @param $btnFindKey * @param string $prefix * @param string $suffix * @author Joachim Doerr @@ -327,10 +311,10 @@ protected static function replaceOnClick(DOMElement $dom, MBlockItem $item, $btn // find a buttons and replace id if ($dom->hasChildNodes()) { /** @var DOMElement $child */ - foreach($dom->getElementsByTagName('a') as $child) { + foreach ($dom->getElementsByTagName('a') as $child) { if ($child->hasAttribute('onclick')) { - if (strpos($child->getAttribute('onclick'), $btnFindKey) !== false) { - $child->setAttribute('onclick', preg_replace('/\\'.$searchPrefix.'\d\\'.$searchSuffix.'/', $prefix . $item->getPayload('count-id') . $_SESSION['mblock_count'] . '00' . $item->getPayload('replace-id') . $suffix, $child->getAttribute('onclick'))); + if (str_contains($child->getAttribute('onclick'), $btnFindKey)) { + $child->setAttribute('onclick', preg_replace('/\\' . $searchPrefix . '\d\\' . $searchSuffix . '/', $prefix . $item->getPayload('count-id') . $_SESSION['mblock_count'] . '00' . $item->getPayload('replace-id') . $suffix, $child->getAttribute('onclick'))); } } } @@ -338,8 +322,6 @@ protected static function replaceOnClick(DOMElement $dom, MBlockItem $item, $btn } /** - * @param DOMElement $dom - * @param MBlockItem $item * @author Joachim Doerr * @return string|null */ @@ -351,8 +333,6 @@ protected static function replaceId(DOMElement $dom, MBlockItem $item) } /** - * @param DOMElement $dom - * @param MBlockItem $item * @author Joachim Doerr */ protected static function replaceDataId(DOMElement $dom, MBlockItem $item) @@ -362,9 +342,6 @@ protected static function replaceDataId(DOMElement $dom, MBlockItem $item) } /** - * @param DOMElement $dom - * @param MBlockItem $item - * @param $name * @author Joachim Doerr */ protected static function replaceName(DOMElement $dom, MBlockItem $item, $name) @@ -377,13 +354,11 @@ protected static function replaceName(DOMElement $dom, MBlockItem $item, $name) $item->setSystemId($matches[1]); // and replace name attribute $replaceName = str_replace(strtoupper('_input'), '', $name); - $dom->setAttribute('name', str_replace(array($name, '[' . $item->getSystemId() . ']'), array('REX_INPUT_VALUE', '[' . $item->getValueId() . '][0][' . $replaceName . '_' . $item->getSystemId() . ']'), $dom->getAttribute('name'))); + $dom->setAttribute('name', str_replace([$name, '[' . $item->getSystemId() . ']'], ['REX_INPUT_VALUE', '[' . $item->getValueId() . '][0][' . $replaceName . '_' . $item->getSystemId() . ']'], $dom->getAttribute('name'))); } } /** - * @param DOMElement $dom - * @param MBlockItem $item * @author Joachim Doerr */ protected static function addMediaSelectOptions(DOMElement $dom, MBlockItem $item, $name) @@ -391,13 +366,13 @@ protected static function addMediaSelectOptions(DOMElement $dom, MBlockItem $ite self::setSystemIdByName($name, $item); if (is_array($item->getResult()) && ( - array_key_exists($item->getSystemName() . '_' . $item->getSystemId(), $item->getResult()) OR - array_key_exists(strtolower($item->getSystemName()) . '_' . $item->getSystemId(), $item->getResult()) - ) + array_key_exists($item->getSystemName() . '_' . $item->getSystemId(), $item->getResult()) || + array_key_exists(strtolower($item->getSystemName()) . '_' . $item->getSystemId(), $item->getResult()) + ) ) { $key = (isset($item->getResult()[$item->getSystemName() . '_' . $item->getSystemId()])) ? $item->getSystemName() . '_' . $item->getSystemId() : strtolower($item->getSystemName()) . '_' . $item->getSystemId(); $resultItems = explode(',', $item->getResult()[$key]); - if (sizeof($resultItems) > 0) { + if (count($resultItems) > 0) { foreach ($resultItems as $resultItem) { if (!empty($resultItem)) { $dom->appendChild(new DOMElement('option', $resultItem)); @@ -405,7 +380,7 @@ protected static function addMediaSelectOptions(DOMElement $dom, MBlockItem $ite } /** @var DOMElement $child */ foreach ($dom->childNodes as $child) { - if ($child->nodeName != 'option') { // Patch xampp gegen ooops + if ('option' != $child->nodeName) { // Patch xampp gegen ooops continue; } $child->setAttribute('value', $child->nodeValue); @@ -416,8 +391,6 @@ protected static function addMediaSelectOptions(DOMElement $dom, MBlockItem $ite } /** - * @param DOMElement $dom - * @param MBlockItem $item * @param string $name * @author Joachim Doerr */ @@ -426,13 +399,13 @@ protected static function addLinkSelectOptions(DOMElement $dom, MBlockItem $item self::setSystemIdByName($name, $item); if (is_array($item->getResult()) && ( - array_key_exists($item->getSystemName() . '_' . $item->getSystemId(), $item->getResult()) OR - array_key_exists(strtolower($item->getSystemName()) . '_' . $item->getSystemId(), $item->getResult()) - ) + array_key_exists($item->getSystemName() . '_' . $item->getSystemId(), $item->getResult()) || + array_key_exists(strtolower($item->getSystemName()) . '_' . $item->getSystemId(), $item->getResult()) + ) ) { $key = (isset($item->getResult()[$item->getSystemName() . '_' . $item->getSystemId()])) ? $item->getSystemName() . '_' . $item->getSystemId() : strtolower($item->getSystemName()) . '_' . $item->getSystemId(); $resultItems = explode(',', $item->getResult()[$key]); - if (sizeof($resultItems) > 0) { + if (count($resultItems) > 0) { foreach ($resultItems as $resultItem) { if (!empty($resultItem)) { $dom->appendChild(new DOMElement('option', $resultItem)); @@ -440,9 +413,9 @@ protected static function addLinkSelectOptions(DOMElement $dom, MBlockItem $item } /** @var DOMElement $child */ foreach ($dom->childNodes as $child) { - if ($child->nodeName != 'option') { // Patch xampp gegen ooops - continue; - } + if ('option' != $child->nodeName) { // Patch xampp gegen ooops + continue; + } $child->setAttribute('value', $child->nodeValue); $child->nodeValue = htmlentities(self::getLinkInfo($child->getAttribute('value'))['art_name']); $child->removeAttribute('selected'); @@ -452,8 +425,6 @@ protected static function addLinkSelectOptions(DOMElement $dom, MBlockItem $item } /** - * @param DOMElement $dom - * @param MBlockItem $item * @param string $name * @author Joachim Doerr */ @@ -462,9 +433,9 @@ protected static function addArtName(DOMElement $dom, MBlockItem $item, $name = self::setSystemIdByName($name, $item); if (is_array($item->getResult()) && ( - array_key_exists($item->getSystemName() . '_' . $item->getSystemId(), $item->getResult()) OR - array_key_exists(strtolower($item->getSystemName()) . '_' . $item->getSystemId(), $item->getResult()) - ) + array_key_exists($item->getSystemName() . '_' . $item->getSystemId(), $item->getResult()) || + array_key_exists(strtolower($item->getSystemName()) . '_' . $item->getSystemId(), $item->getResult()) + ) ) { $key = (isset($item->getResult()[$item->getSystemName() . '_' . $item->getSystemId()])) ? $item->getSystemName() . '_' . $item->getSystemId() : strtolower($item->getSystemName()) . '_' . $item->getSystemId(); $linkInfo = self::getLinkInfo($item->getResult()[$key]); @@ -473,18 +444,16 @@ protected static function addArtName(DOMElement $dom, MBlockItem $item, $name = } /** - * @param $name - * @param MBlockItem $item * @author Joachim Doerr */ private static function setSystemIdByName($name, MBlockItem $item) { - if ($name != '' && preg_match('/\_\d+/', $name, $matches)) - $item->setSystemId(str_replace('_','', $matches[0])); + if ('' != $name && preg_match('/\_\d+/', $name, $matches)) { + $item->setSystemId(str_replace('_', '', $matches[0])); + } } /** - * @param $id * @return array * @author Joachim Doerr */ @@ -497,6 +466,6 @@ private static function getLinkInfo($id) $art_name = $art->getName(); $category = $art->getCategoryId(); } - return array('art_name' => $art_name, 'category_id' => $category); + return ['art_name' => $art_name, 'category_id' => $category]; } } diff --git a/lib/MBlock/Replacer/MBlockValueReplacer.php b/lib/MBlock/Replacer/MBlockValueReplacer.php index 2d36f4a..5dab4d2 100644 --- a/lib/MBlock/Replacer/MBlockValueReplacer.php +++ b/lib/MBlock/Replacer/MBlockValueReplacer.php @@ -10,9 +10,7 @@ class MBlockValueReplacer use \MBlock\Decorator\MBlockDOMTrait; /** - * @param MBlockItem $item - * @param $count - * @return String + * @return string * @author Joachim Doerr */ public static function replaceValueSetEmpty(MBlockItem $item, $setDefaultValue = false) @@ -57,8 +55,9 @@ public static function replaceValueSetEmpty(MBlockItem $item, $setDefaultValue = foreach ($match->childNodes as $child) { switch ($child->nodeName) { case 'optgroup': - foreach ($child->childNodes as $nodeChild) + foreach ($child->childNodes as $nodeChild) { self::replaceOptionSelect($match, $nodeChild, $item); + } break; case 'option': if (isset($child->tagName)) { @@ -71,14 +70,10 @@ public static function replaceValueSetEmpty(MBlockItem $item, $setDefaultValue = } } - return self::saveHtml($dom); } /** - * @param DOMElement $element - * @param MBlockItem $item - * @param bool $valueEmpty * @author Joachim Doerr */ protected static function replaceValue(DOMElement $element, MBlockItem $item) @@ -102,8 +97,6 @@ protected static function replaceValue(DOMElement $element, MBlockItem $item) } /** - * @param DOMElement $element - * @param MBlockItem $item * @author Joachim Doerr */ protected static function replaceChecked(DOMElement $element, MBlockItem $item) @@ -121,9 +114,6 @@ protected static function replaceChecked(DOMElement $element, MBlockItem $item) } /** - * @param DOMElement $select - * @param DOMElement $option - * @param MBlockItem $item * @author Joachim Doerr */ protected static function replaceOptionSelect(DOMElement $select, DOMElement $option, MBlockItem $item) @@ -138,4 +128,4 @@ protected static function replaceOptionSelect(DOMElement $select, DOMElement $op } } } -} \ No newline at end of file +} diff --git a/lib/MBlock/Utils/MBlockPageHelper.php b/lib/MBlock/Utils/MBlockPageHelper.php index defdf95..e8626a6 100644 --- a/lib/MBlock/Utils/MBlockPageHelper.php +++ b/lib/MBlock/Utils/MBlockPageHelper.php @@ -8,7 +8,6 @@ class MBlockPageHelper { /** - * @param $type * @return string * @author Joachim Doerr */ @@ -19,14 +18,14 @@ public static function exchangeExamples($type) if (is_dir($file)) { continue; } - if (strpos($file, $type) !== false && strpos($file, 'output') === false) { + if (str_contains($file, $type) && !str_contains($file, 'output')) { // add input - $content = '

'.rex_i18n::msg('mblock_modul_input').'

' . rex_string::highlight(file_get_contents(rex_path::addon('mblock', 'pages/examples/' . $file))); + $content = '

' . rex_i18n::msg('mblock_modul_input') . '

' . rex_string::highlight(file_get_contents(rex_path::addon('mblock', 'pages/examples/' . $file))); if (file_exists(rex_path::addon('mblock', 'pages/examples/' . pathinfo($file, PATHINFO_FILENAME) . '_output.ini'))) { // add output - $content .= '

'.rex_i18n::msg('mblock_modul_output').'

' . rex_string::highlight(file_get_contents(rex_path::addon('mblock', 'pages/examples/' . pathinfo($file, PATHINFO_FILENAME) . '_output.ini'))); + $content .= '

' . rex_i18n::msg('mblock_modul_output') . '

' . rex_string::highlight(file_get_contents(rex_path::addon('mblock', 'pages/examples/' . pathinfo($file, PATHINFO_FILENAME) . '_output.ini'))); } // parse info fragment @@ -41,4 +40,4 @@ public static function exchangeExamples($type) } return $return; } -} \ No newline at end of file +} diff --git a/lib/MBlock/Utils/MBlockSettingsHelper.php b/lib/MBlock/Utils/MBlockSettingsHelper.php index 825c90e..3291970 100644 --- a/lib/MBlock/Utils/MBlockSettingsHelper.php +++ b/lib/MBlock/Utils/MBlockSettingsHelper.php @@ -8,7 +8,6 @@ class MBlockSettingsHelper { /** - * @param array $settings * @return string * @author Joachim Doerr */ @@ -30,11 +29,13 @@ public static function getSettings(array $settings) $settings['delete_confirm'] = rex_i18n::msg('mblock_delete_confirm'); } } else { - if ($settings['delete_confirm'] === 1) + if (1 === $settings['delete_confirm']) { $settings['delete_confirm'] = rex_i18n::msg('mblock_delete_confirm'); + } - if ($settings['delete_confirm'] === 0) + if (0 === $settings['delete_confirm']) { unset($settings['delete_confirm']); + } } if (isset($_SESSION['mblock_count'])) { $settings['mblock_count'] = $_SESSION['mblock_count']; @@ -51,4 +52,4 @@ public static function getSettings(array $settings) return $out; } -} \ No newline at end of file +} diff --git a/lib/MBlock/Utils/MBlockThemeHelper.php b/lib/MBlock/Utils/MBlockThemeHelper.php index 3c7aeb0..ccb29d6 100644 --- a/lib/MBlock/Utils/MBlockThemeHelper.php +++ b/lib/MBlock/Utils/MBlockThemeHelper.php @@ -12,30 +12,30 @@ class MBlockThemeHelper */ public static function getThemesInformation() { - $themeInfo = array(); - $path = implode('/', array('templates')); + $themeInfo = []; + $path = implode('/', ['templates']); foreach (scandir(rex_path::addonData('mblock', $path)) as $item) { - if ($item == '.' or $item == '..') { + if ('.' == $item || '..' == $item) { continue; } - $path = implode('/', array('templates', $item)); + $path = implode('/', ['templates', $item]); if (is_dir(rex_path::addonData('mblock', $path))) { $dirName = explode('_', $item); - $themeInfo[$item] = array( + $themeInfo[$item] = [ 'theme_name' => $dirName[0], 'theme_screen_name' => ucwords(str_replace('_', ' ', $item)), - 'theme_path' => $item - ); + 'theme_path' => $item, + ]; foreach (scandir(rex_path::addonData('mblock', $path)) as $file) { - if (pathinfo($file, PATHINFO_EXTENSION) == 'css') { - $path = implode('/', array('templates', $item, $file)); + if ('css' == pathinfo($file, PATHINFO_EXTENSION)) { + $path = implode('/', ['templates', $item, $file]); $themeInfo[$item]['theme_css_data'][] = rex_path::addonData('mblock', $path); if (file_exists(rex_path::addonAssets('mblock', $path))) { - $themeInfo[$item]['theme_css_assets'][] = array( + $themeInfo[$item]['theme_css_assets'][] = [ 'full_path' => rex_path::addonAssets('mblock', $path), - 'path' => $path - ); + 'path' => $path, + ]; } } } @@ -53,23 +53,22 @@ public static function copyThemeCssToAssets() // copy all theme css files to assets folder foreach (self::getThemesInformation() as $theme) { if (array_key_exists('theme_css_data', $theme)) { - #rex_file::copy($theme, ); + // rex_file::copy($theme, ); foreach ($theme['theme_css_data'] as $css) { - rex_file::copy($css, rex_path::addonAssets('mblock', implode('/', array('templates', $theme['theme_path'], pathinfo($css, PATHINFO_BASENAME))))); + rex_file::copy($css, rex_path::addonAssets('mblock', implode('/', ['templates', $theme['theme_path'], pathinfo($css, PATHINFO_BASENAME)]))); } } } } /** - * @param $theme * @return array * @author Joachim Doerr */ public static function getCssAssets($theme) { $themeInfo = self::getThemesInformation(); - $cssList = array(); + $cssList = []; if (array_key_exists($theme, $themeInfo) && array_key_exists('theme_css_assets', $themeInfo[$theme])) { foreach ($themeInfo[$theme]['theme_css_assets'] as $css) { $cssList[] = $css['path']; @@ -79,7 +78,6 @@ public static function getCssAssets($theme) } /** - * @param $theme * @author Joachim Doerr */ public static function themeBootCheck($theme) @@ -94,4 +92,4 @@ public static function themeBootCheck($theme) self::copyThemeCssToAssets(); } } -} \ No newline at end of file +} diff --git a/lib/yform/action/mblock_db_query.php b/lib/yform/action/mblock_db_query.php index 63e5d55..bcaa38c 100644 --- a/lib/yform/action/mblock_db_query.php +++ b/lib/yform/action/mblock_db_query.php @@ -7,7 +7,7 @@ public function executeAction(): void $query = trim($this->getElement(2)); $labels = explode(',', $this->getElement(3)); - if ($query == '') { + if ('' == $query) { if ($this->params['debug']) { echo 'ActionQuery Error: no query'; } diff --git a/pages/demo.demo_html.php b/pages/demo.demo_html.php index e3ddb87..55dfb41 100755 --- a/pages/demo.demo_html.php +++ b/pages/demo.demo_html.php @@ -8,7 +8,7 @@ // parse info fragment $fragment = new rex_fragment(); $fragment->setVar('title', rex_i18n::msg('mblock_info'), false); -$fragment->setVar('body', '

'.rex_i18n::msg('mblock_example_description_html').'

', false); +$fragment->setVar('body', '

' . rex_i18n::msg('mblock_example_description_html') . '

', false); echo $fragment->parse('core/page/section.php'); // parse info fragment diff --git a/pages/demo.demo_mform.php b/pages/demo.demo_mform.php index 776d5a7..ac9e368 100755 --- a/pages/demo.demo_mform.php +++ b/pages/demo.demo_mform.php @@ -8,7 +8,7 @@ // parse info fragment $fragment = new rex_fragment(); $fragment->setVar('title', rex_i18n::msg('mblock_info'), false); -$fragment->setVar('body', '

'.rex_i18n::msg('mblock_example_description_base').'

', false); +$fragment->setVar('body', '

' . rex_i18n::msg('mblock_example_description_base') . '

', false); echo $fragment->parse('core/page/section.php'); // parse info fragment diff --git a/pages/index.php b/pages/index.php index 2da759d..a9dfe0a 100755 --- a/pages/index.php +++ b/pages/index.php @@ -5,6 +5,6 @@ * @license MIT */ -echo rex_view::title(rex_i18n::msg('mblock_title') . ': ' . rex_i18n::msg('mblock_'.rex_be_controller::getCurrentPagePart(2))); +echo rex_view::title(rex_i18n::msg('mblock_title') . ': ' . rex_i18n::msg('mblock_' . rex_be_controller::getCurrentPagePart(2))); rex_be_controller::includeCurrentPageSubPath(); diff --git a/pages/info.php b/pages/info.php index 7fb29ec..6b2b6bf 100755 --- a/pages/info.php +++ b/pages/info.php @@ -5,6 +5,6 @@ * @license MIT */ -$headline = '

'. rex_i18n::msg('mblock_help_subheadline_1') .'

'; -$content = '

'. rex_i18n::msg('mblock_help_infotext_1') .'

-'. rex_i18n::msg('mblock_github') .''; +$headline = '

' . rex_i18n::msg('mblock_help_subheadline_1') . '

'; +$content = '

' . rex_i18n::msg('mblock_help_infotext_1') . '

+' . rex_i18n::msg('mblock_github') . ''; diff --git a/pages/overview.php b/pages/overview.php index 48ee3f4..8889063 100755 --- a/pages/overview.php +++ b/pages/overview.php @@ -6,26 +6,25 @@ */ // rex request -$config = rex_post('config', array( - array('mblock_theme', 'string'), - array('mblock_scroll', 'boolean'), - array('mblock_delete', 'boolean'), - array('mblock_delete_confirm', 'boolean'), - array('submit', 'boolean') -)); +$config = rex_post('config', [ + ['mblock_theme', 'string'], + ['mblock_scroll', 'boolean'], + ['mblock_delete', 'boolean'], + ['mblock_delete_confirm', 'boolean'], + ['submit', 'boolean'], +]); // include info page include rex_path::addon('mblock', 'pages/info.php'); -////////////////////////////////////////////////////////// +// //////////////////////////////////////////////////////// // parse info fragment $fragment = new rex_fragment(); $fragment->setVar('title', rex_i18n::msg('mblock_help_subheadline_1'), false); $fragment->setVar('body', $content, false); echo $fragment->parse('core/page/section.php'); - -////////////////////////////////////////////////////////// +// //////////////////////////////////////////////////////// // init form $form = ''; @@ -49,13 +48,13 @@ '; // set arrays -$formElements = array(); -$elements = array(); +$formElements = []; +$elements = []; $elements['label'] = ' '; // create select -$select = new rex_select; +$select = new rex_select(); $select->setId('rex-mblock-config-template'); $select->setSize(1); $select->setAttribute('class', 'form-control'); @@ -73,13 +72,13 @@ $form .= $fragment->parse('core/form/form.php'); // label -$formElements = array(); -$elements = array(); +$formElements = []; +$elements = []; $elements['label'] = ' '; // create select -$select = new rex_select; +$select = new rex_select(); $select->setId('rex-mblock-config-scroll-label'); $select->setSize(1); $select->setAttribute('class', 'form-control'); @@ -96,13 +95,13 @@ $form .= $fragment->parse('core/form/form.php'); // label -$formElements = array(); -$elements = array(); +$formElements = []; +$elements = []; $elements['label'] = ' '; // create select -$select = new rex_select; +$select = new rex_select(); $select->setId('rex-mblock-config-delete-confirm'); $select->setSize(1); $select->setAttribute('class', 'form-control'); @@ -118,10 +117,9 @@ $fragment->setVar('elements', $formElements, false); $form .= $fragment->parse('core/form/form.php'); - // create submit button -$formElements = array(); -$elements = array(); +$formElements = []; +$elements = []; $elements['field'] = ' '; @@ -138,10 +136,10 @@ '; -////////////////////////////////////////////////////////// +// //////////////////////////////////////////////////////// // parse form fragment $fragment = new rex_fragment(); $fragment->setVar('class', 'edit', false); $fragment->setVar('title', rex_i18n::msg('mblock_config')); $fragment->setVar('body', $form, false); -echo $fragment->parse('core/page/section.php'); \ No newline at end of file +echo $fragment->parse('core/page/section.php'); diff --git a/pages/rexform_demo.php b/pages/rexform_demo.php index 313b727..744f63b 100644 --- a/pages/rexform_demo.php +++ b/pages/rexform_demo.php @@ -3,31 +3,30 @@ // include info page include rex_path::addon('mblock', 'pages/info.php'); - $func = rex_request::request('func', 'string'); $id = rex_request::request('id', 'int'); -$start = rex_request::request('start', 'int', NULL); +$start = rex_request::request('start', 'int', null); $message = ''; -if ($func == '') { +if ('' == $func) { // create group and select by clang - $group = array(40); - $select = array('id'); + $group = [40]; + $select = ['id']; foreach (rex_clang::getAll() as $clang) { $group[] = '*'; $select[] = 'name_' . $clang->getId(); } // merge select with default - $select = array_merge($select, array('status')); + $select = array_merge($select, ['status']); // instance list - $list = rex_list::factory("SELECT * FROM ".rex::getTable('mblock_rexform_demo')." ORDER BY id"); + $list = rex_list::factory('SELECT * FROM ' . rex::getTable('mblock_rexform_demo') . ' ORDER BY id'); $list->addTableAttribute('class', 'table-striped'); // merge group with default - $group = array_merge($group, array(100, 200)); + $group = array_merge($group, [100, 200]); $list->addTableColumnGroup($group); @@ -35,13 +34,12 @@ $list->removeColumn('id'); // Column 1: Action (add/edit button) - $thIcon = ''; + $thIcon = ''; $tdIcon = ''; $list->addColumn($thIcon, $tdIcon, 0, ['###VALUE###', '###VALUE###']); $list->setColumnParams($thIcon, ['func' => 'edit', 'id' => '###id###']); - // show $content = $list->get(); $fragment = new rex_fragment(); @@ -49,12 +47,14 @@ $fragment->setVar('content', $message . $content, false); echo $fragment->parse('core/page/section.php'); -} elseif ($func == 'edit' || $func == 'add') { +} elseif ('edit' == $func || 'add' == $func) { $id = rex_request('id', 'int'); $form = mblock_rex_form::factory(rex::getTable('mblock_rexform_demo'), '', 'id=' . $id); $form->addParam('start', $start); - if ($func == 'edit') $form->addParam('id', $id); + if ('edit' == $func) { + $form->addParam('id', $id); + } // add text. $field = $form->addTextField('name'); @@ -71,13 +71,13 @@ $element2 = $nf->addTextField('mblock_field][attr_type][0][test2'); $element2->setLabel('Text 2'); - $form->addRawField(mblock::show(rex::getTable('mblock_rexform_demo').'::mblock_field::attr_type', $nf->getElements(), ['initial_hidden' => 1, 'min' => 0, 'initial_button_text' => 'Press [+] to create MBlock'])); + $form->addRawField(mblock::show(rex::getTable('mblock_rexform_demo') . '::mblock_field::attr_type', $nf->getElements(), ['initial_hidden' => 1, 'min' => 0, 'initial_button_text' => 'Press [+] to create MBlock'])); // show $content = $form->get(); $fragment = new rex_fragment(); $fragment->setVar('class', 'edit', false); - $fragment->setVar('title', ($func == 'edit') ? rex_i18n::msg('rex_form_mblock_demo_entries_edit') : rex_i18n::msg('rex_form_mblock_demo_entries_add')); + $fragment->setVar('title', ('edit' == $func) ? rex_i18n::msg('rex_form_mblock_demo_entries_edit') : rex_i18n::msg('rex_form_mblock_demo_entries_add')); $fragment->setVar('body', $content, false); echo $fragment->parse('core/page/section.php'); } diff --git a/tests/unit/mblock_test.php b/tests/unit/mblock_test.php index 9b538a6..bb3e03b 100644 --- a/tests/unit/mblock_test.php +++ b/tests/unit/mblock_test.php @@ -1,6 +1,5 @@
'; diff --git a/update.php b/update.php index ecb04fd..6b49b73 100644 --- a/update.php +++ b/update.php @@ -26,7 +26,6 @@ // copy assets rex_dir::copy($this->getPath('assets'), $this->getAssetsPath()); - // ensure demo table rex_sql_table::get(rex::getTable('mblock_rexform_demo')) ->ensureColumn(new rex_sql_column('id', 'int(11)', false, null, 'auto_increment')) @@ -40,18 +39,17 @@ ->setPrimaryKey('id') ->ensure(); - // rex media and link updater -$values = array(); +$values = []; -for ($i = 1; $i < 21; $i++) { +for ($i = 1; $i < 21; ++$i) { $values[] = " value{$i} = REPLACE(value{$i}, 'REX_INPUT_L', 'REX_L')"; $values[] = " value{$i} = REPLACE(value{$i}, 'REX_INPUT_M', 'REX_M')"; } $values = implode(",\n\t", $values); $prefix = rex::getTablePrefix(); -$query= "UPDATE\n\t {$prefix}article_slice \nSET\n\t{$values};\n"; +$query = "UPDATE\n\t {$prefix}article_slice \nSET\n\t{$values};\n"; $sql = rex_sql::factory(); $sql->setDebug(false); From cef2c2dc1362d92dca636235986435e771d65695 Mon Sep 17 00:00:00 2001 From: 36pixel Date: Sun, 24 Sep 2023 09:30:49 +0200 Subject: [PATCH 5/6] update scriptname --- .github/workflows/phpunit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index e4739d3..7ce41dd 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -80,4 +80,4 @@ jobs: # run unit tests, see composer.json - name: Run phpunit working-directory: redaxo_cms/redaxo/src/addons/${{ github.event.repository.name }} - run: composer test + run: composer unit-test From 925d0d5a64cdef7fcb47a8050398c94d08b4bc16 Mon Sep 17 00:00:00 2001 From: 36pixel Date: Tue, 26 Sep 2023 22:45:18 +0200 Subject: [PATCH 6/6] delete unneded stuff --- composer.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/composer.json b/composer.json index f209fb7..707ffc2 100755 --- a/composer.json +++ b/composer.json @@ -1,9 +1,4 @@ { - "name": "friendsofredaxo/mform", - "type": "redaxo-addon", - "extra": { - "installer-name": "mform" - }, "require-dev": { "redaxo/php-cs-fixer-config": "^2.0", "friendsofphp/php-cs-fixer": "^3.14",