summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-05-08 21:03:29 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-05-08 21:03:29 +0200
commit7d17f220e52d683f849a1854278a9bd47af17dd2 (patch)
tree3fed3ff2c6ab28c397a929a02e56d238ca40ed6d
parentee9bef751805ac3f3c9572d1620f2221092b3094 (diff)
parent30f12e61317d9b181efb46382a4db98d73f65954 (diff)
downloadgigologadmin-7d17f220e52d683f849a1854278a9bd47af17dd2.tar.gz
gigologadmin-7d17f220e52d683f849a1854278a9bd47af17dd2.tar.bz2
gigologadmin-7d17f220e52d683f849a1854278a9bd47af17dd2.zip
Merge branch 'psalm' into dev
This brings another tool in to help us keep the code in order - Psalm. (I thought the name was fitting! :) This will do fairly simple static analysis of the code, and report problems and suggest fixes. It can help fix some issues itself, but please double check that it does the right thing. More info: https://psalm.dev This merge also brings in fixes that was suggested by Paslm. Mostly this is typa annotations for functions, but also some bugfixes discovered by the tool.
-rw-r--r--composer.json4
-rw-r--r--composer.lock2127
-rw-r--r--generate-sample-gig-data.php62
-rw-r--r--giglogadmin.php20
-rw-r--r--includes/admin/helpfiles/instr_photog.php2
-rw-r--r--includes/admin/helpfiles/instr_reviewers.php2
-rw-r--r--includes/admin/helpfiles/instrunctions.php2
-rw-r--r--includes/admin/register_db_tables.php5
-rw-r--r--includes/admin/views/giglog_admin_page.php32
-rw-r--r--includes/admin/views/giglog_import_gigs.php10
-rw-r--r--includes/band.php11
-rw-r--r--includes/concert.php7
-rw-r--r--includes/concertlogs.php4
-rw-r--r--includes/public/shortcodes/giglog_bands.php4
-rw-r--r--includes/public/shortcodes/giglog_display_unprocessed.php6
-rw-r--r--includes/public/shortcodes/giglog_photographers.php16
-rw-r--r--includes/public/shortcodes/giglog_process_files.php2
-rw-r--r--includes/venue.php22
18 files changed, 2274 insertions, 64 deletions
diff --git a/composer.json b/composer.json
index 83619c6..65b7e58 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,9 @@
}
],
"require-dev": {
- "wp-phpunit/wp-phpunit": "^5.7"
+ "wp-phpunit/wp-phpunit": "^5.7",
+ "vimeo/psalm": "^4.7",
+ "humanmade/psalm-plugin-wordpress": "^2.0"
},
"scripts": {
"test": "npm run wp-env run phpunit 'phpunit -c /var/www/html/wp-content/plugins/giglogadmin/phpunit.xml'"
diff --git a/composer.lock b/composer.lock
index 72d332c..9a24a89 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,10 +4,2135 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "29fc239b9db613932cc95a9291af4da1",
+ "content-hash": "da8593c79fc71116e3079512611bb8ec",
"packages": [],
"packages-dev": [
{
+ "name": "amphp/amp",
+ "version": "v2.5.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/amp.git",
+ "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9",
+ "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "dev-master",
+ "amphp/phpunit-util": "^1",
+ "ext-json": "*",
+ "jetbrains/phpstorm-stubs": "^2019.3",
+ "phpunit/phpunit": "^6.0.9 | ^7",
+ "psalm/phar": "^3.11@dev",
+ "react/promise": "^2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Amp\\": "lib"
+ },
+ "files": [
+ "lib/functions.php",
+ "lib/Internal/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Daniel Lowrey",
+ "email": "rdlowrey@php.net"
+ },
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Bob Weinand",
+ "email": "bobwei9@hotmail.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "A non-blocking concurrency framework for PHP applications.",
+ "homepage": "http://amphp.org/amp",
+ "keywords": [
+ "async",
+ "asynchronous",
+ "awaitable",
+ "concurrency",
+ "event",
+ "event-loop",
+ "future",
+ "non-blocking",
+ "promise"
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/amphp",
+ "issues": "https://github.com/amphp/amp/issues",
+ "source": "https://github.com/amphp/amp/tree/v2.5.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2021-01-10T17:06:37+00:00"
+ },
+ {
+ "name": "amphp/byte-stream",
+ "version": "v1.8.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/byte-stream.git",
+ "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd",
+ "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^2",
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "dev-master",
+ "amphp/phpunit-util": "^1.4",
+ "friendsofphp/php-cs-fixer": "^2.3",
+ "jetbrains/phpstorm-stubs": "^2019.3",
+ "phpunit/phpunit": "^6 || ^7 || ^8",
+ "psalm/phar": "^3.11.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Amp\\ByteStream\\": "lib"
+ },
+ "files": [
+ "lib/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "A stream abstraction to make working with non-blocking I/O simple.",
+ "homepage": "http://amphp.org/byte-stream",
+ "keywords": [
+ "amp",
+ "amphp",
+ "async",
+ "io",
+ "non-blocking",
+ "stream"
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/amphp",
+ "issues": "https://github.com/amphp/byte-stream/issues",
+ "source": "https://github.com/amphp/byte-stream/tree/v1.8.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2021-03-30T17:13:30+00:00"
+ },
+ {
+ "name": "composer/package-versions-deprecated",
+ "version": "1.11.99.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/package-versions-deprecated.git",
+ "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
+ "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.1.0 || ^2.0",
+ "php": "^7 || ^8"
+ },
+ "replace": {
+ "ocramius/package-versions": "1.11.99"
+ },
+ "require-dev": {
+ "composer/composer": "^1.9.3 || ^2.0@dev",
+ "ext-zip": "^1.13",
+ "phpunit/phpunit": "^6.5 || ^7"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "PackageVersions\\Installer",
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PackageVersions\\": "src/PackageVersions"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be"
+ }
+ ],
+ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
+ "support": {
+ "issues": "https://github.com/composer/package-versions-deprecated/issues",
+ "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1"
+ },
+ "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": "2020-11-11T10:22:58+00:00"
+ },
+ {
+ "name": "composer/semver",
+ "version": "3.2.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464",
+ "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.54",
+ "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": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/semver/issues",
+ "source": "https://github.com/composer/semver/tree/3.2.4"
+ },
+ "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": "2020-11-13T08:59:24+00:00"
+ },
+ {
+ "name": "composer/xdebug-handler",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/xdebug-handler.git",
+ "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/31d57697eb1971712a08031cfaff5a846d10bdf5",
+ "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0",
+ "psr/log": "^1.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.55",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "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/2.0.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": "2021-04-09T19:40:06+00:00"
+ },
+ {
+ "name": "dnoegel/php-xdg-base-dir",
+ "version": "v0.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/dnoegel/php-xdg-base-dir.git",
+ "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
+ "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "XdgBaseDir\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "implementation of xdg base directory specification for php",
+ "support": {
+ "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues",
+ "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1"
+ },
+ "time": "2019-12-04T15:06:13+00:00"
+ },
+ {
+ "name": "felixfbecker/advanced-json-rpc",
+ "version": "v3.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
+ "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e",
+ "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e",
+ "shasum": ""
+ },
+ "require": {
+ "netresearch/jsonmapper": "^1.0 || ^2.0",
+ "php": "^7.1 || ^8.0",
+ "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^7.0 || ^8.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "AdvancedJsonRpc\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "ISC"
+ ],
+ "authors": [
+ {
+ "name": "Felix Becker",
+ "email": "felix.b@outlook.com"
+ }
+ ],
+ "description": "A more advanced JSONRPC implementation",
+ "support": {
+ "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues",
+ "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0"
+ },
+ "time": "2021-01-10T17:48:47+00:00"
+ },
+ {
+ "name": "felixfbecker/language-server-protocol",
+ "version": "1.5.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/felixfbecker/php-language-server-protocol.git",
+ "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730",
+ "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "*",
+ "squizlabs/php_codesniffer": "^3.1",
+ "vimeo/psalm": "^4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "LanguageServerProtocol\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "ISC"
+ ],
+ "authors": [
+ {
+ "name": "Felix Becker",
+ "email": "felix.b@outlook.com"
+ }
+ ],
+ "description": "PHP classes for the Language Server Protocol",
+ "keywords": [
+ "language",
+ "microsoft",
+ "php",
+ "server"
+ ],
+ "support": {
+ "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues",
+ "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1"
+ },
+ "time": "2021-02-22T14:02:09+00:00"
+ },
+ {
+ "name": "humanmade/psalm-plugin-wordpress",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/humanmade/psalm-plugin-wordpress.git",
+ "reference": "c15b5d5159ef879f0707c33cc9a3fe993618edd1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/humanmade/psalm-plugin-wordpress/zipball/c15b5d5159ef879f0707c33cc9a3fe993618edd1",
+ "reference": "c15b5d5159ef879f0707c33cc9a3fe993618edd1",
+ "shasum": ""
+ },
+ "require": {
+ "johnbillion/wp-hooks": "^0.4.4",
+ "php-stubs/wordpress-stubs": "^5.5",
+ "vimeo/psalm": "^4"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.0"
+ },
+ "type": "psalm-plugin",
+ "extra": {
+ "psalm": {
+ "pluginClass": "PsalmWordPress\\Plugin"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PsalmWordPress\\": [
+ "."
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Joe Hoyle",
+ "email": "joehoyle@gmail.com"
+ }
+ ],
+ "description": "WordPress stubs and plugin for Psalm.",
+ "support": {
+ "issues": "https://github.com/humanmade/psalm-plugin-wordpress/issues",
+ "source": "https://github.com/humanmade/psalm-plugin-wordpress/tree/2.0.4"
+ },
+ "time": "2021-03-10T12:17:03+00:00"
+ },
+ {
+ "name": "johnbillion/wp-hooks",
+ "version": "0.4.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/johnbillion/wp-hooks.git",
+ "reference": "eb9d32917bb5a0a10a3fc9bedbb3f509f885b769"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/johnbillion/wp-hooks/zipball/eb9d32917bb5a0a10a3fc9bedbb3f509f885b769",
+ "reference": "eb9d32917bb5a0a10a3fc9bedbb3f509f885b769",
+ "shasum": ""
+ },
+ "require-dev": {
+ "johnbillion/wp-hooks-generator": "~0.5.0",
+ "oomphinc/composer-installers-extender": "^1.1",
+ "roots/wordpress": "dev-nightly"
+ },
+ "type": "library",
+ "extra": {
+ "wordpress-install-dir": "vendor/wordpress/wordpress",
+ "wp-hooks": {
+ "ignore-files": [
+ "wp-admin/includes/deprecated.php",
+ "wp-admin/includes/ms-deprecated.php",
+ "wp-content/",
+ "wp-includes/deprecated.php",
+ "wp-includes/ID3/",
+ "wp-includes/IXR/",
+ "wp-includes/ms-deprecated.php",
+ "wp-includes/pomo/",
+ "wp-includes/random_compat/",
+ "wp-includes/Requests/",
+ "wp-includes/SimplePie/",
+ "wp-includes/sodium_compat/",
+ "wp-includes/Text/"
+ ],
+ "ignore-hooks": [
+ "load-categories.php",
+ "load-edit-link-categories.php",
+ "load-edit-tags.php",
+ "load-page-new.php",
+ "load-page.php",
+ "option_enable_xmlrpc",
+ "pre_option_enable_xmlrpc",
+ "{$tag}"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "John Blackbourn",
+ "homepage": "https://johnblackbourn.com/"
+ }
+ ],
+ "description": "All the actions and filters from WordPress core in machine-readable JSON format.",
+ "support": {
+ "issues": "https://github.com/johnbillion/wp-hooks/issues",
+ "source": "https://github.com/johnbillion/wp-hooks/tree/0.4.4"
+ },
+ "time": "2020-08-29T20:58:28+00:00"
+ },
+ {
+ "name": "netresearch/jsonmapper",
+ "version": "v2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/cweiske/jsonmapper.git",
+ "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e",
+ "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "ext-pcre": "*",
+ "ext-reflection": "*",
+ "ext-spl": "*",
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0",
+ "squizlabs/php_codesniffer": "~3.5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "JsonMapper": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "OSL-3.0"
+ ],
+ "authors": [
+ {
+ "name": "Christian Weiske",
+ "email": "cweiske@cweiske.de",
+ "homepage": "http://github.com/cweiske/jsonmapper/",
+ "role": "Developer"
+ }
+ ],
+ "description": "Map nested JSON structures onto PHP classes",
+ "support": {
+ "email": "cweiske@cweiske.de",
+ "issues": "https://github.com/cweiske/jsonmapper/issues",
+ "source": "https://github.com/cweiske/jsonmapper/tree/master"
+ },
+ "time": "2020-04-16T18:48:43+00:00"
+ },
+ {
+ "name": "nikic/php-parser",
+ "version": "v4.10.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f",
+ "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f",
+ "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.10.5"
+ },
+ "time": "2021-05-03T19:11:20+00:00"
+ },
+ {
+ "name": "openlss/lib-array2xml",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nullivex/lib-array2xml.git",
+ "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
+ "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "LSS": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Bryan Tong",
+ "email": "bryan@nullivex.com",
+ "homepage": "https://www.nullivex.com"
+ },
+ {
+ "name": "Tony Butler",
+ "email": "spudz76@gmail.com",
+ "homepage": "https://www.nullivex.com"
+ }
+ ],
+ "description": "Array2XML conversion library credit to lalit.org",
+ "homepage": "https://www.nullivex.com",
+ "keywords": [
+ "array",
+ "array conversion",
+ "xml",
+ "xml conversion"
+ ],
+ "support": {
+ "issues": "https://github.com/nullivex/lib-array2xml/issues",
+ "source": "https://github.com/nullivex/lib-array2xml/tree/master"
+ },
+ "time": "2019-03-29T20:06:56+00:00"
+ },
+ {
+ "name": "php-stubs/wordpress-stubs",
+ "version": "v5.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-stubs/wordpress-stubs.git",
+ "reference": "69baf30e7c92f149526da950a68222af05f7bc67"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/69baf30e7c92f149526da950a68222af05f7bc67",
+ "reference": "69baf30e7c92f149526da950a68222af05f7bc67",
+ "shasum": ""
+ },
+ "replace": {
+ "giacocorsiglia/wordpress-stubs": "*"
+ },
+ "require-dev": {
+ "giacocorsiglia/stubs-generator": "^0.5.0",
+ "php": "~7.1"
+ },
+ "suggest": {
+ "paragonie/sodium_compat": "Pure PHP implementation of libsodium",
+ "symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "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/v5.7.0"
+ },
+ "time": "2021-03-10T10:29:23+00:00"
+ },
+ {
+ "name": "phpdocumentor/reflection-common",
+ "version": "2.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-2.x": "2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jaap van Otterdijk",
+ "email": "opensource@ijaap.nl"
+ }
+ ],
+ "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
+ "homepage": "http://www.phpdoc.org",
+ "keywords": [
+ "FQSEN",
+ "phpDocumentor",
+ "phpdoc",
+ "reflection",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
+ },
+ "time": "2020-06-27T09:03:43+00:00"
+ },
+ {
+ "name": "phpdocumentor/reflection-docblock",
+ "version": "5.2.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
+ "shasum": ""
+ },
+ "require": {
+ "ext-filter": "*",
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.2",
+ "phpdocumentor/type-resolver": "^1.3",
+ "webmozart/assert": "^1.9.1"
+ },
+ "require-dev": {
+ "mockery/mockery": "~1.3.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "me@mikevanriel.com"
+ },
+ {
+ "name": "Jaap van Otterdijk",
+ "email": "account@ijaap.nl"
+ }
+ ],
+ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
+ },
+ "time": "2020-09-03T19:13:55+00:00"
+ },
+ {
+ "name": "phpdocumentor/type-resolver",
+ "version": "1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/TypeResolver.git",
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.0"
+ },
+ "require-dev": {
+ "ext-tokenizer": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-1.x": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "me@mikevanriel.com"
+ }
+ ],
+ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
+ },
+ "time": "2020-09-17T18:55:26+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
+ "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "type": "library",
+ "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/1.1.1"
+ },
+ "time": "2021-03-05T17:36:06+00:00"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.1.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "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/1.1.4"
+ },
+ "time": "2021-05-03T11:20:27+00:00"
+ },
+ {
+ "name": "sebastian/diff",
+ "version": "4.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/diff.git",
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "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.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:10:38+00:00"
+ },
+ {
+ "name": "symfony/console",
+ "version": "v5.2.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/console.git",
+ "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/console/zipball/90374b8ed059325b49a29b55b3f8bb4062c87629",
+ "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.8",
+ "symfony/polyfill-php80": "^1.15",
+ "symfony/service-contracts": "^1.1|^2",
+ "symfony/string": "^5.1"
+ },
+ "conflict": {
+ "symfony/dependency-injection": "<4.4",
+ "symfony/dotenv": "<5.1",
+ "symfony/event-dispatcher": "<4.4",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<4.4"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0"
+ },
+ "require-dev": {
+ "psr/log": "~1.0",
+ "symfony/config": "^4.4|^5.0",
+ "symfony/dependency-injection": "^4.4|^5.0",
+ "symfony/event-dispatcher": "^4.4|^5.0",
+ "symfony/lock": "^4.4|^5.0",
+ "symfony/process": "^4.4|^5.0",
+ "symfony/var-dumper": "^4.4|^5.0"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/lock": "",
+ "symfony/process": ""
+ },
+ "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/v5.2.7"
+ },
+ "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": "2021-04-19T14:07:32+00:00"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.22.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "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.22.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": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.22.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170",
+ "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ },
+ "files": [
+ "bootstrap.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": "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.22.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": "2021-01-22T09:19:47+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.22.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248",
+ "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "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.22.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": "2021-01-22T09:19:47+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.22.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
+ "reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.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": "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.22.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": "2021-01-22T09:19:47+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "v1.22.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
+ "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "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.22.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": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.22.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91",
+ "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "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.22.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": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "v2.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
+ "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.1"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.4-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "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/v2.4.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": "2021-04-01T10:43:52+00:00"
+ },
+ {
+ "name": "symfony/string",
+ "version": "v5.2.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/string.git",
+ "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/string/zipball/ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572",
+ "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "~1.15"
+ },
+ "require-dev": {
+ "symfony/error-handler": "^4.4|^5.0",
+ "symfony/http-client": "^4.4|^5.0",
+ "symfony/translation-contracts": "^1.1|^2",
+ "symfony/var-exporter": "^4.4|^5.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\String\\": ""
+ },
+ "files": [
+ "Resources/functions.php"
+ ],
+ "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/v5.2.6"
+ },
+ "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": "2021-03-17T17:12:15+00:00"
+ },
+ {
+ "name": "vimeo/psalm",
+ "version": "4.7.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/vimeo/psalm.git",
+ "reference": "83a0325c0a95c0ab531d6b90c877068b464377b5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/vimeo/psalm/zipball/83a0325c0a95c0ab531d6b90c877068b464377b5",
+ "reference": "83a0325c0a95c0ab531d6b90c877068b464377b5",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^2.4.2",
+ "amphp/byte-stream": "^1.5",
+ "composer/package-versions-deprecated": "^1.8.0",
+ "composer/semver": "^1.4 || ^2.0 || ^3.0",
+ "composer/xdebug-handler": "^1.1 || ^2.0",
+ "dnoegel/php-xdg-base-dir": "^0.1.1",
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "felixfbecker/advanced-json-rpc": "^3.0.3",
+ "felixfbecker/language-server-protocol": "^1.5",
+ "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
+ "nikic/php-parser": "^4.10.1",
+ "openlss/lib-array2xml": "^1.0",
+ "php": "^7.1|^8",
+ "sebastian/diff": "^3.0 || ^4.0",
+ "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
+ "webmozart/path-util": "^2.3"
+ },
+ "provide": {
+ "psalm/psalm": "self.version"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.2",
+ "brianium/paratest": "^4.0||^6.0",
+ "ext-curl": "*",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpdocumentor/reflection-docblock": "^5",
+ "phpmyadmin/sql-parser": "5.1.0||dev-master",
+ "phpspec/prophecy": ">=1.9.0",
+ "phpunit/phpunit": "^9.0",
+ "psalm/plugin-phpunit": "^0.13",
+ "slevomat/coding-standard": "^6.3.11",
+ "squizlabs/php_codesniffer": "^3.5",
+ "symfony/process": "^4.3",
+ "weirdan/phpunit-appveyor-reporter": "^1.0.0",
+ "weirdan/prophecy-shim": "^1.0 || ^2.0"
+ },
+ "suggest": {
+ "ext-igbinary": "^2.0.5"
+ },
+ "bin": [
+ "psalm",
+ "psalm-language-server",
+ "psalm-plugin",
+ "psalm-refactor",
+ "psalter"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev",
+ "dev-3.x": "3.x-dev",
+ "dev-2.x": "2.x-dev",
+ "dev-1.x": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psalm\\": "src/Psalm/"
+ },
+ "files": [
+ "src/functions.php",
+ "src/spl_object_id.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matthew Brown"
+ }
+ ],
+ "description": "A static analysis tool for finding errors in PHP applications",
+ "keywords": [
+ "code",
+ "inspection",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/vimeo/psalm/issues",
+ "source": "https://github.com/vimeo/psalm/tree/4.7.2"
+ },
+ "time": "2021-05-01T20:56:25+00:00"
+ },
+ {
+ "name": "webmozart/assert",
+ "version": "1.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozarts/assert.git",
+ "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
+ "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "conflict": {
+ "phpstan/phpstan": "<0.12.20",
+ "vimeo/psalm": "<4.6.1 || 4.6.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.5.13"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.10-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\Assert\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "Assertions to validate method input/output with nice error messages.",
+ "keywords": [
+ "assert",
+ "check",
+ "validate"
+ ],
+ "support": {
+ "issues": "https://github.com/webmozarts/assert/issues",
+ "source": "https://github.com/webmozarts/assert/tree/1.10.0"
+ },
+ "time": "2021-03-09T10:59:23+00:00"
+ },
+ {
+ "name": "webmozart/path-util",
+ "version": "2.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/path-util.git",
+ "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725",
+ "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "webmozart/assert": "~1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6",
+ "sebastian/version": "^1.0.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\PathUtil\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.",
+ "support": {
+ "issues": "https://github.com/webmozart/path-util/issues",
+ "source": "https://github.com/webmozart/path-util/tree/2.3.0"
+ },
+ "time": "2015-12-17T08:42:14+00:00"
+ },
+ {
"name": "wp-phpunit/wp-phpunit",
"version": "5.7.0",
"source": {
diff --git a/generate-sample-gig-data.php b/generate-sample-gig-data.php
index 26ba0cf..11e9a0a 100644
--- a/generate-sample-gig-data.php
+++ b/generate-sample-gig-data.php
@@ -7,9 +7,9 @@
abstract class GeneratorBase
{
- abstract public function get();
+ abstract public function get() : string;
- function pick($arr)
+ function pick(array $arr) : string
{
return $arr[array_rand($arr)];
}
@@ -17,13 +17,23 @@ abstract class GeneratorBase
class BandNameGenerator extends GeneratorBase
{
- private $prefixes = array(
+ /**
+ * @var string[]
+ *
+ * @psalm-var array{0: string, 1: string, 2: string}
+ */
+ private array $prefixes = array(
"",
"a",
"the",
);
- private $adverbs = array(
+ /**
+ * @var string[]
+ *
+ * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string, 7: string}
+ */
+ private array $adverbs = array(
"bestial",
"dead",
"incongruent",
@@ -34,7 +44,12 @@ class BandNameGenerator extends GeneratorBase
"flamboyant",
);
- private $verbs = array(
+ /**
+ * @var string[]
+ *
+ * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string}
+ */
+ private array $verbs = array(
"kill",
"regurgitat",
"destroy",
@@ -44,14 +59,19 @@ class BandNameGenerator extends GeneratorBase
"mutilat",
);
- private $endings = array(
+ /**
+ * @var string[]
+ *
+ * @psalm-var array{0: string, 1: string, 2: string, 3: string}
+ */
+ private array $endings = array(
"er",
"ers",
"ing",
"ed",
);
- public function get()
+ public function get() : string
{
$parts = array(
$this->pick($this->prefixes),
@@ -64,7 +84,12 @@ class BandNameGenerator extends GeneratorBase
class VenueGenerator extends GeneratorBase
{
- private $prefix1 = array(
+ /**
+ * @var string[]
+ *
+ * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string}
+ */
+ private array $prefix1 = array(
"",
"royal",
"shabby",
@@ -72,7 +97,12 @@ class VenueGenerator extends GeneratorBase
"drunken",
);
- private $prefix2 = array(
+ /**
+ * @var string[]
+ *
+ * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string}
+ */
+ private array $prefix2 = array(
"",
"music",
"fiddler",
@@ -81,7 +111,12 @@ class VenueGenerator extends GeneratorBase
"mental",
);
- private $type = array(
+ /**
+ * @var string[]
+ *
+ * @psalm-var array{0: string, 1: string, 2: string, 3: string, 4: string, 5: string, 6: string}
+ */
+ private array $type = array(
"hall",
"museum",
"asylum",
@@ -91,7 +126,7 @@ class VenueGenerator extends GeneratorBase
"lighthouse"
);
- public function get()
+ public function get() : string
{
$parts = array(
$this->pick($this->prefix1),
@@ -104,7 +139,10 @@ class VenueGenerator extends GeneratorBase
class LinkGenerator extends GeneratorBase
{
- public function get()
+ /**
+ * @return string
+ */
+ public function get() : string
{
return 'https://example.com/' . bin2hex(random_bytes(8));
}
diff --git a/giglogadmin.php b/giglogadmin.php
index 0e8b399..c8ae9b0 100644
--- a/giglogadmin.php
+++ b/giglogadmin.php
@@ -36,7 +36,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
class GiglogAdmin_Plugin
{
- static public function init() {
+ static public function init(): void {
add_shortcode('giglog_cities', 'giglogadmin_getfilters');
add_shortcode('giglog_bands', 'giglogadmin_getconcerts');
add_shortcode('giglog_unprocessed', 'giglogadmin_display_unprocessed');
@@ -49,18 +49,20 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
add_filter( 'wp_nav_menu_args', array( 'GiglogAdmin_Plugin', 'nav_menu_args' ));
}
- static function activate() {
+ static function activate(): void {
require_once __DIR__ . '/includes/admin/register_db_tables.php';
}
- static function deactivate() {
+ static function deactivate(): void {
}
/**
* Adds the 'Giglog' top level menu to the left side WordPress admin
* menu. Other subpages will come later.
+ *
+ * @return void
*/
- static function add_admin_pages() {
+ static function add_admin_pages(): void {
$top = add_menu_page(
"Giglog admin", // Page title
"Giglog", // Menu title
@@ -80,13 +82,17 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
"giglog_import", // menu slug
array( 'GiglogAdmin_ImportGigsPage', 'render_html' )); // callable
- add_action( 'load-' . $import_hook, array( 'GiglogAdmin_ImportGigsPage', 'submit_form' ) );
+ if ($import_hook !== false) {
+ add_action(
+ 'load-' . $import_hook,
+ array( 'GiglogAdmin_ImportGigsPage', 'submit_form' ) );
+ }
wp_register_style( 'css_style', plugins_url( '/includes/css/main.css', __FILE__ ) );
wp_enqueue_style('css_style');
}
- static function add_help_pages() {
+ static function add_help_pages(): void {
add_menu_page(
"Help for ET users", // Page title
"Help for ET users", // Menu title
@@ -119,7 +125,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
* Giglog admin pages should only be visible for logged in users/can eventually
* be customized by role if needed
*/
- static function nav_menu_args( $args = '' ) {
+ static function nav_menu_args( array $args = [] ) : array {
if ( is_user_logged_in() ) {
$args['menu'] = 'Loggedusers';
} else {
diff --git a/includes/admin/helpfiles/instr_photog.php b/includes/admin/helpfiles/instr_photog.php
index 0750557..f661c5f 100644
--- a/includes/admin/helpfiles/instr_photog.php
+++ b/includes/admin/helpfiles/instr_photog.php
@@ -13,7 +13,7 @@ if ( !class_exists( 'Instructions_Photogs' ) ) {
- static function render_instr_photo_html() {
+ static function render_instr_photo_html(): void {
diff --git a/includes/admin/helpfiles/instr_reviewers.php b/includes/admin/helpfiles/instr_reviewers.php
index e00a432..3632980 100644
--- a/includes/admin/helpfiles/instr_reviewers.php
+++ b/includes/admin/helpfiles/instr_reviewers.php
@@ -9,7 +9,7 @@ if ( !class_exists( 'Instructions_Reviewers' ) ) {
class Instructions_Reviewers {
- static function render_instr_rev_html() {
+ static function render_instr_rev_html(): void {
?>
diff --git a/includes/admin/helpfiles/instrunctions.php b/includes/admin/helpfiles/instrunctions.php
index 49b77fe..b9c4d89 100644
--- a/includes/admin/helpfiles/instrunctions.php
+++ b/includes/admin/helpfiles/instrunctions.php
@@ -9,7 +9,7 @@ if ( !class_exists( 'Instructions_Page' ) ) {
class Instructions_Page {
- static function render_instr_html() {
+ static function render_instr_html(): void {
?>
diff --git a/includes/admin/register_db_tables.php b/includes/admin/register_db_tables.php
index 947be22..11223b3 100644
--- a/includes/admin/register_db_tables.php
+++ b/includes/admin/register_db_tables.php
@@ -5,7 +5,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
if (!function_exists('giglogadmin_populate_countries')) {
- function giglogadmin_populate_countries()
+ function giglogadmin_populate_countries(): void
{
global $wpdb;
$wpdb->query(
@@ -254,6 +254,9 @@ if (!function_exists('giglogadmin_populate_countries')) {
if ( !function_exists( "giglog_register_db_tables") )
{
+ /**
+ * @return void
+ */
function giglog_register_db_tables()
{
$db_version = get_option('giglogadmin_db_version');
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php
index 72a34eb..624566f 100644
--- a/includes/admin/views/giglog_admin_page.php
+++ b/includes/admin/views/giglog_admin_page.php
@@ -9,7 +9,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
require_once __DIR__ . '/../../venue.php';
class GiglogAdmin_AdminPage {
- static function render_html() {
+ static function render_html(): void {
?>
<div class="wrap">
<h1>Giglog Admin</h1>
@@ -36,7 +36,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
echo(GiglogAdmin_AdminPage::editforms()); //not sure why it doesn't show without the echo?
}
- static function get_allvenues($invenue)
+ static function get_allvenues( ?int $invenue ): string
{
$select = '<select name="selectvenueadmin">';
$select .= '<option value="">Please Select..</option>';
@@ -50,7 +50,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
}
- static function get_user($cid, $ctype)
+ static function get_user( ?int $cid, string $ctype): string
{
$hf_user = wp_get_current_user();
$hf_username = $hf_user->user_login;
@@ -75,7 +75,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
}
- static function get_filters()
+ static function get_filters(): string
{
$cities = array_merge(["ALL"], GiglogAdmin_Venue::all_cities());
$selected_city =
@@ -107,7 +107,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
$select .= '<select name="selectvenue">';
- foreach ( $venues AS $venue ) {
+ foreach ( $venue_list as $venue ) {
$select .= '<option value="' . $venue[0] . '"' . selected($venue, $selected_venue) . '>';
$select .= $venue[1] . '</option>';
}
@@ -124,7 +124,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
return $select;
}
- static function editforms()
+ static function editforms(): string
{
$cid = filter_input(INPUT_POST, "cid");
$editing = filter_input(INPUT_POST, "edit") == "EDIT";
@@ -167,7 +167,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
return $content;
}
- static function adminactions($concert_id)
+ static function adminactions( int $concert_id ) : string
{
global $wpdb;
$query = "SELECT id,wpgs_name from wpg_pressstatus" ;
@@ -192,7 +192,10 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
}
//function to calculate if the concert has been added in the past 10 days or before that and show a green NEW for the newest rows
- static function getpublishstatus($concert_id)
+ /**
+ * @return null|string
+ */
+ static function getpublishstatus(int $concert_id)
{
global $wpdb;
$date1 = new DateTime("now");
@@ -209,11 +212,11 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
}
- static function get_concerts()
+ static function get_concerts(): string
{
$hf_user = wp_get_current_user();
$hf_username = $hf_user->user_login;
- $roles = ( array ) $hf_user->roles;
+ $roles = $hf_user->roles;
global $wpdb;
$content = '<table class="assignit">';
@@ -292,6 +295,9 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
}
+ /**
+ * @return void
+ */
static function update()
{
global $wpdb;
@@ -371,7 +377,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
}
}
- static function assignconcert($p1, $c)
+ static function assignconcert($p1, $c): void
{
global $wpdb;
@@ -392,7 +398,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
wp_mail( $to, $subject, $body, $headers );
}
- static function unassignconcert($p1, $c)
+ static function unassignconcert($p1, $c): void
{
global $wpdb;
@@ -413,7 +419,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
wp_mail( $to, $subject, $body, $headers );
}
- static function returnuser($p1, $c)
+ static function returnuser(string $p1, ?int $c): string
{
global $wpdb;
$hf_user = wp_get_current_user();
diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php
index 053f505..0e7406f 100644
--- a/includes/admin/views/giglog_import_gigs.php
+++ b/includes/admin/views/giglog_import_gigs.php
@@ -12,7 +12,7 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
require_once __DIR__ . '/../../venue.php';
class GiglogAdmin_ImportGigsPage {
- static function render_html() {
+ static function render_html(): void {
?>
<div class="wrap">
<h1>Import gigs</h1>
@@ -27,7 +27,7 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
<?php
}
- static function submit_form() {
+ static function submit_form(): void {
if ('POST' === $_SERVER['REQUEST_METHOD'] && current_user_can('upload_files') && !empty($_FILES['giglog_import_file']['tmp_name'])) {
$nonce = $_POST['giglog_import_nonce'];
$valid_nonce = isset($nonce) && wp_verify_nonce($nonce);
@@ -48,8 +48,12 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
* 5. Event info link
*
* Empty lines are ignored.
+ *
+ * @return void
+ *
+ * @param ArrayAccess|array $file
*/
- static function process_upload($file) {
+ static function process_upload(array $file): void {
$newconcert= [];
$fo = new SplFileObject($file['tmp_name']);
diff --git a/includes/band.php b/includes/band.php
index 14daa18..3460acb 100644
--- a/includes/band.php
+++ b/includes/band.php
@@ -25,7 +25,7 @@ if ( !class_exists('GiglogAdmin_Band') ) {
$this->country = isset($attrs->wpgband_country) ? $attrs->wpgband_country : 'NO';
}
- static function create($bandname, $country = 'NO')
+ static function create($bandname, $country = 'NO'): self
{
$band = GiglogAdmin_Band::find($bandname, $country);
@@ -46,7 +46,7 @@ if ( !class_exists('GiglogAdmin_Band') ) {
return $band;
}
- static function find($name, $country)
+ static function find($name, $country): ?self
{
global $wpdb;
@@ -83,6 +83,11 @@ if ( !class_exists('GiglogAdmin_Band') ) {
return ($results);
}
+ /**
+ * @return array|string
+ *
+ * @psalm-return array{0: mixed, 1: mixed}|string
+ */
static function get_band($bid)
{
global $wpdb;
@@ -116,7 +121,7 @@ if ( !class_exists('GiglogAdmin_Band') ) {
return ($wpdb->last_error);
}
- public function save()
+ public function save(): void
{
global $wpdb;
diff --git a/includes/concert.php b/includes/concert.php
index d95934e..5c17933 100644
--- a/includes/concert.php
+++ b/includes/concert.php
@@ -32,6 +32,9 @@ if ( !class_exists('GiglogAdmin_Concert') ) {
}
+ /**
+ * @return null|self
+ */
static function find_cid($id)
{
global $wpdb;
@@ -51,7 +54,7 @@ if ( !class_exists('GiglogAdmin_Concert') ) {
}
}
- public static function create($name, $venue, $date, $ticketlink, $eventlink)
+ public static function create(string $name, $venue, string $date, string $ticketlink, string $eventlink): ?self
{
if ( GiglogAdmin_Concert::find($name, $venue, $date) ) {
error_log( 'DUPLICATE ROW detected: '
@@ -155,7 +158,7 @@ if ( !class_exists('GiglogAdmin_Concert') ) {
return $wpdb->get_results($sql);
}
- public function save()
+ public function save(): void
{
global $wpdb;
diff --git a/includes/concertlogs.php b/includes/concertlogs.php
index 409a454..3b8083a 100644
--- a/includes/concertlogs.php
+++ b/includes/concertlogs.php
@@ -12,8 +12,10 @@ if ( !class_exists( 'GiglogAdmin_Concertlogs' ) )
/**
* Adds a default entry for the given concert id in the
* concert logs table.
+ *
+ * @return void
*/
- public static function add($concert_id)
+ public static function add($concert_id): void
{
global $wpdb;
diff --git a/includes/public/shortcodes/giglog_bands.php b/includes/public/shortcodes/giglog_bands.php
index 78fd72b..e4fe71d 100644
--- a/includes/public/shortcodes/giglog_bands.php
+++ b/includes/public/shortcodes/giglog_bands.php
@@ -10,7 +10,7 @@
* builds the table with concerts
*/
-function giglogadmin_getfilters()
+function giglogadmin_getfilters(): string
{
global $wpdb;
@@ -59,7 +59,7 @@ function giglogadmin_getfilters()
}
-function giglogadmin_getconcerts()
+function giglogadmin_getconcerts(): string
{
global $wpdb;
// Shortcodes RETURN content, so store in a variable to return
diff --git a/includes/public/shortcodes/giglog_display_unprocessed.php b/includes/public/shortcodes/giglog_display_unprocessed.php
index aa3596c..90ef69f 100644
--- a/includes/public/shortcodes/giglog_display_unprocessed.php
+++ b/includes/public/shortcodes/giglog_display_unprocessed.php
@@ -16,7 +16,7 @@
* gone through the processing process - aka fetching each line and
* transforming it into a concert line
*/
-function giglogadmin_getunprocessed()
+function giglogadmin_getunprocessed(): string
{
global $wpdb;
@@ -42,7 +42,7 @@ function giglogadmin_getunprocessed()
* venue exists. If they don't, they get created, if they do, their ID from
* their table is fetchd and used in concerts table
*/
-function giglogadmin_insertconcerts()
+function giglogadmin_insertconcerts(): string
{
global $wpdb;
$concertlist = '<p>Inserted the following:</p>';
@@ -128,7 +128,7 @@ function giglogadmin_insertconcerts()
return $concertlist;
}
-function giglogadmin_display_unprocessed() {
+function giglogadmin_display_unprocessed(): string {
$output = giglogadmin_getunprocessed();
$output .= '<form method="POST" action=""><input type="submit" name="ProcessConcerts" value="ProcessConcerts"/></form>';
diff --git a/includes/public/shortcodes/giglog_photographers.php b/includes/public/shortcodes/giglog_photographers.php
index 500445a..829c53e 100644
--- a/includes/public/shortcodes/giglog_photographers.php
+++ b/includes/public/shortcodes/giglog_photographers.php
@@ -10,7 +10,7 @@
* Admin users also control concert statuses here
*/
-function giglogadmin_assignconcert($p1, $c)
+function giglogadmin_assignconcert($p1, $c): void
{
global $wpdb;
@@ -40,7 +40,7 @@ function giglogadmin_assignconcert($p1, $c)
}
-function giglogadmin_unassignconcert($p1, $c)
+function giglogadmin_unassignconcert($p1, $c): void
{
global $wpdb;
@@ -71,6 +71,9 @@ function giglogadmin_unassignconcert($p1, $c)
}
+/**
+ * @return null|string
+ */
function giglogadmin_getpublishstatus ($c)
{
global $wpdb;
@@ -88,6 +91,9 @@ function giglogadmin_getpublishstatus ($c)
}
+/**
+ * @return null|string
+ */
function giglogadmin_returnuser($p1, $c)
{
global $wpdb;
@@ -164,7 +170,7 @@ function giglogadmin_returnuser($p1, $c)
}
-function giglogadmin_getfiltersphotog() {
+function giglogadmin_getfiltersphotog(): string {
global $wpdb;
//echo (var_dump($_POST["selectvenue"]));
@@ -211,7 +217,7 @@ function giglogadmin_getfiltersphotog() {
}
-function giglogadmin_getconcertsphotog ( ) {
+function giglogadmin_getconcertsphotog ( ): string {
$hf_user = wp_get_current_user();
$hf_username = $hf_user->user_login;
$roles = ( array ) $hf_user->roles;
@@ -370,7 +376,7 @@ function giglogadmin_getconcertsphotog ( ) {
return $content;
}
-function giglogadmin_photographers()
+function giglogadmin_photographers(): string
{
$output = giglogadmin_getfiltersphotog();
$output .= giglogadmin_getconcertsphotog();
diff --git a/includes/public/shortcodes/giglog_process_files.php b/includes/public/shortcodes/giglog_process_files.php
index 9dc2ec0..9443cda 100644
--- a/includes/public/shortcodes/giglog_process_files.php
+++ b/includes/public/shortcodes/giglog_process_files.php
@@ -9,7 +9,7 @@
* Band Venue Date TicketLink Eventlink. The form is at the end of this snippet
*/
-function giglogadmin_upload_files() {
+function giglogadmin_upload_files(): string {
global $wpdb;
$output = "";
$dir = wp_upload_dir()['basedir'].'/concertlists/'; //the basedir is from file uploader plugin, namely the uploads folder in which I created a concertlist folder
diff --git a/includes/venue.php b/includes/venue.php
index f6f46b2..0df0a58 100644
--- a/includes/venue.php
+++ b/includes/venue.php
@@ -28,7 +28,7 @@ if ( !class_exists('GiglogAdmin_Venue') ) {
$this->webpage = isset($attrs->wpgvenue_webpage) ? $attrs->wpgvenue_webpage : NULL;
}
- static function create($name, $city = 'Oslo')
+ static function create($name, $city = 'Oslo'): self
{
$venue = new GiglogAdmin_Venue((object) [
'wpgvenue_name' => $name,
@@ -43,7 +43,7 @@ if ( !class_exists('GiglogAdmin_Venue') ) {
return $venue;
}
- static function find_or_create($name, $city = 'Oslo')
+ static function find_or_create(string $name, string $city = 'Oslo'): self
{
global $wpdb;
$venuesql = 'SELECT * FROM wpg_venues WHERE upper(wpgvenue_name)=upper("' . $name . '")'.' and wpgvenue_city="'.$city.'"';
@@ -61,7 +61,7 @@ if ( !class_exists('GiglogAdmin_Venue') ) {
}
}
- static function all_cities()
+ static function all_cities(): array
{
global $wpdb;
$results = $wpdb->get_results('select distinct wpgvenue_city from wpg_venues');
@@ -69,7 +69,12 @@ if ( !class_exists('GiglogAdmin_Venue') ) {
return array_map(function ($r) { return $r->wpgvenue_city; }, $results);
}
- static function all_venues()
+ /**
+ * @return self[]
+ *
+ * @psalm-return array<array-key, self>
+ */
+ static function all_venues(): array
{
global $wpdb;
@@ -79,7 +84,12 @@ if ( !class_exists('GiglogAdmin_Venue') ) {
}
- static function venues_in_city($city)
+ /**
+ * @return self[]
+ *
+ * @psalm-return array<array-key, self>
+ */
+ static function venues_in_city(bool $city): array
{
global $wpdb;
$q = $wpdb->prepare(
@@ -89,7 +99,7 @@ if ( !class_exists('GiglogAdmin_Venue') ) {
return array_map(function ($r) { return new GiglogAdmin_Venue($r); }, $results);
}
- public function save()
+ public function save(): void
{
global $wpdb;