From db8e29addc9bad5868400560a553f8b877930ac4 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 18 Aug 2023 01:02:30 +0200 Subject: [PATCH] Fix CS issues --- .gitignore | 1 + .phpcs.xml | 10 +- composer.json | 124 +- composer.lock | 1506 ++++++++++++++++- .../namespace.php | 24 +- inc/block-catalog/namespace.php | 33 +- inc/block-visibility/namespace.php | 46 +- inc/cbstdsys-post-subtitle/namespace.php | 24 +- inc/copyright-block/namespace.php | 61 +- inc/dinosaur-game/namespace.php | 41 +- inc/embed-block-for-github/namespace.php | 47 +- inc/ft-network-block-editor/namespace.php | 22 +- inc/ft-network-block-patterns/namespace.php | 22 +- inc/gallery-block-lightbox/namespace.php | 62 +- inc/icon-block/namespace.php | 24 +- .../class-isc-pro-admin.php | 11 + .../class.fake.ISC_Pro_Admin.php | 8 - inc/image-source-control-isc/namespace.php | 191 ++- inc/lang-attribute/namespace.php | 24 +- inc/markdown-comment-block/namespace.php | 33 +- inc/namespace.php | 43 +- inc/newspaper-columns/namespace.php | 46 +- inc/social-sharing-block/namespace.php | 24 +- inc/superlist-block/namespace.php | 45 +- inc/todo-block/namespace.php | 61 +- plugin.php | 4 +- 26 files changed, 2130 insertions(+), 407 deletions(-) create mode 100644 inc/image-source-control-isc/class-isc-pro-admin.php delete mode 100644 inc/image-source-control-isc/class.fake.ISC_Pro_Admin.php diff --git a/.gitignore b/.gitignore index 3791aed..2d61a48 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ Thumbs.db # when package is tested # and not running within ft-platform /wp-content/ +/wordpress/ diff --git a/.phpcs.xml b/.phpcs.xml index e571c0d..854d965 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,6 +1,6 @@ - - Coding standards for project_urlname + + Coding standards for ft-site-editing . @@ -15,17 +15,19 @@ and not running within ft-platform --> */wp-content/* + */wordpress/* - + - --> + diff --git a/composer.json b/composer.json index ac8eda3..c954d4b 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,16 @@ { "name": "figuren-theater/ft-site-editing", "description": "Packages to improve or extend the editing experience within the WordPress Site Editor (called Gutenberg for a long time) for all sites of the figuren.theater multisite network.", - "homepage": "https://websites.fuer.figuren.theater", - "type": "wordpress-muplugin", - "keywords": ["wordpress", "wordpress-muplugin", "site-editor", "blocks", "block-pattern", "gutenberg"], "license": "GPL-3.0-or-later", + "type": "wordpress-muplugin", + "keywords": [ + "wordpress", + "wordpress-muplugin", + "site-editor", + "blocks", + "block-pattern", + "gutenberg" + ], "authors": [ { "name": "figuren.theater", @@ -17,12 +23,64 @@ "role": "Developer" } ], + "homepage": "https://websites.fuer.figuren.theater", "support": { "email": "info@figuren.theater", "issues": "https://github.com/figuren-theater/ft-site-editing/issues", "source": "https://github.com/figuren-theater/ft-site-editing" }, + "require": { + "php": ">=7.2", + "carstingaxion/cbstdsys-post-subtitle": "0.1.1", + "figuren-theater/ft-network-block-editor": "*", + "figuren-theater/ft-network-block-patterns": "^1.0", + "figuren-theater/ft-options": "^1.1", + "wpackagist-plugin/abbreviation-button-for-the-block-editor": "^0.1", + "wpackagist-plugin/block-catalog": "^1.4", + "wpackagist-plugin/block-visibility": "^3", + "wpackagist-plugin/copyright-block": "^0.1", + "wpackagist-plugin/dinosaur-game": "^1.0", + "wpackagist-plugin/embed-block-for-github": "^0.3", + "wpackagist-plugin/gallery-block-lightbox": "^1.12", + "wpackagist-plugin/icon-block": "^1.4", + "wpackagist-plugin/image-source-control-isc": "^2", + "wpackagist-plugin/lang-attribute": "^0.3", + "wpackagist-plugin/markdown-comment-block": "^0.1", + "wpackagist-plugin/newspaper-columns": "^1.0", + "wpackagist-plugin/social-sharing-block": "^0.6", + "wpackagist-plugin/superlist-block": "^0.1", + "wpackagist-plugin/todo-block": "^1.0" + }, + "require-dev": { + "figuren-theater/code-quality": "^0.6.6", + "wpackagist-plugin/gutenberg": ">=15.2" + }, + "repositories": [ + { + "type": "git", + "url": "https://github.com/figuren-theater/ft-options" + }, + { + "type": "git", + "url": "https://github.com/figuren-theater/ft-network-block-editor" + }, + { + "type": "git", + "url": "https://github.com/figuren-theater/ft-network-block-patterns" + }, + { + "type": "git", + "url": "https://github.com/carstingaxion/cbstdsys-post-subtitle" + }, + { + "type": "composer", + "url": "https://wpackagist.org" + } + ], "autoload": { + "classmap": [ + "inc/" + ], "files": [ "inc/abbreviation-button-for-the-block-editor/namespace.php", "inc/block-catalog/namespace.php", @@ -43,54 +101,16 @@ "inc/superlist-block/namespace.php", "inc/todo-block/namespace.php", "inc/namespace.php" - ], - "classmap": [ - "inc/" ] }, - "repositories": [ - { - "type": "git", - "url": "https://github.com/figuren-theater/ft-options" - }, - { - "type": "git", - "url": "https://github.com/figuren-theater/ft-network-block-editor" - }, - { - "type": "git", - "url": "https://github.com/figuren-theater/ft-network-block-patterns" - }, - { - "type": "git", - "url": "https://github.com/carstingaxion/cbstdsys-post-subtitle" - }, - { - "type": "composer", - "url" : "https://wpackagist.org" + "config": { + "allow-plugins": { + "composer/installers": true, + "johnpbloch/wordpress-core-installer": true, + "phpstan/extension-installer": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "ergebnis/composer-normalize": true } - ], - "require": { - "php": ">=7.2", - "figuren-theater/ft-options": "^1.1", - "figuren-theater/ft-network-block-editor": "*", - "figuren-theater/ft-network-block-patterns": "^1.0", - "carstingaxion/cbstdsys-post-subtitle": "0.1.1", - "wpackagist-plugin/abbreviation-button-for-the-block-editor":"^0.1", - "wpackagist-plugin/block-catalog":"^1.4", - "wpackagist-plugin/block-visibility":"^3", - "wpackagist-plugin/copyright-block": "^0.1", - "wpackagist-plugin/dinosaur-game": "^1.0", - "wpackagist-plugin/embed-block-for-github":"^0.3", - "wpackagist-plugin/gallery-block-lightbox": "^1.12", - "wpackagist-plugin/icon-block":"^1.4", - "wpackagist-plugin/image-source-control-isc":"^2", - "wpackagist-plugin/lang-attribute":"^0.3", - "wpackagist-plugin/markdown-comment-block":"^0.1", - "wpackagist-plugin/newspaper-columns": "^1.0", - "wpackagist-plugin/social-sharing-block": "^0.6", - "wpackagist-plugin/superlist-block": "^0.1", - "wpackagist-plugin/todo-block": "^1.0" }, "extra": { "altis": { @@ -115,13 +135,5 @@ "wpackagist-plugin/todo-block" ] } - }, - "config": { - "allow-plugins": { - "composer/installers": true - } - }, - "require-dev": { - "wpackagist-plugin/gutenberg": ">=15.2" } } diff --git a/composer.lock b/composer.lock index b1048f2..c1b79ad 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "586bea35c02c6845e53f2035490e5ac2", + "content-hash": "7105458b6d774029879001b41b103423", "packages": [ { "name": "carstingaxion/cbstdsys-post-subtitle", @@ -789,6 +789,1510 @@ } ], "packages-dev": [ + { + "name": "automattic/vipwpcs", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/VIP-Coding-Standards.git", + "reference": "fc02f491dc9f51da7c32941ac579f70b9ed300c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/fc02f491dc9f51da7c32941ac579f70b9ed300c5", + "reference": "fc02f491dc9f51da7c32941ac579f70b9ed300c5", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "squizlabs/php_codesniffer": "^3.3.1", + "wp-coding-standards/wpcs": "^2.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5", + "phpcompatibility/php-compatibility": "^9", + "phpunit/phpunit": "^5 || ^6 || ^7" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/Automattic/VIP-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "support": { + "issues": "https://github.com/Automattic/VIP-Coding-Standards/issues", + "source": "https://github.com/Automattic/VIP-Coding-Standards", + "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki" + }, + "time": "2019-07-12T08:47:36+00:00" + }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2022-02-04T12:51:07+00:00" + }, + { + "name": "ergebnis/composer-normalize", + "version": "2.31.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "da1d18bcc2ca02111359c2c76fd938a907ba0a16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/da1d18bcc2ca02111359c2c76fd938a907ba0a16", + "reference": "da1d18bcc2ca02111359c2c76fd938a907ba0a16", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0.0", + "ergebnis/json": "^1.0.1", + "ergebnis/json-normalizer": "^4.1.0", + "ergebnis/json-printer": "^3.3.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "localheinz/diff": "^1.1.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "composer/composer": "^2.5.5", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "^5.5.2", + "fakerphp/faker": "^1.21.0", + "infection/infection": "~0.26.19", + "phpunit/phpunit": "^9.6.7", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.15.25", + "symfony/filesystem": "^6.0.13", + "vimeo/psalm": "^5.9.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + }, + "plugin-optional": true + }, + "autoload": { + "psr-4": { + "Ergebnis\\Composer\\Normalize\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a composer plugin for normalizing composer.json.", + "homepage": "https://github.com/ergebnis/composer-normalize", + "keywords": [ + "composer", + "normalize", + "normalizer", + "plugin" + ], + "support": { + "issues": "https://github.com/ergebnis/composer-normalize/issues", + "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/composer-normalize" + }, + "time": "2023-05-02T14:10:33+00:00" + }, + { + "name": "ergebnis/json", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json.git", + "reference": "d66ea30060856d0729a4aa319a02752519ca63a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json/zipball/d66ea30060856d0729a4aa319a02752519ca63a0", + "reference": "d66ea30060856d0729a4aa319a02752519ca63a0", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.29.0", + "ergebnis/data-provider": "^1.2.0", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "^5.0.0", + "ergebnis/phpstan-rules": "^1.0.0", + "fakerphp/faker": "^1.20.0", + "infection/infection": "~0.26.16", + "phpunit/phpunit": "^9.5.27", + "psalm/plugin-phpunit": "~0.18.4", + "vimeo/psalm": "^5.1.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a Json value object for representing a valid JSON string.", + "homepage": "https://github.com/ergebnis/json", + "keywords": [ + "json" + ], + "support": { + "issues": "https://github.com/ergebnis/json/issues", + "source": "https://github.com/ergebnis/json" + }, + "time": "2022-12-10T22:38:50+00:00" + }, + { + "name": "ergebnis/json-normalizer", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "e38f8b27f908686b200e3bd68e1b7bdfb5d53061" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/e38f8b27f908686b200e3bd68e1b7bdfb5d53061", + "reference": "e38f8b27f908686b200e3bd68e1b7bdfb5d53061", + "shasum": "" + }, + "require": { + "ergebnis/json": "^1.0.1", + "ergebnis/json-pointer": "^3.2.0", + "ergebnis/json-printer": "^3.3.0", + "ergebnis/json-schema-validator": "^4.0.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "composer/semver": "^3.2.1", + "ergebnis/data-provider": "^1.3.0", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "^5.5.2", + "fakerphp/faker": "^1.21.0", + "infection/infection": "~0.26.19", + "phpunit/phpunit": "^9.6.7", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.15.25", + "symfony/filesystem": "^6.0.19", + "symfony/finder": "^6.0.19", + "vimeo/psalm": "^5.9.0" + }, + "suggest": { + "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Normalizer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "homepage": "https://github.com/ergebnis/json-normalizer", + "keywords": [ + "json", + "normalizer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-normalizer/issues", + "source": "https://github.com/ergebnis/json-normalizer" + }, + "time": "2023-05-02T11:08:03+00:00" + }, + { + "name": "ergebnis/json-pointer", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-pointer.git", + "reference": "861516ff5afa1aa8905fdf3361315909523a1bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/861516ff5afa1aa8905fdf3361315909523a1bf8", + "reference": "861516ff5afa1aa8905fdf3361315909523a1bf8", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.28.3", + "ergebnis/data-provider": "^1.2.0", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "^5.0.0", + "fakerphp/faker": "^1.20.0", + "infection/infection": "~0.26.16", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "~0.18.3", + "vimeo/psalm": "^4.30" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Pointer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides JSON pointer as a value object.", + "homepage": "https://github.com/ergebnis/json-pointer", + "keywords": [ + "RFC6901", + "json", + "pointer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-pointer/issues", + "source": "https://github.com/ergebnis/json-pointer" + }, + "time": "2022-11-28T17:03:31+00:00" + }, + { + "name": "ergebnis/json-printer", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "18920367473b099633f644f0ca6dc8794345148f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/18920367473b099633f644f0ca6dc8794345148f", + "reference": "18920367473b099633f644f0ca6dc8794345148f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^8.0" + }, + "require-dev": { + "ergebnis/license": "^2.0.0", + "ergebnis/php-cs-fixer-config": "^4.11.0", + "fakerphp/faker": "^1.20.0", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "~0.18.3", + "vimeo/psalm": "^4.30.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Printer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON printer, allowing for flexible indentation.", + "homepage": "https://github.com/ergebnis/json-printer", + "keywords": [ + "formatter", + "json", + "printer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-printer/issues", + "source": "https://github.com/ergebnis/json-printer" + }, + "time": "2022-11-28T10:27:43+00:00" + }, + { + "name": "ergebnis/json-schema-validator", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-schema-validator.git", + "reference": "a6166272ac5691a9bc791f185841e5f92a6d4723" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/a6166272ac5691a9bc791f185841e5f92a6d4723", + "reference": "a6166272ac5691a9bc791f185841e5f92a6d4723", + "shasum": "" + }, + "require": { + "ergebnis/json": "^1.0.0", + "ergebnis/json-pointer": "^3.2.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "php": "^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.21.0", + "ergebnis/data-provider": "^1.2.0", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "~5.0.0", + "fakerphp/faker": "^1.20.0", + "infection/infection": "~0.26.16", + "phpunit/phpunit": "~9.5.27", + "psalm/plugin-phpunit": "~0.18.4", + "vimeo/psalm": "^5.1.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\SchemaValidator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", + "homepage": "https://github.com/ergebnis/json-schema-validator", + "keywords": [ + "json", + "schema", + "validator" + ], + "support": { + "issues": "https://github.com/ergebnis/json-schema-validator/issues", + "source": "https://github.com/ergebnis/json-schema-validator" + }, + "time": "2022-12-10T14:50:15+00:00" + }, + { + "name": "fig-r/psr2r-sniffer", + "version": "0.5.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig-rectified/psr2r-sniffer.git", + "reference": "7eb462bcf19abcae122855a6d79cc8f768c77880" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig-rectified/psr2r-sniffer/zipball/7eb462bcf19abcae122855a6d79cc8f768c77880", + "reference": "7eb462bcf19abcae122855a6d79cc8f768c77880", + "shasum": "" + }, + "require": { + "php": ">=5.4.16", + "squizlabs/php_codesniffer": "^3.0" + }, + "bin": [ + "bin/tokenize", + "bin/sniff" + ], + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "PSR2R\\": "PSR2R" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Scherer", + "homepage": "http://www.dereuromark.de", + "role": "Contributor" + } + ], + "description": "Code-Sniffer, Auto-Fixer and Tokenizer for PSR2-R", + "keywords": [ + "codesniffer", + "cs" + ], + "support": { + "issues": "https://github.com/php-fig-rectified/psr2r-sniffer/issues", + "source": "https://github.com/php-fig-rectified/psr2r-sniffer/tree/0.5.2" + }, + "time": "2019-07-30T11:13:07+00:00" + }, + { + "name": "figuren-theater/code-quality", + "version": "0.6.6", + "source": { + "type": "git", + "url": "https://github.com/figuren-theater/code-quality.git", + "reference": "e75a8e42841f7637ee5c4b69c0bd3c55a07a4fbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/figuren-theater/code-quality/zipball/e75a8e42841f7637ee5c4b69c0bd3c55a07a4fbc", + "reference": "e75a8e42841f7637ee5c4b69c0bd3c55a07a4fbc", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "ergebnis/composer-normalize": "^2", + "figuren-theater/coding-standards": "*", + "figuren-theater/phpstan": "*", + "phpstan/extension-installer": "^1.3" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "figuren.theater", + "email": "info@figuren.theater" + }, + { + "name": "Carsten Bach", + "email": "mail@carsten-bach.de", + "homepage": "https://carsten-bach.de", + "role": "Developer" + } + ], + "description": "Development tools to measure and test the code quality of figuren.theater, the WordPress Multisite network for puppeteers.", + "homepage": "https://websites.fuer.figuren.theater", + "keywords": [ + ".editorconfig", + "phpcs.xml", + "phpstan.neon", + "wordpress" + ], + "support": { + "email": "info@figuren.theater", + "issues": "https://github.com/figuren-theater/code-quality/issues", + "source": "https://github.com/figuren-theater/code-quality" + }, + "time": "2023-07-17T18:30:13+00:00" + }, + { + "name": "figuren-theater/coding-standards", + "version": "0.3.2", + "source": { + "type": "git", + "url": "https://github.com/figuren-theater/coding-standards.git", + "reference": "4a2e3ffd2b94b1e2d3aee35cccd9fa1eed84dbec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/figuren-theater/coding-standards/zipball/4a2e3ffd2b94b1e2d3aee35cccd9fa1eed84dbec", + "reference": "4a2e3ffd2b94b1e2d3aee35cccd9fa1eed84dbec", + "shasum": "" + }, + "require": { + "ergebnis/composer-normalize": "^2.31", + "humanmade/coding-standards": "^1.2" + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "figuren.theater", + "email": "info@figuren.theater" + }, + { + "name": "Carsten Bach", + "email": "mail@carsten-bach.de", + "homepage": "https://carsten-bach.de", + "role": "Developer" + } + ], + "description": "Coding standards for PHP, JavaScript and CSS within the figuren.theater WordPress Multisite network.", + "homepage": "https://websites.fuer.figuren.theater", + "keywords": [ + "WordPressVIPMinimum", + "coding-standards", + "wordpress", + "wpcs" + ], + "support": { + "email": "info@figuren.theater", + "issues": "https://github.com/figuren-theater/coding-standards/issues", + "source": "https://github.com/figuren-theater/coding-standards" + }, + "time": "2023-07-18T14:22:04+00:00" + }, + { + "name": "figuren-theater/phpstan", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/figuren-theater/phpstan.git", + "reference": "3aec3c760c830f185098280bf12fcec78701cb86" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/figuren-theater/phpstan/zipball/3aec3c760c830f185098280bf12fcec78701cb86", + "reference": "3aec3c760c830f185098280bf12fcec78701cb86", + "shasum": "" + }, + "require": { + "php-stubs/wordpress-globals": "^0.2.0", + "szepeviktor/phpstan-wordpress": "^1.3" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "figuren.theater", + "email": "info@figuren.theater" + }, + { + "name": "Carsten Bach", + "email": "mail@carsten-bach.de", + "homepage": "https://carsten-bach.de", + "role": "Developer" + } + ], + "description": "org-wide used phpstan.neon file for the WordPress Multisite network for puppeteers figuren.theater", + "homepage": "https://figuren.theater", + "keywords": [ + "wordpress" + ], + "support": { + "email": "info@figuren.theater", + "issues": "https://github.com/figuren-theater/phpstan/issues", + "source": "https://github.com/figuren-theater/phpstan" + }, + "time": "2023-06-26T21:48:02+00:00" + }, + { + "name": "humanmade/coding-standards", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/humanmade/coding-standards.git", + "reference": "4b5aca25cb350f248f1797beed100edda9f32a0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/humanmade/coding-standards/zipball/4b5aca25cb350f248f1797beed100edda9f32a0d", + "reference": "4b5aca25cb350f248f1797beed100edda9f32a0d", + "shasum": "" + }, + "require": { + "automattic/vipwpcs": "2.0.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "fig-r/psr2r-sniffer": "^0.5.0", + "php": ">=7.1", + "phpcompatibility/phpcompatibility-wp": "^2.0.0", + "squizlabs/php_codesniffer": "~3.5", + "wp-coding-standards/wpcs": "2.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^7" + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Human Made Coding Standards", + "support": { + "issues": "https://github.com/humanmade/coding-standards/issues", + "source": "https://github.com/humanmade/coding-standards/tree/v1.2.1" + }, + "time": "2022-09-14T09:35:02+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.12", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" + }, + "time": "2022-04-13T08:02:27+00:00" + }, + { + "name": "localheinz/diff", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/localheinz/diff.git", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "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": "Fork of sebastian/diff for use with ergebnis/composer-normalize", + "homepage": "https://github.com/localheinz/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "source": "https://github.com/localheinz/diff/tree/main" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-07-06T04:49:32+00:00" + }, + { + "name": "php-stubs/wordpress-globals", + "version": "v0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-globals.git", + "reference": "748a1fb2ae8fda94844bd0545935095dbf404b32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-globals/zipball/748a1fb2ae8fda94844bd0545935095dbf404b32", + "reference": "748a1fb2ae8fda94844bd0545935095dbf404b32", + "shasum": "" + }, + "require-dev": { + "php": "~7.1" + }, + "suggest": { + "php-stubs/wordpress-stubs": "Up-to-date WordPress function and class declaration stubs", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Global variables and global constants from WordPress core.", + "homepage": "https://github.com/php-stubs/wordpress-globals", + "keywords": [ + "PHPStan", + "constants", + "globals", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-globals/issues", + "source": "https://github.com/php-stubs/wordpress-globals/tree/master" + }, + "time": "2020-01-13T06:12:59+00:00" + }, + { + "name": "php-stubs/wordpress-stubs", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-stubs.git", + "reference": "adda7609e71d5f4dc7b87c74f8ec9e3437d2e92c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/adda7609e71d5f4dc7b87c74f8ec9e3437d2e92c", + "reference": "adda7609e71d5f4dc7b87c74f8ec9e3437d2e92c", + "shasum": "" + }, + "require-dev": { + "nikic/php-parser": "^4.13", + "php": "^7.4 || ~8.0.0", + "php-stubs/generator": "^0.8.3", + "phpdocumentor/reflection-docblock": "^5.3", + "phpstan/phpstan": "^1.10.12", + "phpunit/phpunit": "^9.5" + }, + "suggest": { + "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress function and class declaration stubs for static analysis.", + "homepage": "https://github.com/php-stubs/wordpress-stubs", + "keywords": [ + "PHPStan", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-stubs/issues", + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.3.0" + }, + "time": "2023-08-10T16:34:11+00:00" + }, + { + "name": "phpcompatibility/php-compatibility", + "version": "9.3.5", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" + }, + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "homepage": "https://github.com/wimg", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + } + ], + "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "keywords": [ + "compatibility", + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibility" + }, + "time": "2019-12-27T09:44:58+00:00" + }, + { + "name": "phpcompatibility/phpcompatibility-paragonie", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", + "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "shasum": "" + }, + "require": { + "phpcompatibility/php-compatibility": "^9.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "paragonie/random_compat": "dev-master", + "paragonie/sodium_compat": "dev-master" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "lead" + } + ], + "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", + "homepage": "http://phpcompatibility.com/", + "keywords": [ + "compatibility", + "paragonie", + "phpcs", + "polyfill", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" + }, + "time": "2022-10-25T01:46:02+00:00" + }, + { + "name": "phpcompatibility/phpcompatibility-wp", + "version": "2.1.4", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "shasum": "" + }, + "require": { + "phpcompatibility/php-compatibility": "^9.0", + "phpcompatibility/phpcompatibility-paragonie": "^1.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "lead" + } + ], + "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", + "homepage": "http://phpcompatibility.com/", + "keywords": [ + "compatibility", + "phpcs", + "standards", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" + }, + "time": "2022-10-24T09:00:36+00:00" + }, + { + "name": "phpstan/extension-installer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.3.1" + }, + "time": "2023-05-24T08:59:17+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.10.29", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1", + "reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2023-08-14T13:24:11+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.7.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2023-02-22T23:07:41+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "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 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "szepeviktor/phpstan-wordpress", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/szepeviktor/phpstan-wordpress.git", + "reference": "5b5cc77ed51fdaf64efe3f00b5aae4b709d2cfa9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/5b5cc77ed51fdaf64efe3f00b5aae4b709d2cfa9", + "reference": "5b5cc77ed51fdaf64efe3f00b5aae4b709d2cfa9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", + "phpstan/phpstan": "^1.10.0", + "symfony/polyfill-php73": "^1.12.0" + }, + "require-dev": { + "composer/composer": "^2.1.14", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpstan/phpstan-strict-rules": "^1.2", + "phpunit/phpunit": "^8.0 || ^9.0", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.8" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "SzepeViktor\\PHPStan\\WordPress\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress extensions for PHPStan", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.0" + }, + "time": "2023-04-23T06:15:06+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "7da1894633f168fe244afc6de00d141f27517b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", + "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.3.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "phpcompatibility/php-compatibility": "^9.0", + "phpcsstandards/phpcsdevtools": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "time": "2020-05-13T23:57:56+00:00" + }, { "name": "wpackagist-plugin/gutenberg", "version": "15.8.1", diff --git a/inc/abbreviation-button-for-the-block-editor/namespace.php b/inc/abbreviation-button-for-the-block-editor/namespace.php index 65e5b39..18934c0 100644 --- a/inc/abbreviation-button-for-the-block-editor/namespace.php +++ b/inc/abbreviation-button-for-the-block-editor/namespace.php @@ -2,7 +2,7 @@ /** * Figuren_Theater Site_Editing Abbreviation_Button_For_The_Block_Editor. * - * @package figuren-theater/site_editing/abbreviation_button_for_the_block_editor + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Abbreviation_Button_For_The_Block_Editor; @@ -15,25 +15,33 @@ use function is_user_admin; const BASENAME = 'abbreviation-button-for-the-block-editor/abbreviation-button-for-the-block-editor.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { // Do only load in "normal" admin view // Not for: // - public views // - network-admin views - // - user-admin views - if ( ! is_admin() || is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( ! is_admin() || is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant } diff --git a/inc/block-catalog/namespace.php b/inc/block-catalog/namespace.php index 5592702..616fc01 100644 --- a/inc/block-catalog/namespace.php +++ b/inc/block-catalog/namespace.php @@ -2,45 +2,52 @@ /** * Figuren_Theater Site_Editing Block_Catalog. * - * @package figuren-theater/site_editing/block_catalog + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Block_Catalog; -use FT_VENDOR_DIR; - use Figuren_Theater; -use function Figuren_Theater\get_config; +use FT_VENDOR_DIR; use function add_action; use function is_admin; use function is_network_admin; use function is_user_admin; const BASENAME = 'block-catalog/block-catalog.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { $config = Figuren_Theater\get_config()['modules']['site_editing']; - if ( ! $config['block-catalog'] ) - return; // early + if ( ! $config['block-catalog'] ) { + return; + } // Do only load in "normal" admin view // Not for: // - public views // - network-admin views - // - user-admin views - if ( ! is_admin() || is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( ! is_admin() || is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant } diff --git a/inc/block-visibility/namespace.php b/inc/block-visibility/namespace.php index 9a6b73d..9883b0a 100644 --- a/inc/block-visibility/namespace.php +++ b/inc/block-visibility/namespace.php @@ -2,16 +2,14 @@ /** * Figuren_Theater Site_Editing Block_Visibility. * - * @package figuren-theater/site_editing/block_visibility + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Block_Visibility; -use FT_VENDOR_DIR; - use Figuren_Theater; -use function Figuren_Theater\get_config; +use FT_VENDOR_DIR; use function add_action; use function current_user_can; use function is_network_admin; @@ -19,39 +17,51 @@ use function remove_action; const BASENAME = 'block-visibility/block-visibility.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'plugins_loaded', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { $config = Figuren_Theater\get_config()['modules']['site_editing']; - if ( ! $config['block-visibility'] ) - return; // early + if ( ! $config['block-visibility'] ) { + return; + } // Do only load in "normal" admin view // and public views // Not for: // - network-admin views - // - user-admin views - if ( is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; - - // 'plugins_loaded' is too early for 'current_user_can()' - // add_action( 'plugins_loaded', __NAMESPACE__ . '\\post_load_plugin', 11 ); - add_action( 'admin_menu', __NAMESPACE__ . '\\post_load_plugin', 0 ); + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant + add_action( 'admin_menu', __NAMESPACE__ . '\\remove_menu', 0 ); } -function post_load_plugin() { +/** + * Show the admin-menu, only: + * - to super-administrators + * + * @return void + */ +function remove_menu() :void { if ( current_user_can( 'manage_sites' ) ) { return; } diff --git a/inc/cbstdsys-post-subtitle/namespace.php b/inc/cbstdsys-post-subtitle/namespace.php index ce798f3..c5e3d93 100644 --- a/inc/cbstdsys-post-subtitle/namespace.php +++ b/inc/cbstdsys-post-subtitle/namespace.php @@ -2,7 +2,7 @@ /** * Figuren_Theater Site_Editing Cbstdsys_Post_Subtitle. * - * @package figuren-theater/site_editing/cbstdsys_post_subtitle + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Cbstdsys_Post_Subtitle; @@ -14,25 +14,33 @@ use function is_user_admin; const BASENAME = 'cbstdsys-post-subtitle/cbstdsys-post-subtitle.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/carstingaxion/' . BASENAME; +const PLUGINPATH = '/carstingaxion/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'plugins_loaded', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { // Do only load in "normal" admin view // and public views. // Not for: // - network-admin views - // - user-admin views - if ( is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant } diff --git a/inc/copyright-block/namespace.php b/inc/copyright-block/namespace.php index 532bf6a..a2d6582 100644 --- a/inc/copyright-block/namespace.php +++ b/inc/copyright-block/namespace.php @@ -2,65 +2,84 @@ /** * Figuren_Theater Site_Editing Copyright_Block. * - * @package figuren-theater/site_editing/copyright_block + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Copyright_Block; -use FT_VENDOR_DIR; - use Figuren_Theater; -use function Figuren_Theater\get_config; +use FT_VENDOR_DIR; use function add_action; use function add_filter; use function is_network_admin; use function is_user_admin; const BASENAME = 'copyright-block/copyright-block.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; -const BLOCKTYPE = 'mkaz/copyright-block'; +const BLOCKTYPE = 'mkaz/copyright-block'; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { $config = Figuren_Theater\get_config()['modules']['site_editing']; - if ( ! $config['copyright-block'] ) - return; // early + if ( ! $config['copyright-block'] ) { + return; + } // Do only load in "normal" admin view // and for public views // Not for: // - network-admin views - // - user-admin views - if ( is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant add_filter( 'register_block_type_args', __NAMESPACE__ . '\\modify_block_args', 10, 2 ); } +/** + * Attach a custom render function for the existing 'copyright-block'. + * + * @param array $args Normal block.json arguments. + * @param string $block_type Slug of the block being filtered. + * + * @return array + */ +function modify_block_args( array $args, string $block_type ) :array { - -function modify_block_args( array $args, string $block_type ) : array { - - if ( BLOCKTYPE !== $block_type ) + if ( BLOCKTYPE !== $block_type ) { return $args; + } $args['render_callback'] = __NAMESPACE__ . '\\modify_block_output'; return $args; } -function modify_block_output() : string { - $year = date('Y'); - return "© " . $year; +/** + * Return a copyright mark followed by the current year. + * + * @return string + */ +function modify_block_output() :string { + $year = date( 'Y' ); + return '© ' . $year; } diff --git a/inc/dinosaur-game/namespace.php b/inc/dinosaur-game/namespace.php index 179a2e7..95e7b22 100644 --- a/inc/dinosaur-game/namespace.php +++ b/inc/dinosaur-game/namespace.php @@ -2,50 +2,63 @@ /** * Figuren_Theater Site_Editing Dinosaur_Game. * - * @package figuren-theater/site_editing/dinosaur_game + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Dinosaur_Game; -use FT_VENDOR_DIR; - use Figuren_Theater; -use function Figuren_Theater\get_config; +use FT_VENDOR_DIR; use function add_action; use function is_network_admin; use function is_user_admin; const BASENAME = 'dinosaur-game/dinosaur-game.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { $config = Figuren_Theater\get_config()['modules']['site_editing']; - if ( ! $config['dinosaur-game'] ) - return; // early + if ( ! $config['dinosaur-game'] ) { + return; + } // Do only load in "normal" admin view // and for public views // Not for: // - network-admin views - // - user-admin views - if ( is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\remove_scripts', 0 ); } -function remove_scripts() { +/** + * Prevent the enqueueing of any dino-related CSS & JS, + * if the current request is not resulting in error 404. + * + * @return void + */ +function remove_scripts() :void { is_404() || remove_action( 'wp_enqueue_scripts', 'dinogame_js_css' ); } diff --git a/inc/embed-block-for-github/namespace.php b/inc/embed-block-for-github/namespace.php index e8fb72f..a3a4b66 100644 --- a/inc/embed-block-for-github/namespace.php +++ b/inc/embed-block-for-github/namespace.php @@ -2,58 +2,69 @@ /** * Figuren_Theater Site_Editing Embed_Block_For_Github. * - * @package figuren-theater/site_editing/embed_block_for_github + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Embed_Block_For_Github; -use FT_VENDOR_DIR; - use Figuren_Theater; -use function Figuren_Theater\get_config; +use Figuren_Theater\Site_Editing; +use FT_VENDOR_DIR; use function add_action; -use function is_admin; use function is_network_admin; use function is_user_admin; const BASENAME = 'embed-block-for-github/embed-block-for-github.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { $config = Figuren_Theater\get_config()['modules']['site_editing']; - if ( ! $config['embed-block-for-github'] ) - return; // early + if ( ! $config['embed-block-for-github'] ) { + return; + } // Do only load in "normal" admin view // and public views // Not for: // - network-admin views - // - user-admin views - if ( is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant add_action( 'after_setup_theme', __NAMESPACE__ . '\\enqueue_css_fix' ); } - -function enqueue_css_fix() { +/** + * Enqueue minimal CSS fix + * + * @return void + */ +function enqueue_css_fix() :void { // Same args used for wp_enqueue_style(). - $args = array( + $args = [ 'handle' => 'ebg-repository', 'src' => Site_Editing\ASSETS_URL . 'embed-block-for-github/fix.css', - ); + ]; // Add "path" to allow inlining asset if the theme opts-in. $args['path'] = Site_Editing\DIRECTORY . 'assets/embed-block-for-github/fix.css'; diff --git a/inc/ft-network-block-editor/namespace.php b/inc/ft-network-block-editor/namespace.php index c72598c..1e6a4ec 100644 --- a/inc/ft-network-block-editor/namespace.php +++ b/inc/ft-network-block-editor/namespace.php @@ -2,7 +2,7 @@ /** * Figuren_Theater Site_Editing FT_Network_Block_Editor. * - * @package figuren-theater/site_editing/ft_network_block_editor + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\FT_Network_Block_Editor; @@ -14,25 +14,33 @@ use function is_user_admin; const BASENAME = 'ft-network-block-editor/ft-network-block-editor.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/figuren-theater/' . BASENAME; +const PLUGINPATH = '/figuren-theater/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ function bootstrap() { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { // Do only load in "normal" admin view // Not for: // - public views // - network-admin views - // - user-admin views - if ( is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant } diff --git a/inc/ft-network-block-patterns/namespace.php b/inc/ft-network-block-patterns/namespace.php index cbe089c..24ddcce 100644 --- a/inc/ft-network-block-patterns/namespace.php +++ b/inc/ft-network-block-patterns/namespace.php @@ -2,7 +2,7 @@ /** * Figuren_Theater Site_Editing FT_Network_Block_Patterns. * - * @package figuren-theater/site_editing/ft_network_block_patterns + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\FT_Network_Block_Patterns; @@ -14,25 +14,33 @@ use function is_user_admin; const BASENAME = 'ft-network-block-patterns/ft-network-block-patterns.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/figuren-theater/' . BASENAME; +const PLUGINPATH = '/figuren-theater/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ function bootstrap() { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { // Do only load in "normal" admin view // Not for: // - public views // - network-admin views - // - user-admin views - if ( is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant } diff --git a/inc/gallery-block-lightbox/namespace.php b/inc/gallery-block-lightbox/namespace.php index da6c354..b6a0ec2 100644 --- a/inc/gallery-block-lightbox/namespace.php +++ b/inc/gallery-block-lightbox/namespace.php @@ -2,70 +2,72 @@ /** * Figuren_Theater Site_Editing Gallery_Block_Lightbox. * - * @package figuren-theater/site_editing\gallery_block_lightbox + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Gallery_Block_Lightbox; -use FT_VENDOR_DIR; - use Figuren_Theater; -use function Figuren_Theater\get_config; +use FT_VENDOR_DIR; use function add_action; use function add_filter; const BASENAME = 'gallery-block-lightbox/gallery-block-lightbox.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'plugins_loaded', __NAMESPACE__ . '\\load_plugin' ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { $config = Figuren_Theater\get_config()['modules']['site_editing']; - if ( ! $config['gallery-block-lightbox'] ) - return; // early - - require_once PLUGINPATH; - - add_filter('baguettebox_enqueue_assets', __NAMESPACE__ . '\\enqueue_assets' ); - // add_filter( 'baguettebox_selector', __NAMESPACE__ . '\\selector' ); - // add_filter( 'baguettebox_filter', __NAMESPACE__ . '\\filter' ); + if ( ! $config['gallery-block-lightbox'] ) { + return; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant + + add_filter( 'baguettebox_enqueue_assets', __NAMESPACE__ . '\\enqueue_assets' ); + /** + * Additional available filters: + * + * @example add_filter( 'baguettebox_selector', __NAMESPACE__ . '\\selector' ); + * @example add_filter( 'baguettebox_filter', __NAMESPACE__ . '\\filter' ); + */ } - /** * Filters whether baguettebox assets have to be enqueued. * * @since Plugin 1.11 * - * - * * @package project_name * @version version * @author Carsten Bach * - * @param bool $value Whether baguettebox assets have to be enqueued. - * + * @param bool $should_load_scripts Whether baguettebox assets have to be enqueued. + * * @return bool [description] */ -function enqueue_assets( bool $should_load_scripts ) : bool { +function enqueue_assets( bool $should_load_scripts ) :bool { return ( \has_block( 'core/gallery' ) || \has_block( 'core/image' ) || \has_block( 'core/media-text' ) || - \get_post_gallery() - // has_block( 'coblocks/gallery-masonry' ) || - // has_block( 'coblocks/gallery-stacked' ) || - // has_block( 'coblocks/gallery-collage' ) || - // has_block( 'coblocks/gallery-offset' ) || - // has_block( 'coblocks/gallery-stacked' ) + \get_post_gallery() ); } @@ -74,13 +76,12 @@ function enqueue_assets( bool $should_load_scripts ) : bool { * * @since Plugin 1.10.0 * - * * @package project_name * @version version * @author Carsten Bach * * @param string $value The CSS selector to a gallery (or galleries) containing a tags - * + * * @return string [description] function selector( string $css_selectors ) : string { @@ -102,13 +103,12 @@ function selector( string $css_selectors ) : string { * * @since Plugin 1.10.0 * - * * @package project_name * @version version * @author Carsten Bach * * @param string $value The RegExp Pattern to match image files. Applied to the a.href attribute - * + * * @return string [description] function filter( string $reg_exp ) : string { diff --git a/inc/icon-block/namespace.php b/inc/icon-block/namespace.php index ffd8759..d5b1bd3 100644 --- a/inc/icon-block/namespace.php +++ b/inc/icon-block/namespace.php @@ -2,7 +2,7 @@ /** * Figuren_Theater Site_Editing Icon_Block. * - * @package figuren-theater/site_editing/icon_block + * @package figuren-theater/ft-site-editing */ namespace Figuren_Theater\Site_Editing\Icon_Block; @@ -14,25 +14,33 @@ use function is_user_admin; const BASENAME = 'icon-block/icon-block.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap() :void { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 9 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin() :void { // Do only load in "normal" admin view // and public views // Not for: // - network-admin views - // - user-admin views - if ( is_network_admin() || is_user_admin() ) + // - user-admin views. + if ( is_network_admin() || is_user_admin() ) { return; - - require_once PLUGINPATH; + } + + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant } diff --git a/inc/image-source-control-isc/class-isc-pro-admin.php b/inc/image-source-control-isc/class-isc-pro-admin.php new file mode 100644 index 0000000..5d13404 --- /dev/null +++ b/inc/image-source-control-isc/class-isc-pro-admin.php @@ -0,0 +1,11 @@ + [ - // 0 => 'list', - ], + 'display_type' => [], 'list_on_archives' => false, 'list_on_excerpts' => false, 'image_list_headline' => false, - 'version' => '', // will be re-set after ENABLE // prevents auto-updates of this options-field + 'version' => '', // Will be re-set after ENABLE // prevents auto-updates of this options-field. 'thumbnail_in_list' => false, 'thumbnail_size' => 'thumbnail', - 'thumbnail_width' => 150, // will be re-set after ENABLE - 'thumbnail_height' => 150, // will be re-set after ENABLE - // 'warning_onesource_missing' will be changed by Feature 'advanced-isc' + 'thumbnail_width' => 150, // Will be re-set after ENABLE. + 'thumbnail_height' => 150, // Will be re-set after ENABLE. + + // 'warning_onesource_missing' will be changed by Feature 'advanced-isc'. 'warning_onesource_missing' => false, + 'remove_on_uninstall' => false, 'hide_list' => false, 'caption_position' => 'bottom-right', - 'caption_style' => true, // remove markup and css - 'source_pretext' => '', // will be re-set after ENABLE + 'caption_style' => true, // Remove markup and CSS. + 'source_pretext' => '', // Will be re-set after ENABLE. 'enable_licences' => true, + // 'licences' will be changed by Feature 'advanced-isc' 'licences' => 'All Rights Reserved Public Domain Mark 1.0|https://creativecommons.org/publicdomain/mark/1.0/ @@ -110,16 +122,19 @@ function filter_options() { CC BY-NC 4.0 International|https://creativecommons.org/licenses/by-nc/4.0/ CC BY-NC-SA 4.0 International|https://creativecommons.org/licenses/by-nc-sa/4.0/ CC BY-NC-ND 4.0 International|https://creativecommons.org/licenses/by-nc-nd/4.0/', + 'list_included_images' => '', 'overlay_included_images' => '', 'enable_log' => false, 'standard_source' => 'custom_text', - 'standard_source_text' => '', // will be re-set after ENABLE + 'standard_source_text' => '', // Will be re-set after ENABLE. ]; - // gets added to the 'OptionsCollection' - // from within itself on creation + /* + * Gets added to the 'OptionsCollection' + * from within itself on creation. + */ new Options\Option( 'isc_options', $_options, @@ -128,35 +143,38 @@ function filter_options() { } /** - * [re_set_dynamic_options description] + * Re-set (the more) dynamic options. * - * @package [package] - * @since 2.10 - * - * @param array|bool $option [description] could be false on WP_INSTALLING - * @return [type] [description] + * @param array|bool $option [description] could be false on WP_INSTALLING + * @return array [description] */ -function re_set_dynamic_options( array|bool $option ) : array { +function re_set_dynamic_options( array|bool $option ) :array { $option = ( is_array( $option ) ) ? $option : []; $_blogname = get_option( 'blogname' ); - // $_has_multiple_authors = ( !\Figuren_Theater\FT::site()->has_feature(['einsamer-wolf']) ) ? true : ''; - // $_permalink_structure = \Figuren_Theater\API::get('Options')->get( 'permalink_structure' ); - - // prevents auto-updates of this options-field; - $option['version'] = ISCVERSION; + // prevents auto-updates of this options-field. + $option['version'] = ISCVERSION; $option['standard_source_text'] = '© ' . $_blogname; - // $option['image_list_headline'] = __('Image Sources','image-source-control-isc'); + // Why is the standard for option 'image_list_headline' disabled ? I dont know ... + // $option['image_list_headline'] = __('Image Sources','image-source-control-isc'); // ??? $option['source_pretext'] = __( 'Source:', 'image-source-control-isc' ); - $option['thumbnail_width'] = get_option( 'thumbnail_size_w', 150 ); - $option['thumbnail_height'] = get_option( 'thumbnail_size_h', 150 ); - + $option['thumbnail_width'] = get_option( 'thumbnail_size_w', 150 ); + $option['thumbnail_height'] = get_option( 'thumbnail_size_h', 150 ); + return $option; } -function remove_attachment_fields( array $fields, WP_POST $attachment ) : array { +/** + * Filters the attachment fields to edit. + * + * @param string[] $fields An array of attachment form fields. + * @param WP_Post $attachment The WP_Post attachment object. + * + * @return string[] + */ +function remove_attachment_fields( array $fields, WP_Post $attachment ) :array { unset( $fields['isc_image_source_pro'] ); return $fields; } @@ -165,7 +183,7 @@ function remove_attachment_fields( array $fields, WP_POST $attachment ) : array * Fake a 'table'-block to load its styles. * * Normally this filters the output created by a shortcode callback. - * + * * @uses https://developer.wordpress.org/reference/hooks/do_shortcode_tag/ * * @package figuren-theater/site_editing/image_source_control_isc @@ -173,34 +191,49 @@ function remove_attachment_fields( array $fields, WP_POST $attachment ) : array * @param string $output Shortcode output. * @param string $tag Shortcode name. * @param string|array $attr Shortcode attributes array or empty string. - * + * * @return string Totally unchanged Shortcode output. */ -function load_block_table_styles( string $output, string $tag, array|string $attr ) : string { - // make sure it is the right shortcode - if ( 'isc_list_all' !== $tag) +function load_block_table_styles( string $output, string $tag, array|string $attr ) :string { + // Make sure it is the right shortcode. + if ( 'isc_list_all' !== $tag ) { return $output; + } - - // this triggers the loading of 'table-block' - // related scripts and styles + // This triggers the loading of 'table-block's + // related scripts and styles. do_blocks( '' ); - __enqueue_css_fix(); + enqueue_css_fix(); return $output; } -function remove_notices() : void { - // CLEAN UP +/** + * CLEAN UP branded stuff by removing another annoying admin-notice ! + * + * @return void + */ +function remove_notices() :void { remove_action( 'admin_notices', [ ISC_Admin::get_instance(), 'branded_admin_header' ] ); } -function remove_menu() : void { +/** + * Remove the plugins admin-menu. + * + * @return void + */ +function remove_menu() :void { remove_submenu_page( 'options-general.php', 'isc-settings' ); } -function remove_part_of_sources() { +/** + * Remove "Additional Images" from "Sources" Page, + * because it was reduced to just a big ad. + * + * @return void + */ +function remove_part_of_sources() :void { ?>