From 84f50e1fd1af2aa04f9bce5a080a8131ffab66a4 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen Date: Tue, 14 Apr 2020 12:36:30 +0200 Subject: [PATCH 01/16] DDBTEAM-448: Added generated library --- .gitignore | 2 + .swagger-codegen-ignore | 11 + .swagger-codegen/VERSION | 1 + README-generated.md | 116 ++ README.md | 40 + composer.json | 36 + composer.lock | 3008 ++++++++++++++++++++++++++++++++++ config.php.template | 6 + docs/Api/CoverApi.md | 115 ++ docs/Model/CoverRead.md | 11 + lib/Api/CoverApi.php | 701 ++++++++ lib/ApiException.php | 120 ++ lib/Configuration.php | 428 +++++ lib/HeaderSelector.php | 109 ++ lib/Model/CoverRead.php | 351 ++++ lib/Model/ModelInterface.php | 95 ++ lib/ObjectSerializer.php | 316 ++++ phpunit.xml.dist | 21 + test.php | 37 + test/Api/CoverApiTest.php | 92 ++ test/Model/CoverReadTest.php | 98 ++ 21 files changed, 5714 insertions(+) create mode 100644 .gitignore create mode 100644 .swagger-codegen-ignore create mode 100644 .swagger-codegen/VERSION create mode 100644 README-generated.md create mode 100644 README.md create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 config.php.template create mode 100644 docs/Api/CoverApi.md create mode 100644 docs/Model/CoverRead.md create mode 100644 lib/Api/CoverApi.php create mode 100644 lib/ApiException.php create mode 100644 lib/Configuration.php create mode 100644 lib/HeaderSelector.php create mode 100644 lib/Model/CoverRead.php create mode 100644 lib/Model/ModelInterface.php create mode 100644 lib/ObjectSerializer.php create mode 100644 phpunit.xml.dist create mode 100644 test.php create mode 100644 test/Api/CoverApiTest.php create mode 100644 test/Model/CoverReadTest.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61cc25c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +config.php +/vendor/ diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..b3a1a98 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,11 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. + +.gitignore +README.md +test.php +config.php.template +LICENSE +git_push.sh diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION new file mode 100644 index 0000000..edd1851 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.18 \ No newline at end of file diff --git a/README-generated.md b/README-generated.md new file mode 100644 index 0000000..4326289 --- /dev/null +++ b/README-generated.md @@ -0,0 +1,116 @@ +# SwaggerClient-php +Search for covers by ISBN/FAUST/PID + +This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 2.0 +- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen + +## Requirements + +PHP 5.5 and later + +## Installation & Usage +### Composer + +To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: + +``` +{ + "repositories": [ + { + "type": "git", + "url": "https://github.com/danskernesdigitalebibliotek/ddb-cover-service-php-client.git" + } + ], + "require": { + "danskernesdigitalebibliotek/ddb-cover-service-php-client": "*@dev" + } +} +``` + +Then run `composer install` + +### Manual Installation + +Download the files and include `autoload.php`: + +```php + require_once('/path/to/SwaggerClient-php/vendor/autoload.php'); +``` + +## Tests + +To run the unit tests: + +``` +composer install +./vendor/bin/phpunit +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```php +getCoverCollection($type, $id, $generic, $size, $limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; +} + +$apiInstance = new Swagger\Client\Api\CoverApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client() +); +$id = "id_example"; // string | +$type = "type_example"; // string | + +try { + $result = $apiInstance->getCoverItem($id, $type); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CoverApi->getCoverItem: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +## Documentation for API Endpoints + +All URIs are relative to */* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CoverApi* | [**getCoverCollection**](docs/Api/CoverApi.md#getcovercollection) | **GET** /api/cover/{type} | Retrieves the collection of Cover resources. +*CoverApi* | [**getCoverItem**](docs/Api/CoverApi.md#getcoveritem) | **GET** /api/cover/{type}/{id} | Retrieves a Cover resource. + +## Documentation For Models + + - [CoverRead](docs/Model/CoverRead.md) + +## Documentation For Authorization + + All endpoints do not require authorization. + + +## Author + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..2fcf78f --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# DDB Cover Service PHP Client + +Provides a php client for working with the DDB Cover Service API. + +Generated from swagger documentation with https://swagger.io/tools/swagger-codegen/. + +## Test script. + +Copy `config.php.template` to `config.php` and fill out the required constants. + +``` +composer install +php test.php +``` + +## Get the code generator + +See + +`https://swagger.io/tools/swagger-codegen/` + +or on github: + +`https://github.com/swagger-api/swagger-codegen` + +## With Homebrew (mac) + +``` +# Install with homebrew +brew install swagger-codegen + +# Generate library from openapi specification. +swagger-codegen generate -i https://cover.dandigbib.org/openapi/openapi.yaml -l php +``` + +## For other setups see the documentation. +``` +https://github.com/swagger-api/swagger-codegen +``` + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..4448a50 --- /dev/null +++ b/composer.json @@ -0,0 +1,36 @@ +{ + "name": "danskernesdigitalebibliotek/ddb-cover-service-php-client", + "description": "Php Client for DDB Cover Service. Generated with https://github.com/swagger-api/swagger-codegen.", + "keywords": [ + "swagger", + "php", + "sdk", + "api" + ], + "homepage": "http://swagger.io", + "license": "AGPL-3.0-only", + "authors": [ + { + "name": "Swagger and contributors", + "homepage": "https://github.com/swagger-api/swagger-codegen" + } + ], + "require": { + "php": ">=7", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^6.2" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "~2.6", + "friendsofphp/php-cs-fixer": "~2.16" + }, + "autoload": { + "psr-4": { "Swagger\\Client\\" : "lib/" } + }, + "autoload-dev": { + "psr-4": { "Swagger\\Client\\" : "test/" } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..c1e1b13 --- /dev/null +++ b/composer.lock @@ -0,0 +1,3008 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "5b27ea2b33336deb145cd4ceb4d815fa", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2019-12-23T11:57:10+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/semver", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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" + ], + "time": "2020-01-13T12:06:48+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7", + "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + }, + "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" + ], + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + } + ], + "time": "2020-03-01T12:26:26+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.10.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5eb79f3dbdffed6544e1fc287572c0f462bd29bb", + "reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^7.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2020-04-02T12:33:25+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-10-21T16:45:58+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "time": "2019-10-30T14:39:59+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.16.2", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "c460a3cbaa58f983fe026cd52c45950bf61e9239" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c460a3cbaa58f983fe026cd52c45950bf61e9239", + "reference": "c460a3cbaa58f983fe026cd52c45950bf61e9239", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.2", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^3.0 || ^4.0 || ^5.0", + "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0 || ^5.0", + "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.2", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.1", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1", + "phpunitgoodpractices/traits": "^1.8", + "symfony/phpunit-bridge": "^4.3 || ^5.0", + "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz RumiƄski", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "time": "2020-04-10T21:08:06+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "time": "2018-02-15T16:58:55+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "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" + ], + "time": "2018-08-07T13:53:10+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "shasum": "" + }, + "require": { + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" + }, + "require-dev": { + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" + }, + "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.", + "time": "2020-02-22T12:28:44+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", + "shasum": "" + }, + "require": { + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "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", + "time": "2020-02-18T18:59:58+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.3", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "451c3cd1418cf640de218914901e51b064abb093" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2020-03-05T15:02:03+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06T15:47:00+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.36", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-06-21T08:07:12+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "abandoned": true, + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://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" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "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": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2020-03-23T09:12:05+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17T09:04:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-10-03T07:41:43+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "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": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-11-07T22:31:41+00:00" + }, + { + "name": "symfony/console", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", + "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1|^2" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "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", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "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": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2020-03-30T11:42:42+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/24f40d95385774ed5c71dbf014edd047e2f2f3dc", + "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/event-dispatcher-contracts": "^2" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "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": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-11-18T17:27:11+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "ca3b87dd09fff9b771731637f5379965fbfab420" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ca3b87dd09fff9b771731637f5379965fbfab420", + "reference": "ca3b87dd09fff9b771731637f5379965fbfab420", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d", + "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d", + "shasum": "" + }, + "require": { + "php": "^7.2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "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": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "09dccfffd24b311df7f184aa80ee7b61ad61ed8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/09dccfffd24b311df7f184aa80ee7b61ad61ed8d", + "reference": "09dccfffd24b311df7f184aa80ee7b61ad61ed8d", + "shasum": "" + }, + "require": { + "php": "^7.2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "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": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "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" + ], + "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": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "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" + ], + "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": "2020-03-09T19:04:49+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "2a18e37a489803559284416df58c71ccebe50bf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/2a18e37a489803559284416df58c71ccebe50bf0", + "reference": "2a18e37a489803559284416df58c71ccebe50bf0", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "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.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "37b0976c78b94856543260ce09b460a7bc852747" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", + "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "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 backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "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" + ], + "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": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/process", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e", + "reference": "c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e", + "shasum": "" + }, + "require": { + "php": "^7.2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "144c5e51266b281231e947b51223ba14acf1a749" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", + "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "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" + ], + "time": "2019-11-18T17:27:11+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/a1d86d30d4522423afc998f32404efa34fcf5a73", + "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "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": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.39", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "e701b47e11749970f63803879c4febb520f07b6c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e701b47e11749970f63803879c4febb520f07b6c", + "reference": "e701b47e11749970f63803879c4febb520f07b6c", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "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": "2020-03-25T12:02:26+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "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" + ], + "time": "2020-02-14T12:15:55+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*" + }, + "platform-dev": [], + "plugin-api-version": "1.1.0" +} diff --git a/config.php.template b/config.php.template new file mode 100644 index 0000000..68ef527 --- /dev/null +++ b/config.php.template @@ -0,0 +1,6 @@ + \Swagger\Client\Model\CoverRead[] getCoverCollection($type, $id, $generic, $size, $limit, $offset) + +Retrieves the collection of Cover resources. + +### Example +```php +getCoverCollection($type, $id, $generic, $size, $limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **string**| | + **id** | **string**| | + **generic** | **string**| | [optional] + **size** | **string**| | [optional] + **limit** | **int**| | [optional] + **offset** | **int**| | [optional] + +### Return type + +[**\Swagger\Client\Model\CoverRead[]**](../Model/CoverRead.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/ld+json, application/xml, text/xml, text/html + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getCoverItem** +> \Swagger\Client\Model\CoverRead getCoverItem($id, $type) + +Retrieves a Cover resource. + +### Example +```php +getCoverItem($id, $type); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CoverApi->getCoverItem: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + **type** | **string**| | + +### Return type + +[**\Swagger\Client\Model\CoverRead**](../Model/CoverRead.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/ld+json, application/xml, text/xml, text/html + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/docs/Model/CoverRead.md b/docs/Model/CoverRead.md new file mode 100644 index 0000000..624d91d --- /dev/null +++ b/docs/Model/CoverRead.md @@ -0,0 +1,11 @@ +# CoverRead + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**type** | **string** | | [optional] +**image_urls** | **object[]** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php new file mode 100644 index 0000000..210415e --- /dev/null +++ b/lib/Api/CoverApi.php @@ -0,0 +1,701 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getCoverCollection + * + * Retrieves the collection of Cover resources. + * + * @param string $type type (required) + * @param string $id id (required) + * @param string $generic generic (optional) + * @param string $size size (optional) + * @param int $limit limit (optional) + * @param int $offset offset (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\CoverRead[] + */ + public function getCoverCollection($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + { + list($response) = $this->getCoverCollectionWithHttpInfo($type, $id, $generic, $size, $limit, $offset); + return $response; + } + + /** + * Operation getCoverCollectionWithHttpInfo + * + * Retrieves the collection of Cover resources. + * + * @param string $type (required) + * @param string $id (required) + * @param string $generic (optional) + * @param string $size (optional) + * @param int $limit (optional) + * @param int $offset (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\CoverRead[], HTTP status code, HTTP response headers (array of strings) + */ + public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + { + $returnType = '\Swagger\Client\Model\CoverRead[]'; + $request = $this->getCoverCollectionRequest($type, $id, $generic, $size, $limit, $offset); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if (!in_array($returnType, ['string','integer','bool'])) { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\CoverRead[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCoverCollectionAsync + * + * Retrieves the collection of Cover resources. + * + * @param string $type (required) + * @param string $id (required) + * @param string $generic (optional) + * @param string $size (optional) + * @param int $limit (optional) + * @param int $offset (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCoverCollectionAsync($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + { + return $this->getCoverCollectionAsyncWithHttpInfo($type, $id, $generic, $size, $limit, $offset) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCoverCollectionAsyncWithHttpInfo + * + * Retrieves the collection of Cover resources. + * + * @param string $type (required) + * @param string $id (required) + * @param string $generic (optional) + * @param string $size (optional) + * @param int $limit (optional) + * @param int $offset (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCoverCollectionAsyncWithHttpInfo($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + { + $returnType = '\Swagger\Client\Model\CoverRead[]'; + $request = $this->getCoverCollectionRequest($type, $id, $generic, $size, $limit, $offset); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCoverCollection' + * + * @param string $type (required) + * @param string $id (required) + * @param string $generic (optional) + * @param string $size (optional) + * @param int $limit (optional) + * @param int $offset (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getCoverCollectionRequest($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + { + // verify the required parameter 'type' is set + if ($type === null || (is_array($type) && count($type) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $type when calling getCoverCollection' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCoverCollection' + ); + } + + $resourcePath = '/api/cover/{type}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($id !== null) { + $queryParams['id'] = ObjectSerializer::toQueryValue($id); + } + // query params + if ($generic !== null) { + $queryParams['generic'] = ObjectSerializer::toQueryValue($generic); + } + // query params + if ($size !== null) { + $queryParams['size'] = ObjectSerializer::toQueryValue($size); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + + // path params + if ($type !== null) { + $resourcePath = str_replace( + '{' . 'type' . '}', + ObjectSerializer::toPathValue($type), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'application/ld+json', 'application/xml', 'text/xml', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/ld+json', 'application/xml', 'text/xml', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCoverItem + * + * Retrieves a Cover resource. + * + * @param string $id id (required) + * @param string $type type (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\CoverRead + */ + public function getCoverItem($id, $type) + { + list($response) = $this->getCoverItemWithHttpInfo($id, $type); + return $response; + } + + /** + * Operation getCoverItemWithHttpInfo + * + * Retrieves a Cover resource. + * + * @param string $id (required) + * @param string $type (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\CoverRead, HTTP status code, HTTP response headers (array of strings) + */ + public function getCoverItemWithHttpInfo($id, $type) + { + $returnType = '\Swagger\Client\Model\CoverRead'; + $request = $this->getCoverItemRequest($id, $type); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if (!in_array($returnType, ['string','integer','bool'])) { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\CoverRead', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCoverItemAsync + * + * Retrieves a Cover resource. + * + * @param string $id (required) + * @param string $type (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCoverItemAsync($id, $type) + { + return $this->getCoverItemAsyncWithHttpInfo($id, $type) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCoverItemAsyncWithHttpInfo + * + * Retrieves a Cover resource. + * + * @param string $id (required) + * @param string $type (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCoverItemAsyncWithHttpInfo($id, $type) + { + $returnType = '\Swagger\Client\Model\CoverRead'; + $request = $this->getCoverItemRequest($id, $type); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCoverItem' + * + * @param string $id (required) + * @param string $type (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getCoverItemRequest($id, $type) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCoverItem' + ); + } + // verify the required parameter 'type' is set + if ($type === null || (is_array($type) && count($type) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $type when calling getCoverItem' + ); + } + + $resourcePath = '/api/cover/{type}/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($type !== null) { + $resourcePath = str_replace( + '{' . 'type' . '}', + ObjectSerializer::toPathValue($type), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'application/ld+json', 'application/xml', 'text/xml', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/ld+json', 'application/xml', 'text/xml', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/ApiException.php b/lib/ApiException.php new file mode 100644 index 0000000..a3dc6b2 --- /dev/null +++ b/lib/ApiException.php @@ -0,0 +1,120 @@ +responseHeaders = $responseHeaders; + $this->responseBody = $responseBody; + } + + /** + * Gets the HTTP response header + * + * @return string[]|null HTTP response header + */ + public function getResponseHeaders() + { + return $this->responseHeaders; + } + + /** + * Gets the HTTP body of the server response either as Json or string + * + * @return mixed HTTP body of the server response either as \stdClass or string + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * Sets the deseralized response object (during deserialization) + * + * @param mixed $obj Deserialized response object + * + * @return void + */ + public function setResponseObject($obj) + { + $this->responseObject = $obj; + } + + /** + * Gets the deseralized response object (during deserialization) + * + * @return mixed the deserialized response object + */ + public function getResponseObject() + { + return $this->responseObject; + } +} diff --git a/lib/Configuration.php b/lib/Configuration.php new file mode 100644 index 0000000..4a9f8ad --- /dev/null +++ b/lib/Configuration.php @@ -0,0 +1,428 @@ +tempFolderPath = sys_get_temp_dir(); + } + + /** + * Sets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $key API key or token + * + * @return $this + */ + public function setApiKey($apiKeyIdentifier, $key) + { + $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; + } + + /** + * Gets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return string API key or token + */ + public function getApiKey($apiKeyIdentifier) + { + return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; + } + + /** + * Sets the prefix for API key (e.g. Bearer) + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $prefix API key prefix, e.g. Bearer + * + * @return $this + */ + public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; + } + + /** + * Gets API key prefix + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return string + */ + public function getApiKeyPrefix($apiKeyIdentifier) + { + return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; + } + + /** + * Sets the access token for OAuth + * + * @param string $accessToken Token for OAuth + * + * @return $this + */ + public function setAccessToken($accessToken) + { + $this->accessToken = $accessToken; + return $this; + } + + /** + * Gets the access token for OAuth + * + * @return string Access token for OAuth + */ + public function getAccessToken() + { + return $this->accessToken; + } + + /** + * Sets the username for HTTP basic authentication + * + * @param string $username Username for HTTP basic authentication + * + * @return $this + */ + public function setUsername($username) + { + $this->username = $username; + return $this; + } + + /** + * Gets the username for HTTP basic authentication + * + * @return string Username for HTTP basic authentication + */ + public function getUsername() + { + return $this->username; + } + + /** + * Sets the password for HTTP basic authentication + * + * @param string $password Password for HTTP basic authentication + * + * @return $this + */ + public function setPassword($password) + { + $this->password = $password; + return $this; + } + + /** + * Gets the password for HTTP basic authentication + * + * @return string Password for HTTP basic authentication + */ + public function getPassword() + { + return $this->password; + } + + /** + * Sets the host + * + * @param string $host Host + * + * @return $this + */ + public function setHost($host) + { + $this->host = $host; + return $this; + } + + /** + * Gets the host + * + * @return string Host + */ + public function getHost() + { + return $this->host; + } + + /** + * Sets the user agent of the api client + * + * @param string $userAgent the user agent of the api client + * + * @throws \InvalidArgumentException + * @return $this + */ + public function setUserAgent($userAgent) + { + if (!is_string($userAgent)) { + throw new \InvalidArgumentException('User-agent must be a string.'); + } + + $this->userAgent = $userAgent; + return $this; + } + + /** + * Gets the user agent of the api client + * + * @return string user agent + */ + public function getUserAgent() + { + return $this->userAgent; + } + + /** + * Sets debug flag + * + * @param bool $debug Debug flag + * + * @return $this + */ + public function setDebug($debug) + { + $this->debug = $debug; + return $this; + } + + /** + * Gets the debug flag + * + * @return bool + */ + public function getDebug() + { + return $this->debug; + } + + /** + * Sets the debug file + * + * @param string $debugFile Debug file + * + * @return $this + */ + public function setDebugFile($debugFile) + { + $this->debugFile = $debugFile; + return $this; + } + + /** + * Gets the debug file + * + * @return string + */ + public function getDebugFile() + { + return $this->debugFile; + } + + /** + * Sets the temp folder path + * + * @param string $tempFolderPath Temp folder path + * + * @return $this + */ + public function setTempFolderPath($tempFolderPath) + { + $this->tempFolderPath = $tempFolderPath; + return $this; + } + + /** + * Gets the temp folder path + * + * @return string Temp folder path + */ + public function getTempFolderPath() + { + return $this->tempFolderPath; + } + + /** + * Gets the default configuration instance + * + * @return Configuration + */ + public static function getDefaultConfiguration() + { + if (self::$defaultConfiguration === null) { + self::$defaultConfiguration = new Configuration(); + } + + return self::$defaultConfiguration; + } + + /** + * Sets the detault configuration instance + * + * @param Configuration $config An instance of the Configuration Object + * + * @return void + */ + public static function setDefaultConfiguration(Configuration $config) + { + self::$defaultConfiguration = $config; + } + + /** + * Gets the essential information for debugging + * + * @return string The report for debugging + */ + public static function toDebugReport() + { + $report = 'PHP SDK (Swagger\Client) Debug Report:' . PHP_EOL; + $report .= ' OS: ' . php_uname() . PHP_EOL; + $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; + $report .= ' OpenAPI Spec Version: 2.0' . PHP_EOL; + $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + + return $report; + } + + /** + * Get API key (with prefix if set) + * + * @param string $apiKeyIdentifier name of apikey + * + * @return string API key with the prefix + */ + public function getApiKeyWithPrefix($apiKeyIdentifier) + { + $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); + $apiKey = $this->getApiKey($apiKeyIdentifier); + + if ($apiKey === null) { + return null; + } + + if ($prefix === null) { + $keyWithPrefix = $apiKey; + } else { + $keyWithPrefix = $prefix . ' ' . $apiKey; + } + + return $keyWithPrefix; + } +} diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php new file mode 100644 index 0000000..ef4130a --- /dev/null +++ b/lib/HeaderSelector.php @@ -0,0 +1,109 @@ +selectAcceptHeader($accept); + if ($accept !== null) { + $headers['Accept'] = $accept; + } + + $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); + return $headers; + } + + /** + * @param string[] $accept + * @return array + */ + public function selectHeadersForMultipart($accept) + { + $headers = $this->selectHeaders($accept, []); + + unset($headers['Content-Type']); + return $headers; + } + + /** + * Return the header 'Accept' based on an array of Accept provided + * + * @param string[] $accept Array of header + * + * @return string Accept (e.g. application/json) + */ + private function selectAcceptHeader($accept) + { + if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { + return null; + } elseif (preg_grep("/application\/json/i", $accept)) { + return 'application/json'; + } else { + return implode(',', $accept); + } + } + + /** + * Return the content type based on an array of content-type provided + * + * @param string[] $contentType Array fo content-type + * + * @return string Content-Type (e.g. application/json) + */ + private function selectContentTypeHeader($contentType) + { + if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { + return 'application/json'; + } elseif (preg_grep("/application\/json/i", $contentType)) { + return 'application/json'; + } else { + return implode(',', $contentType); + } + } +} + diff --git a/lib/Model/CoverRead.php b/lib/Model/CoverRead.php new file mode 100644 index 0000000..08b6fdd --- /dev/null +++ b/lib/Model/CoverRead.php @@ -0,0 +1,351 @@ + 'string', +'type' => 'string', +'image_urls' => 'object[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, +'type' => null, +'image_urls' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', +'type' => 'type', +'image_urls' => 'imageUrls' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', +'type' => 'setType', +'image_urls' => 'setImageUrls' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', +'type' => 'getType', +'image_urls' => 'getImageUrls' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['image_urls'] = isset($data['image_urls']) ? $data['image_urls'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets image_urls + * + * @return object[] + */ + public function getImageUrls() + { + return $this->container['image_urls']; + } + + /** + * Sets image_urls + * + * @param object[] $image_urls image_urls + * + * @return $this + */ + public function setImageUrls($image_urls) + { + $this->container['image_urls'] = $image_urls; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php new file mode 100644 index 0000000..8819166 --- /dev/null +++ b/lib/Model/ModelInterface.php @@ -0,0 +1,95 @@ +format('Y-m-d') : $data->format(\DateTime::ATOM); + } elseif (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } elseif (is_object($data)) { + $values = []; + $formats = $data::swaggerFormats(); + foreach ($data::swaggerTypes() as $property => $swaggerType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null + && !in_array($swaggerType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) + && method_exists($swaggerType, 'getAllowableEnumValues') + && !in_array($value, $swaggerType::getAllowableEnumValues())) { + $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); + } + if ($value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the path, by url-encoding. + * + * @param string $value a string which will be part of the path + * + * @return string the serialized object + */ + public static function toPathValue($value) + { + return rawurlencode(self::toString($value)); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the query, by imploding comma-separated if it's an object. + * If it's a string, pass through unchanged. It will be url-encoded + * later. + * + * @param string[]|string|\DateTime $object an object to be serialized to a string + * + * @return string the serialized object + */ + public static function toQueryValue($object) + { + if (is_array($object)) { + return implode(',', $object); + } else { + return self::toString($object); + } + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the header. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string $value a string which will be part of the header + * + * @return string the header string + */ + public static function toHeaderValue($value) + { + return self::toString($value); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the http body (form parameter). If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string|\SplFileObject $value the value of the form parameter + * + * @return string the form string + */ + public static function toFormValue($value) + { + if ($value instanceof \SplFileObject) { + return $value->getRealPath(); + } else { + return self::toString($value); + } + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the parameter. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string|\DateTime $value the value of the parameter + * + * @return string the header string + */ + public static function toString($value) + { + if ($value instanceof \DateTime) { // datetime in ISO8601 format + return $value->format(\DateTime::ATOM); + } else { + return $value; + } + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $collectionFormat the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($collectionFormat) { + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'ssv': + return implode(' ', $collection); + + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null an single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } elseif (strcasecmp(substr($class, -2), '[]') === 0) { + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } elseif ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === '\DateTime') { + // Some API's return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + return new \DateTime($data); + } else { + return null; + } + } elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } elseif ($class === '\SplFileObject') { + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if (array_key_exists('Content-Disposition', $httpHeaders) && + preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } elseif (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues())) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '{{invokerPackage}}\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + $instance = new $class(); + foreach ($instance::swaggerTypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { + continue; + } + + $propertyValue = $data->{$instance::attributeMap()[$property]}; + if (isset($propertyValue)) { + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..c12ee14 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,21 @@ + + + + + ./test/Api + ./test/Model + + + + + + ./lib/Api + ./lib/Model + + + diff --git a/test.php b/test.php new file mode 100644 index 0000000..5e53ecd --- /dev/null +++ b/test.php @@ -0,0 +1,37 @@ +setHost(HOST); +$config->setAccessToken(ACCESS_TOKEN); + +$configArray = []; + +if (!empty(BASIC_AUTH_PASSWORD) && !empty(BASIC_AUTH_USERNAME)) { + $config->setUsername(BASIC_AUTH_USERNAME); + $config->setPassword(BASIC_AUTH_PASSWORD); + + $configArray['auth'] = [BASIC_AUTH_USERNAME, BASIC_AUTH_PASSWORD]; +} + +$apiInstance = new CoverApi( + new GuzzleHttp\Client($configArray), + $config +); + +$type = 'pid'; +$ids = ['870970-basis:26957087', '870970-basis:53969127']; +$sizes = ['default','medium']; + +try { + $result = $apiInstance->getCoverCollection('pid', implode(',', $ids), 'true', implode(',', $sizes)); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; +} diff --git a/test/Api/CoverApiTest.php b/test/Api/CoverApiTest.php new file mode 100644 index 0000000..b9384e1 --- /dev/null +++ b/test/Api/CoverApiTest.php @@ -0,0 +1,92 @@ + Date: Mon, 20 Apr 2020 10:04:48 +0200 Subject: [PATCH 02/16] DDBTEAM-471: Clean up --- .github/workflows/pr.yaml | 104 ++ .gitignore | 1 + .php_cs.dist | 14 + README.md | 3 +- composer.json | 35 +- composer.lock | 3008 ---------------------------------- lib/Api/CoverApi.php | 152 +- lib/ApiException.php | 10 +- lib/Configuration.php | 32 +- lib/HeaderSelector.php | 7 +- lib/Model/CoverRead.php | 55 +- lib/Model/ModelInterface.php | 2 +- lib/ObjectSerializer.php | 44 +- phpcs.xml.dist | 12 + phpunit.xml.dist | 21 - test/Api/CoverApiTest.php | 92 -- test/Model/CoverReadTest.php | 98 -- 17 files changed, 332 insertions(+), 3358 deletions(-) create mode 100644 .github/workflows/pr.yaml create mode 100644 .php_cs.dist delete mode 100644 composer.lock create mode 100644 phpcs.xml.dist delete mode 100644 phpunit.xml.dist delete mode 100644 test/Api/CoverApiTest.php delete mode 100644 test/Model/CoverReadTest.php diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..1185651 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,104 @@ +on: pull_request +name: Review +jobs: + test-composer-install: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['7.4', '7.3'] + name: Validate composer (${{ matrix.php}}) + steps: + - uses: actions/checkout@master + + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php}} + extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip + coverage: none + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ matrix.php }}-composer- + + - name: Validate composer files + run: composer validate composer.json + + - name: Composer install with exported .env variables + run: | + APP_ENV=prod composer install --no-dev -o + + runner-phpcs: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['7.4', '7.3'] + name: Coding style (${{ matrix.php }}) + steps: + - uses: actions/checkout@master + + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip + coverage: none + + - name: Install Reviewdog + run: wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $PWD/ v0.9.14 + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ matrix.php }}-composer- + + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist + + - name: PHPCS + run: composer actions/phpcs | ./reviewdog -f=checkstyle -name=PHPCS -reporter=github-pr-check + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + phpcsfixer: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['7.4', '7.3'] + name: Coding style fixer (${{ matrix.php }}) + steps: + - uses: actions/checkout@master + + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip + coverage: none + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ matrix.php }}-composer- + + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist + + - name: phpcsfixerr + run: composer actions/phpcsfixer diff --git a/.gitignore b/.gitignore index 61cc25c..ded4a3d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ config.php /vendor/ +.php_cs.cache diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..3035d18 --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,14 @@ +in(__DIR__.'/{lib}') +; + +return PhpCsFixer\Config::create() + ->setRules([ + '@PSR2' => true, + 'phpdoc_align' => false, + 'no_superfluous_phpdoc_tags' => false, + 'array_syntax' => ['syntax' => 'short'], + ]) + ->setFinder($finder); diff --git a/README.md b/README.md index 2fcf78f..f9ae978 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Generated from swagger documentation with https://swagger.io/tools/swagger-codeg ## Test script. +See `test.php` for an example of the use of the library. + Copy `config.php.template` to `config.php` and fill out the required constants. ``` @@ -37,4 +39,3 @@ swagger-codegen generate -i https://cover.dandigbib.org/openapi/openapi.yaml -l ``` https://github.com/swagger-api/swagger-codegen ``` - diff --git a/composer.json b/composer.json index 4448a50..f266fd8 100644 --- a/composer.json +++ b/composer.json @@ -23,14 +23,43 @@ "guzzlehttp/guzzle": "^6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "squizlabs/php_codesniffer": "~2.6", - "friendsofphp/php-cs-fixer": "~2.16" + "friendsofphp/php-cs-fixer": "^2.16" }, "autoload": { "psr-4": { "Swagger\\Client\\" : "lib/" } }, "autoload-dev": { "psr-4": { "Swagger\\Client\\" : "test/" } + }, + "scripts":{ + "check": [ + "@check-coding-standards" + ], + "check-coding-standards/php-cs-fixer": [ + "php-cs-fixer --config=.php_cs.dist fix --dry-run --format=checkstyle" + ], + "check-coding-standards/phpcs": [ + "phpcs --standard=phpcs.xml.dist" + ], + "check-coding-standards": [ + "@check-coding-standards/php-cs-fixer", + "@check-coding-standards/phpcs" + ], + "apply-coding-standards/php-cs-fixer": [ + "php-cs-fixer --config=.php_cs.dist fix" + ], + "apply-coding-standards/phpcs": [ + "phpcbf --standard=phpcs.xml.dist" + ], + "apply-coding-standards": [ + "@apply-coding-standards/php-cs-fixer", + "@apply-coding-standards/phpcs" + ], + "actions/phpcs": [ + "phpcs --standard=phpcs.xml.dist --report=checkstyle" + ], + "actions/phpcsfixer": [ + "php-cs-fixer --config=.php_cs.dist fix --dry-run --diff --diff-format=udiff" + ] } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index c1e1b13..0000000 --- a/composer.lock +++ /dev/null @@ -1,3008 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "5b27ea2b33336deb145cd4ceb4d815fa", - "packages": [ - { - "name": "guzzlehttp/guzzle", - "version": "6.5.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" - }, - "suggest": { - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.5-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2019-12-23T11:57:10+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20T10:07:11+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" - }, - "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2019-07-01T23:21:34+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "time": "2019-03-08T08:55:37+00:00" - } - ], - "packages-dev": [ - { - "name": "composer/semver", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", - "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.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" - ], - "time": "2020-01-13T12:06:48+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7", - "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" - }, - "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" - ], - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - } - ], - "time": "2020-03-01T12:26:26+00:00" - }, - { - "name": "doctrine/annotations", - "version": "1.10.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5eb79f3dbdffed6544e1fc287572c0f462bd29bb", - "reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2020-04-02T12:33:25+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2019-10-21T16:45:58+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "shasum": "" - }, - "require": { - "php": "^7.2" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "time": "2019-10-30T14:39:59+00:00" - }, - { - "name": "friendsofphp/php-cs-fixer", - "version": "v2.16.2", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "c460a3cbaa58f983fe026cd52c45950bf61e9239" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c460a3cbaa58f983fe026cd52c45950bf61e9239", - "reference": "c460a3cbaa58f983fe026cd52c45950bf61e9239", - "shasum": "" - }, - "require": { - "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.2", - "doctrine/annotations": "^1.2", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^5.6 || ^7.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" - }, - "require-dev": { - "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.2", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.1", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1", - "phpunitgoodpractices/traits": "^1.8", - "symfony/phpunit-bridge": "^4.3 || ^5.0", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters in cache signature.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/TestCase.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz RumiƄski", - "email": "dariusz.ruminski@gmail.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "time": "2020-04-10T21:08:06+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" - }, - { - "name": "php-cs-fixer/diff", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "SpacePossum" - } - ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "time": "2018-02-15T16:58:55+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "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" - ], - "time": "2018-08-07T13:53:10+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "shasum": "" - }, - "require": { - "ext-filter": "^7.1", - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0", - "phpdocumentor/type-resolver": "^1.0", - "webmozart/assert": "^1" - }, - "require-dev": { - "doctrine/instantiator": "^1", - "mockery/mockery": "^1" - }, - "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.", - "time": "2020-02-22T12:28:44+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", - "shasum": "" - }, - "require": { - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "^7.2", - "mockery/mockery": "~1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "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", - "time": "2020-02-18T18:59:58+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.10.3", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2020-03-05T15:02:03+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06T15:47:00+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2017-11-27T13:52:08+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.12", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2017-12-04T08:55:13+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.36", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2017-06-21T08:07:12+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "abandoned": true, - "time": "2015-10-02T06:51:40+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://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" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/log", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", - "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": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2020-03-23T09:12:05+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2017-05-22T07:24:03+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-08-18T05:49:44+00:00" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17T09:04:28+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "2.9.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "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": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2018-11-07T22:31:41+00:00" - }, - { - "name": "symfony/console", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", - "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1|^2" - }, - "conflict": { - "symfony/dependency-injection": "<4.4", - "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", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "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": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2020-03-30T11:42:42+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/24f40d95385774ed5c71dbf014edd047e2f2f3dc", - "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/event-dispatcher-contracts": "^2" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/http-foundation": "^4.4|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^4.4|^5.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "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": "2020-03-27T16:56:45+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", - "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2019-11-18T17:27:11+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "ca3b87dd09fff9b771731637f5379965fbfab420" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/ca3b87dd09fff9b771731637f5379965fbfab420", - "reference": "ca3b87dd09fff9b771731637f5379965fbfab420", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/polyfill-ctype": "~1.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2020-03-27T16:56:45+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d", - "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d", - "shasum": "" - }, - "require": { - "php": "^7.2.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "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": "2020-03-27T16:56:45+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "09dccfffd24b311df7f184aa80ee7b61ad61ed8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/09dccfffd24b311df7f184aa80ee7b61ad61ed8d", - "reference": "09dccfffd24b311df7f184aa80ee7b61ad61ed8d", - "shasum": "" - }, - "require": { - "php": "^7.2.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony OptionsResolver Component", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "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": "2020-03-27T16:56:45+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.15-dev" - } - }, - "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" - ], - "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": "2020-02-27T09:26:54+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.15-dev" - } - }, - "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" - ], - "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": "2020-03-09T19:04:49+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "2a18e37a489803559284416df58c71ccebe50bf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/2a18e37a489803559284416df58c71ccebe50bf0", - "reference": "2a18e37a489803559284416df58c71ccebe50bf0", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.15-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "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.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2020-02-27T09:26:54+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "37b0976c78b94856543260ce09b460a7bc852747" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", - "reference": "37b0976c78b94856543260ce09b460a7bc852747", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.15-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "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 backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "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": "2020-02-27T09:26:54+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.15-dev" - } - }, - "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" - ], - "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": "2020-02-27T09:26:54+00:00" - }, - { - "name": "symfony/process", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e", - "reference": "c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e", - "shasum": "" - }, - "require": { - "php": "^7.2.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2020-03-27T16:56:45+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "psr/container": "^1.0" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "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" - ], - "time": "2019-11-18T17:27:11+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/a1d86d30d4522423afc998f32404efa34fcf5a73", - "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/service-contracts": "^1.0|^2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "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": "2020-03-27T16:56:45+00:00" - }, - { - "name": "symfony/yaml", - "version": "v3.4.39", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "e701b47e11749970f63803879c4febb520f07b6c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e701b47e11749970f63803879c4febb520f07b6c", - "reference": "e701b47e11749970f63803879c4febb520f07b6c", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "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": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "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": "2020-03-25T12:02:26+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "vimeo/psalm": "<3.6.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" - }, - "type": "library", - "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" - ], - "time": "2020-02-14T12:15:55+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=7", - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*" - }, - "platform-dev": [], - "plugin-api-version": "1.1.0" -} diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php index 210415e..8a3f605 100644 --- a/lib/Api/CoverApi.php +++ b/lib/Api/CoverApi.php @@ -65,8 +65,8 @@ class CoverApi /** * @param ClientInterface $client - * @param Configuration $config - * @param HeaderSelector $selector + * @param Configuration $config + * @param HeaderSelector $selector */ public function __construct( ClientInterface $client = null, @@ -91,20 +91,21 @@ public function getConfig() * * Retrieves the collection of Cover resources. * - * @param string $type type (required) - * @param string $id id (required) - * @param string $generic generic (optional) - * @param string $size size (optional) - * @param int $limit limit (optional) - * @param int $offset offset (optional) + * @param string $type type (required) + * @param string $id id (required) + * @param string $generic generic (optional) + * @param string $size size (optional) + * @param int $limit limit (optional) + * @param int $offset offset (optional) * - * @throws \Swagger\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException * @return \Swagger\Client\Model\CoverRead[] + * @throws \InvalidArgumentException + * @throws \Swagger\Client\ApiException on non-2xx response */ public function getCoverCollection($type, $id, $generic = null, $size = null, $limit = null, $offset = null) { list($response) = $this->getCoverCollectionWithHttpInfo($type, $id, $generic, $size, $limit, $offset); + return $response; } @@ -113,16 +114,16 @@ public function getCoverCollection($type, $id, $generic = null, $size = null, $l * * Retrieves the collection of Cover resources. * - * @param string $type (required) - * @param string $id (required) - * @param string $generic (optional) - * @param string $size (optional) - * @param int $limit (optional) - * @param int $offset (optional) + * @param string $type (required) + * @param string $id (required) + * @param string $generic (optional) + * @param string $size (optional) + * @param int $limit (optional) + * @param int $offset (optional) * - * @throws \Swagger\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\CoverRead[], HTTP status code, HTTP response headers (array of strings) + * @throws \InvalidArgumentException + * @throws \Swagger\Client\ApiException on non-2xx response */ public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $size = null, $limit = null, $offset = null) { @@ -162,7 +163,7 @@ public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $siz $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { + if (!in_array($returnType, ['string', 'integer', 'bool'])) { $content = json_decode($content); } } @@ -170,9 +171,8 @@ public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $siz return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; - } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -193,15 +193,15 @@ public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $siz * * Retrieves the collection of Cover resources. * - * @param string $type (required) - * @param string $id (required) - * @param string $generic (optional) - * @param string $size (optional) - * @param int $limit (optional) - * @param int $offset (optional) + * @param string $type (required) + * @param string $id (required) + * @param string $generic (optional) + * @param string $size (optional) + * @param int $limit (optional) + * @param int $offset (optional) * - * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException */ public function getCoverCollectionAsync($type, $id, $generic = null, $size = null, $limit = null, $offset = null) { @@ -218,15 +218,15 @@ function ($response) { * * Retrieves the collection of Cover resources. * - * @param string $type (required) - * @param string $id (required) - * @param string $generic (optional) - * @param string $size (optional) - * @param int $limit (optional) - * @param int $offset (optional) + * @param string $type (required) + * @param string $id (required) + * @param string $generic (optional) + * @param string $size (optional) + * @param int $limit (optional) + * @param int $offset (optional) * - * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException */ public function getCoverCollectionAsyncWithHttpInfo($type, $id, $generic = null, $size = null, $limit = null, $offset = null) { @@ -250,7 +250,7 @@ function ($response) use ($returnType) { return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; }, function ($exception) { @@ -273,15 +273,15 @@ function ($exception) { /** * Create request for operation 'getCoverCollection' * - * @param string $type (required) - * @param string $id (required) - * @param string $generic (optional) - * @param string $size (optional) - * @param int $limit (optional) - * @param int $offset (optional) + * @param string $type (required) + * @param string $id (required) + * @param string $generic (optional) + * @param string $size (optional) + * @param int $limit (optional) + * @param int $offset (optional) * - * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @throws \InvalidArgumentException */ protected function getCoverCollectionRequest($type, $id, $generic = null, $size = null, $limit = null, $offset = null) { @@ -329,7 +329,7 @@ protected function getCoverCollectionRequest($type, $id, $generic = null, $size // path params if ($type !== null) { $resourcePath = str_replace( - '{' . 'type' . '}', + '{'.'type'.'}', ObjectSerializer::toPathValue($type), $resourcePath ); @@ -363,15 +363,13 @@ protected function getCoverCollectionRequest($type, $id, $generic = null, $size foreach ($formParams as $formParamName => $formParamValue) { $multipartContents[] = [ 'name' => $formParamName, - 'contents' => $formParamValue + 'contents' => $formParamValue, ]; } // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { $httpBody = \GuzzleHttp\json_encode($formParams); - } else { // for HTTP post (form) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); @@ -391,9 +389,10 @@ protected function getCoverCollectionRequest($type, $id, $generic = null, $size ); $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -404,16 +403,17 @@ protected function getCoverCollectionRequest($type, $id, $generic = null, $size * * Retrieves a Cover resource. * - * @param string $id id (required) - * @param string $type type (required) + * @param string $id id (required) + * @param string $type type (required) * - * @throws \Swagger\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException * @return \Swagger\Client\Model\CoverRead + * @throws \InvalidArgumentException + * @throws \Swagger\Client\ApiException on non-2xx response */ public function getCoverItem($id, $type) { list($response) = $this->getCoverItemWithHttpInfo($id, $type); + return $response; } @@ -422,12 +422,12 @@ public function getCoverItem($id, $type) * * Retrieves a Cover resource. * - * @param string $id (required) - * @param string $type (required) + * @param string $id (required) + * @param string $type (required) * - * @throws \Swagger\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\CoverRead, HTTP status code, HTTP response headers (array of strings) + * @throws \InvalidArgumentException + * @throws \Swagger\Client\ApiException on non-2xx response */ public function getCoverItemWithHttpInfo($id, $type) { @@ -467,7 +467,7 @@ public function getCoverItemWithHttpInfo($id, $type) $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { + if (!in_array($returnType, ['string', 'integer', 'bool'])) { $content = json_decode($content); } } @@ -475,9 +475,8 @@ public function getCoverItemWithHttpInfo($id, $type) return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; - } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -498,11 +497,11 @@ public function getCoverItemWithHttpInfo($id, $type) * * Retrieves a Cover resource. * - * @param string $id (required) - * @param string $type (required) + * @param string $id (required) + * @param string $type (required) * - * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException */ public function getCoverItemAsync($id, $type) { @@ -519,11 +518,11 @@ function ($response) { * * Retrieves a Cover resource. * - * @param string $id (required) - * @param string $type (required) + * @param string $id (required) + * @param string $type (required) * - * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException */ public function getCoverItemAsyncWithHttpInfo($id, $type) { @@ -547,7 +546,7 @@ function ($response) use ($returnType) { return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; }, function ($exception) { @@ -570,11 +569,11 @@ function ($exception) { /** * Create request for operation 'getCoverItem' * - * @param string $id (required) - * @param string $type (required) + * @param string $id (required) + * @param string $type (required) * - * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @throws \InvalidArgumentException */ protected function getCoverItemRequest($id, $type) { @@ -602,7 +601,7 @@ protected function getCoverItemRequest($id, $type) // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', + '{'.'id'.'}', ObjectSerializer::toPathValue($id), $resourcePath ); @@ -610,7 +609,7 @@ protected function getCoverItemRequest($id, $type) // path params if ($type !== null) { $resourcePath = str_replace( - '{' . 'type' . '}', + '{'.'type'.'}', ObjectSerializer::toPathValue($type), $resourcePath ); @@ -644,15 +643,13 @@ protected function getCoverItemRequest($id, $type) foreach ($formParams as $formParamName => $formParamValue) { $multipartContents[] = [ 'name' => $formParamName, - 'contents' => $formParamValue + 'contents' => $formParamValue, ]; } // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { $httpBody = \GuzzleHttp\json_encode($formParams); - } else { // for HTTP post (form) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); @@ -672,9 +669,10 @@ protected function getCoverItemRequest($id, $type) ); $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -683,8 +681,8 @@ protected function getCoverItemRequest($id, $type) /** * Create http client option * - * @throws \RuntimeException on file opening failure * @return array of http client options + * @throws \RuntimeException on file opening failure */ protected function createHttpClientOption() { @@ -692,7 +690,7 @@ protected function createHttpClientOption() if ($this->config->getDebug()) { $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); } } diff --git a/lib/ApiException.php b/lib/ApiException.php index a3dc6b2..5cf0faa 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -15,7 +15,7 @@ * Search for covers by ISBN/FAUST/PID * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.18 */ @@ -57,17 +57,17 @@ class ApiException extends Exception /** * The deserialized response object * - * @var $responseObject; + * @var $responseObject ; */ protected $responseObject; /** * Constructor * - * @param string $message Error message - * @param int $code HTTP status code + * @param string $message Error message + * @param int $code HTTP status code * @param string[]|null $responseHeaders HTTP response header - * @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string + * @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string */ public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) { diff --git a/lib/Configuration.php b/lib/Configuration.php index 4a9f8ad..18d9698 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -15,7 +15,7 @@ * Search for covers by ISBN/FAUST/PID * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.18 */ @@ -122,13 +122,14 @@ public function __construct() * Sets API key * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $key API key or token + * @param string $key API key or token * * @return $this */ public function setApiKey($apiKeyIdentifier, $key) { $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; } @@ -148,13 +149,14 @@ public function getApiKey($apiKeyIdentifier) * Sets the prefix for API key (e.g. Bearer) * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer + * @param string $prefix API key prefix, e.g. Bearer * * @return $this */ public function setApiKeyPrefix($apiKeyIdentifier, $prefix) { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; } @@ -180,6 +182,7 @@ public function getApiKeyPrefix($apiKeyIdentifier) public function setAccessToken($accessToken) { $this->accessToken = $accessToken; + return $this; } @@ -203,6 +206,7 @@ public function getAccessToken() public function setUsername($username) { $this->username = $username; + return $this; } @@ -226,6 +230,7 @@ public function getUsername() public function setPassword($password) { $this->password = $password; + return $this; } @@ -249,6 +254,7 @@ public function getPassword() public function setHost($host) { $this->host = $host; + return $this; } @@ -267,8 +273,8 @@ public function getHost() * * @param string $userAgent the user agent of the api client * - * @throws \InvalidArgumentException * @return $this + * @throws \InvalidArgumentException */ public function setUserAgent($userAgent) { @@ -277,6 +283,7 @@ public function setUserAgent($userAgent) } $this->userAgent = $userAgent; + return $this; } @@ -300,6 +307,7 @@ public function getUserAgent() public function setDebug($debug) { $this->debug = $debug; + return $this; } @@ -323,6 +331,7 @@ public function getDebug() public function setDebugFile($debugFile) { $this->debugFile = $debugFile; + return $this; } @@ -346,6 +355,7 @@ public function getDebugFile() public function setTempFolderPath($tempFolderPath) { $this->tempFolderPath = $tempFolderPath; + return $this; } @@ -392,11 +402,11 @@ public static function setDefaultConfiguration(Configuration $config) */ public static function toDebugReport() { - $report = 'PHP SDK (Swagger\Client) Debug Report:' . PHP_EOL; - $report .= ' OS: ' . php_uname() . PHP_EOL; - $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 2.0' . PHP_EOL; - $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + $report = 'PHP SDK (Swagger\Client) Debug Report:'.PHP_EOL; + $report .= ' OS: '.php_uname().PHP_EOL; + $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; + $report .= ' OpenAPI Spec Version: 2.0'.PHP_EOL; + $report .= ' Temp Folder Path: '.self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; return $report; } @@ -404,7 +414,7 @@ public static function toDebugReport() /** * Get API key (with prefix if set) * - * @param string $apiKeyIdentifier name of apikey + * @param string $apiKeyIdentifier name of apikey * * @return string API key with the prefix */ @@ -420,7 +430,7 @@ public function getApiKeyWithPrefix($apiKeyIdentifier) if ($prefix === null) { $keyWithPrefix = $apiKey; } else { - $keyWithPrefix = $prefix . ' ' . $apiKey; + $keyWithPrefix = $prefix.' '.$apiKey; } return $keyWithPrefix; diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index ef4130a..474de09 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -15,7 +15,7 @@ * Search for covers by ISBN/FAUST/PID * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.18 */ @@ -43,6 +43,7 @@ class HeaderSelector /** * @param string[] $accept * @param string[] $contentTypes + * * @return array */ public function selectHeaders($accept, $contentTypes) @@ -55,11 +56,13 @@ public function selectHeaders($accept, $contentTypes) } $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); + return $headers; } /** * @param string[] $accept + * * @return array */ public function selectHeadersForMultipart($accept) @@ -67,6 +70,7 @@ public function selectHeadersForMultipart($accept) $headers = $this->selectHeaders($accept, []); unset($headers['Content-Type']); + return $headers; } @@ -106,4 +110,3 @@ private function selectContentTypeHeader($contentType) } } } - diff --git a/lib/Model/CoverRead.php b/lib/Model/CoverRead.php index 08b6fdd..002499e 100644 --- a/lib/Model/CoverRead.php +++ b/lib/Model/CoverRead.php @@ -16,7 +16,7 @@ * Search for covers by ISBN/FAUST/PID * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.18 */ @@ -44,31 +44,33 @@ class CoverRead implements ModelInterface, ArrayAccess const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $swaggerModelName = 'Cover-read'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerTypes = [ 'id' => 'string', -'type' => 'string', -'image_urls' => 'object[]' ]; + 'type' => 'string', + 'image_urls' => 'object[]', + ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerFormats = [ 'id' => null, -'type' => null, -'image_urls' => null ]; + 'type' => null, + 'image_urls' => null, + ]; /** * Array of property to type mappings. Used for (de)serialization @@ -98,8 +100,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'id' => 'id', -'type' => 'type', -'image_urls' => 'imageUrls' ]; + 'type' => 'type', + 'image_urls' => 'imageUrls', + ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -108,8 +111,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'id' => 'setId', -'type' => 'setType', -'image_urls' => 'setImageUrls' ]; + 'type' => 'setType', + 'image_urls' => 'setImageUrls', + ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -118,8 +122,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'id' => 'getId', -'type' => 'getType', -'image_urls' => 'getImageUrls' ]; + 'type' => 'getType', + 'image_urls' => 'getImageUrls', + ]; /** * Array of attributes where the key is the local name, @@ -162,7 +167,6 @@ public function getModelName() return self::$swaggerModelName; } - /** * Associative array for storing property values @@ -279,6 +283,7 @@ public function setImageUrls($image_urls) return $this; } + /** * Returns true if offset exists. False otherwise. * @@ -307,7 +312,7 @@ public function offsetGet($offset) * Sets value based on offset. * * @param integer $offset Offset - * @param mixed $value Value to be set + * @param mixed $value Value to be set * * @return void */ diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 8819166..7ac5db5 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -16,7 +16,7 @@ * Search for covers by ISBN/FAUST/PID * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.18 */ diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 3ceed35..4c42953 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -16,7 +16,7 @@ * Search for covers by ISBN/FAUST/PID * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.18 */ @@ -41,8 +41,8 @@ class ObjectSerializer /** * Serialize data * - * @param mixed $data the data to serialize - * @param string $type the SwaggerType of the data + * @param mixed $data the data to serialize + * @param string $type the SwaggerType of the data * @param string $format the format of the Swagger type of the data * * @return string|object serialized form of $data @@ -57,6 +57,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); } + return $data; } elseif (is_object($data)) { $values = []; @@ -65,7 +66,11 @@ public static function sanitizeForSerialization($data, $type = null, $format = n $getter = $data::getters()[$property]; $value = $data->$getter(); if ($value !== null - && !in_array($swaggerType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) + && !in_array( + $swaggerType, + ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], + true + ) && method_exists($swaggerType, 'getAllowableEnumValues') && !in_array($value, $swaggerType::getAllowableEnumValues())) { $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); @@ -75,6 +80,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); } } + return (object)$values; } else { return (string)$data; @@ -183,10 +189,10 @@ public static function toString($value) /** * Serialize an array to a string. * - * @param array $collection collection to serialize to a string - * @param string $collectionFormat the format use for serialization (csv, + * @param array $collection collection to serialize to a string + * @param string $collectionFormat the format use for serialization (csv, * ssv, tsv, pipes, multi) - * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array * * @return string */ @@ -217,10 +223,10 @@ public static function serializeCollection(array $collection, $collectionFormat, /** * Deserialize a JSON string into an object * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used * * @return object|array|null an single or an array of $class instances */ @@ -238,6 +244,7 @@ public static function deserialize($data, $class, $httpHeaders = null) $deserialized[$key] = self::deserialize($value, $subClass, null); } } + return $deserialized; } elseif (strcasecmp(substr($class, -2), '[]') === 0) { $subClass = substr($class, 0, -2); @@ -245,9 +252,11 @@ public static function deserialize($data, $class, $httpHeaders = null) foreach ($data as $key => $value) { $values[] = self::deserialize($value, $subClass, null); } + return $values; } elseif ($class === 'object') { settype($data, 'array'); + return $data; } elseif ($class === '\DateTime') { // Some API's return an invalid, empty string as a @@ -261,8 +270,13 @@ public static function deserialize($data, $class, $httpHeaders = null) } else { return null; } - } elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + } elseif (in_array( + $class, + ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], + true + )) { settype($data, $class); + return $data; } elseif ($class === '\SplFileObject') { /** @var \Psr\Http\Message\StreamInterface $data */ @@ -270,7 +284,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // determine file name if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath().DIRECTORY_SEPARATOR.self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); } @@ -287,12 +301,13 @@ public static function deserialize($data, $class, $httpHeaders = null) $imploded = implode("', '", $class::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } + return $data; } else { // If a discriminator is defined and points to a valid subclass, use it. $discriminator = $class::DISCRIMINATOR; if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = '{{invokerPackage}}\Model\\' . $data->{$discriminator}; + $subclass = '{{invokerPackage}}\Model\\'.$data->{$discriminator}; if (is_subclass_of($subclass, $class)) { $class = $subclass; } @@ -310,6 +325,7 @@ public static function deserialize($data, $class, $httpHeaders = null) $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); } } + return $instance; } } diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..cc3f85f --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,12 @@ + + + The coding standard. + + lib/ + + + + + * + + diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index c12ee14..0000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,21 +0,0 @@ - - - - - ./test/Api - ./test/Model - - - - - - ./lib/Api - ./lib/Model - - - diff --git a/test/Api/CoverApiTest.php b/test/Api/CoverApiTest.php deleted file mode 100644 index b9384e1..0000000 --- a/test/Api/CoverApiTest.php +++ /dev/null @@ -1,92 +0,0 @@ - Date: Mon, 20 Apr 2020 10:09:22 +0200 Subject: [PATCH 03/16] DDBTEAM-448: Added phpcs --- composer.json | 3 +- composer.lock | 2981 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2983 insertions(+), 1 deletion(-) create mode 100644 composer.lock diff --git a/composer.json b/composer.json index f266fd8..b6a0969 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,8 @@ "guzzlehttp/guzzle": "^6.2" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16" + "friendsofphp/php-cs-fixer": "^2.16", + "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "psr-4": { "Swagger\\Client\\" : "lib/" } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..5a4f190 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2981 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "beeab549a4bb6c539c9a3e8eacaafcce", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2019-12-23T11:57:10+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/semver", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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" + ], + "time": "2020-01-13T12:06:48+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7", + "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + }, + "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" + ], + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + } + ], + "time": "2020-03-01T12:26:26+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.10.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5eb79f3dbdffed6544e1fc287572c0f462bd29bb", + "reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^7.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2020-04-02T12:33:25+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-10-21T16:45:58+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "time": "2019-10-30T14:39:59+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.16.3", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/83baf823a33a1cbd5416c8626935cf3f843c10b0", + "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.2", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^3.0 || ^4.0 || ^5.0", + "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0 || ^5.0", + "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.2", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.1", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1", + "phpunitgoodpractices/traits": "^1.8", + "symfony/phpunit-bridge": "^4.3 || ^5.0", + "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz RumiƄski", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "time": "2020-04-15T18:51:10+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "time": "2018-02-15T16:58:55+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "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" + ], + "time": "2018-08-07T13:53:10+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "shasum": "" + }, + "require": { + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" + }, + "require-dev": { + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" + }, + "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.", + "time": "2020-02-22T12:28:44+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", + "shasum": "" + }, + "require": { + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "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", + "time": "2020-02-18T18:59:58+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.3", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "451c3cd1418cf640de218914901e51b064abb093" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2020-03-05T15:02:03+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06T15:47:00+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.36", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-06-21T08:07:12+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "abandoned": true, + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://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" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "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": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2020-03-23T09:12:05+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17T09:04:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-10-03T07:41:43+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.5.5", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/73e2e7f57d958e7228fce50dc0c61f58f017f9f6", + "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6", + "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" + ], + "time": "2020-04-17T01:09:41+00:00" + }, + { + "name": "symfony/console", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", + "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1|^2" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "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", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "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": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2020-03-30T11:42:42+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/24f40d95385774ed5c71dbf014edd047e2f2f3dc", + "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/event-dispatcher-contracts": "^2" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "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": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-11-18T17:27:11+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "ca3b87dd09fff9b771731637f5379965fbfab420" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ca3b87dd09fff9b771731637f5379965fbfab420", + "reference": "ca3b87dd09fff9b771731637f5379965fbfab420", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d", + "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d", + "shasum": "" + }, + "require": { + "php": "^7.2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "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": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "09dccfffd24b311df7f184aa80ee7b61ad61ed8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/09dccfffd24b311df7f184aa80ee7b61ad61ed8d", + "reference": "09dccfffd24b311df7f184aa80ee7b61ad61ed8d", + "shasum": "" + }, + "require": { + "php": "^7.2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "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": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "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" + ], + "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": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "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" + ], + "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": "2020-03-09T19:04:49+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "2a18e37a489803559284416df58c71ccebe50bf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/2a18e37a489803559284416df58c71ccebe50bf0", + "reference": "2a18e37a489803559284416df58c71ccebe50bf0", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "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.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "37b0976c78b94856543260ce09b460a7bc852747" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", + "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "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 backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "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" + ], + "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": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/process", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e", + "reference": "c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e", + "shasum": "" + }, + "require": { + "php": "^7.2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "144c5e51266b281231e947b51223ba14acf1a749" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", + "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "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" + ], + "time": "2019-11-18T17:27:11+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/a1d86d30d4522423afc998f32404efa34fcf5a73", + "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "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": "2020-03-27T16:56:45+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.39", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "e701b47e11749970f63803879c4febb520f07b6c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e701b47e11749970f63803879c4febb520f07b6c", + "reference": "e701b47e11749970f63803879c4febb520f07b6c", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "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": "2020-03-25T12:02:26+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "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" + ], + "time": "2020-02-14T12:15:55+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*" + }, + "platform-dev": [], + "plugin-api-version": "1.1.0" +} From 03bbe80e9bbaffd3251c7e38e3e0b57e7cc41813 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen Date: Mon, 20 Apr 2020 10:12:22 +0200 Subject: [PATCH 04/16] DDBTEAM-448: Fixed comments --- lib/Api/CoverApi.php | 2 +- lib/ApiException.php | 2 +- lib/Configuration.php | 4 ++-- lib/HeaderSelector.php | 2 +- lib/Model/CoverRead.php | 2 +- lib/Model/ModelInterface.php | 2 +- lib/ObjectSerializer.php | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php index 8a3f605..ec41236 100644 --- a/lib/Api/CoverApi.php +++ b/lib/Api/CoverApi.php @@ -1,7 +1,7 @@ Date: Mon, 20 Apr 2020 10:38:59 +0200 Subject: [PATCH 05/16] DDBTEAM-448: Changed namespace --- README-generated.md | 4 ++-- composer.json | 5 +---- docs/Api/CoverApi.md | 30 +++++++++++++------------- lib/Api/CoverApi.php | 42 ++++++++++++++++++------------------ lib/ApiException.php | 6 +++--- lib/Configuration.php | 8 +++---- lib/HeaderSelector.php | 6 +++--- lib/Model/CoverRead.php | 8 +++---- lib/Model/ModelInterface.php | 6 +++--- lib/ObjectSerializer.php | 6 +++--- test.php | 4 ++-- 11 files changed, 61 insertions(+), 64 deletions(-) diff --git a/README-generated.md b/README-generated.md index 4326289..cbfd17e 100644 --- a/README-generated.md +++ b/README-generated.md @@ -56,7 +56,7 @@ Please follow the [installation procedure](#installation--usage) and then run th getCoverCollection: ', $e->getMessage(), PHP_EOL; } -$apiInstance = new Swagger\Client\Api\CoverApi( +$apiInstance = new CoverServicePhpClient\Client\Api\CoverApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() diff --git a/composer.json b/composer.json index b6a0969..b2c7db8 100644 --- a/composer.json +++ b/composer.json @@ -27,10 +27,7 @@ "squizlabs/php_codesniffer": "^3.5" }, "autoload": { - "psr-4": { "Swagger\\Client\\" : "lib/" } - }, - "autoload-dev": { - "psr-4": { "Swagger\\Client\\" : "test/" } + "psr-4": { "CoverServicePhpClient\\Client\\" : "lib/" } }, "scripts":{ "check": [ diff --git a/docs/Api/CoverApi.md b/docs/Api/CoverApi.md index a5bb976..225df14 100644 --- a/docs/Api/CoverApi.md +++ b/docs/Api/CoverApi.md @@ -1,4 +1,4 @@ -# Swagger\Client\CoverApi +# CoverServicePhpClient\Client\CoverApi All URIs are relative to */* @@ -8,7 +8,7 @@ Method | HTTP request | Description [**getCoverItem**](CoverApi.md#getcoveritem) | **GET** /api/cover/{type}/{id} | Retrieves a Cover resource. # **getCoverCollection** -> \Swagger\Client\Model\CoverRead[] getCoverCollection($type, $id, $generic, $size, $limit, $offset) +> \CoverServicePhpClient\Client\Model\CoverRead[] getCoverCollection($type, $id, $generic, $size, $limit, $offset) Retrieves the collection of Cover resources. @@ -17,17 +17,17 @@ Retrieves the collection of Cover resources. getCoverCollection($type, $id, $generic, $size, $limit, $offset); @@ -51,7 +51,7 @@ Name | Type | Description | Notes ### Return type -[**\Swagger\Client\Model\CoverRead[]**](../Model/CoverRead.md) +[**\CoverServicePhpClient\Client\Model\CoverRead[]**](../Model/CoverRead.md) ### Authorization @@ -65,7 +65,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getCoverItem** -> \Swagger\Client\Model\CoverRead getCoverItem($id, $type) +> \CoverServicePhpClient\Client\Model\CoverRead getCoverItem($id, $type) Retrieves a Cover resource. @@ -74,13 +74,13 @@ Retrieves a Cover resource. getCoverItem($id, $type); @@ -100,7 +100,7 @@ Name | Type | Description | Notes ### Return type -[**\Swagger\Client\Model\CoverRead**](../Model/CoverRead.md) +[**\CoverServicePhpClient\Client\Model\CoverRead**](../Model/CoverRead.md) ### Authorization diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php index ec41236..3ed72a3 100644 --- a/lib/Api/CoverApi.php +++ b/lib/Api/CoverApi.php @@ -4,7 +4,7 @@ * PHP version 7 * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace Swagger\Client\Api; +namespace CoverServicePhpClient\Client\Api; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -33,16 +33,16 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Swagger\Client\ApiException; -use Swagger\Client\Configuration; -use Swagger\Client\HeaderSelector; -use Swagger\Client\ObjectSerializer; +use CoverServicePhpClient\Client\ApiException; +use CoverServicePhpClient\Client\Configuration; +use CoverServicePhpClient\Client\HeaderSelector; +use CoverServicePhpClient\Client\ObjectSerializer; /** * CoverApi Class Doc Comment * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -98,9 +98,9 @@ public function getConfig() * @param int $limit limit (optional) * @param int $offset offset (optional) * - * @return \Swagger\Client\Model\CoverRead[] + * @return \CoverServicePhpClient\Client\Model\CoverRead[] * @throws \InvalidArgumentException - * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \CoverServicePhpClient\Client\ApiException on non-2xx response */ public function getCoverCollection($type, $id, $generic = null, $size = null, $limit = null, $offset = null) { @@ -121,13 +121,13 @@ public function getCoverCollection($type, $id, $generic = null, $size = null, $l * @param int $limit (optional) * @param int $offset (optional) * - * @return array of \Swagger\Client\Model\CoverRead[], HTTP status code, HTTP response headers (array of strings) + * @return array of \CoverServicePhpClient\Client\Model\CoverRead[], HTTP status code, HTTP response headers (array of strings) * @throws \InvalidArgumentException - * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \CoverServicePhpClient\Client\ApiException on non-2xx response */ public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $size = null, $limit = null, $offset = null) { - $returnType = '\Swagger\Client\Model\CoverRead[]'; + $returnType = '\CoverServicePhpClient\Client\Model\CoverRead[]'; $request = $this->getCoverCollectionRequest($type, $id, $generic, $size, $limit, $offset); try { @@ -178,7 +178,7 @@ public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $siz case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Swagger\Client\Model\CoverRead[]', + '\CoverServicePhpClient\Client\Model\CoverRead[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -230,7 +230,7 @@ function ($response) { */ public function getCoverCollectionAsyncWithHttpInfo($type, $id, $generic = null, $size = null, $limit = null, $offset = null) { - $returnType = '\Swagger\Client\Model\CoverRead[]'; + $returnType = '\CoverServicePhpClient\Client\Model\CoverRead[]'; $request = $this->getCoverCollectionRequest($type, $id, $generic, $size, $limit, $offset); return $this->client @@ -406,9 +406,9 @@ protected function getCoverCollectionRequest($type, $id, $generic = null, $size * @param string $id id (required) * @param string $type type (required) * - * @return \Swagger\Client\Model\CoverRead + * @return \CoverServicePhpClient\Client\Model\CoverRead * @throws \InvalidArgumentException - * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \CoverServicePhpClient\Client\ApiException on non-2xx response */ public function getCoverItem($id, $type) { @@ -425,13 +425,13 @@ public function getCoverItem($id, $type) * @param string $id (required) * @param string $type (required) * - * @return array of \Swagger\Client\Model\CoverRead, HTTP status code, HTTP response headers (array of strings) + * @return array of \CoverServicePhpClient\Client\Model\CoverRead, HTTP status code, HTTP response headers (array of strings) * @throws \InvalidArgumentException - * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \CoverServicePhpClient\Client\ApiException on non-2xx response */ public function getCoverItemWithHttpInfo($id, $type) { - $returnType = '\Swagger\Client\Model\CoverRead'; + $returnType = '\CoverServicePhpClient\Client\Model\CoverRead'; $request = $this->getCoverItemRequest($id, $type); try { @@ -482,7 +482,7 @@ public function getCoverItemWithHttpInfo($id, $type) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Swagger\Client\Model\CoverRead', + '\CoverServicePhpClient\Client\Model\CoverRead', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -526,7 +526,7 @@ function ($response) { */ public function getCoverItemAsyncWithHttpInfo($id, $type) { - $returnType = '\Swagger\Client\Model\CoverRead'; + $returnType = '\CoverServicePhpClient\Client\Model\CoverRead'; $request = $this->getCoverItemRequest($id, $type); return $this->client diff --git a/lib/ApiException.php b/lib/ApiException.php index 44890e6..9c2f84d 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -4,7 +4,7 @@ * PHP version 7 * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace Swagger\Client; +namespace CoverServicePhpClient\Client; use \Exception; @@ -33,7 +33,7 @@ * ApiException Class Doc Comment * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ diff --git a/lib/Configuration.php b/lib/Configuration.php index b7fce01..de6ffe2 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -4,7 +4,7 @@ * PHP version 7 * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -25,14 +25,14 @@ * Do not edit the class manually. */ -namespace Swagger\Client; +namespace CoverServicePhpClient\Client; /** * Configuration Class Doc Comment * PHP version 7 * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -402,7 +402,7 @@ public static function setDefaultConfiguration(Configuration $config) */ public static function toDebugReport() { - $report = 'PHP SDK (Swagger\Client) Debug Report:'.PHP_EOL; + $report = 'PHP SDK (CoverServicePhpClient\Client) Debug Report:'.PHP_EOL; $report .= ' OS: '.php_uname().PHP_EOL; $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; $report .= ' OpenAPI Spec Version: 2.0'.PHP_EOL; diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index f383ab3..68b19f7 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -4,7 +4,7 @@ * PHP version 7 * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace Swagger\Client; +namespace CoverServicePhpClient\Client; use \Exception; @@ -33,7 +33,7 @@ * ApiException Class Doc Comment * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ diff --git a/lib/Model/CoverRead.php b/lib/Model/CoverRead.php index 08d1298..6e2f39c 100644 --- a/lib/Model/CoverRead.php +++ b/lib/Model/CoverRead.php @@ -5,7 +5,7 @@ * PHP version 7 * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -26,16 +26,16 @@ * Do not edit the class manually. */ -namespace Swagger\Client\Model; +namespace CoverServicePhpClient\Client\Model; use \ArrayAccess; -use \Swagger\Client\ObjectSerializer; +use \CoverServicePhpClient\Client\ObjectSerializer; /** * CoverRead Class Doc Comment * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 4ef3ffb..27f4219 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -5,7 +5,7 @@ * PHP version 7 * * @category Class - * @package Swagger\Client\Model + * @package CoverServicePhpClient\Client\Model * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace Swagger\Client\Model; +namespace CoverServicePhpClient\Client\Model; /** * Interface abstracting model access. * - * @package Swagger\Client\Model + * @package CoverServicePhpClient\Client\Model * @author Swagger Codegen team */ interface ModelInterface diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 05ea84c..5337809 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -5,7 +5,7 @@ * PHP version 7 * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace Swagger\Client; +namespace CoverServicePhpClient\Client; /** * ObjectSerializer Class Doc Comment * * @category Class - * @package Swagger\Client + * @package CoverServicePhpClient\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ diff --git a/test.php b/test.php index 5e53ecd..ee749de 100644 --- a/test.php +++ b/test.php @@ -1,7 +1,7 @@ Date: Fri, 29 May 2020 11:03:06 +0200 Subject: [PATCH 06/16] DDBTEAM-498: Added generate script --- generate.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 generate.sh diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..44b92be --- /dev/null +++ b/generate.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +set -eu + +java -DapiTests=false -DmodelTests=false -jar /usr/local/opt/swagger-codegen/libexec/swagger-codegen-cli.jar generate -i $1 -l php --config config.json --output "." + +rm -rf .swagger-codegen From 3c4d7de551bdc75c83b1a00f0b6f0689c6af1510 Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Fri, 29 May 2020 11:43:10 +0200 Subject: [PATCH 07/16] DDBTEAM-498: Updated library to match v2 --- .gitignore | 1 - .php_cs | 18 ++ .swagger-codegen-ignore | 10 +- .swagger-codegen/VERSION | 1 - README-generated.md | 116 --------- README.md | 111 ++++++-- composer.json | 5 +- config.json | 13 + config.php.template | 6 - docs/Api/CoverApi.md | 95 ++----- docs/Model/Cover.md | 11 + lib/Api/CoverApi.php | 491 ++++++----------------------------- lib/ApiException.php | 22 +- lib/Configuration.php | 49 ++-- lib/HeaderSelector.php | 19 +- lib/Model/Cover.php | 381 +++++++++++++++++++++++++++ lib/Model/ModelInterface.php | 14 +- lib/ObjectSerializer.php | 56 ++-- phpcs.xml.dist | 12 - test.php | 37 --- 20 files changed, 685 insertions(+), 783 deletions(-) create mode 100644 .php_cs delete mode 100644 .swagger-codegen/VERSION delete mode 100644 README-generated.md create mode 100644 config.json delete mode 100644 config.php.template create mode 100644 docs/Model/Cover.md create mode 100644 lib/Model/Cover.php delete mode 100644 phpcs.xml.dist delete mode 100644 test.php diff --git a/.gitignore b/.gitignore index ded4a3d..4945fbe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -config.php /vendor/ .php_cs.cache diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..6b8e23c --- /dev/null +++ b/.php_cs @@ -0,0 +1,18 @@ +level(Symfony\CS\FixerInterface::PSR2_LEVEL) + ->setUsingCache(true) + ->fixers( + [ + 'ordered_use', + 'phpdoc_order', + 'short_array_syntax', + 'strict', + 'strict_param' + ] + ) + ->finder( + Symfony\CS\Finder\DefaultFinder::create() + ->in(__DIR__) + ); diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index b3a1a98..9a36afd 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -3,9 +3,9 @@ # Use this file to prevent files from being overwritten by the generator. -.gitignore -README.md -test.php -config.php.template -LICENSE +composer.json git_push.sh +.travis.yml +.phpunit.xml.dist +phpunit.xml.dist +.php_cs diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION deleted file mode 100644 index edd1851..0000000 --- a/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.18 \ No newline at end of file diff --git a/README-generated.md b/README-generated.md deleted file mode 100644 index cbfd17e..0000000 --- a/README-generated.md +++ /dev/null @@ -1,116 +0,0 @@ -# SwaggerClient-php -Search for covers by ISBN/FAUST/PID - -This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: 2.0 -- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen - -## Requirements - -PHP 5.5 and later - -## Installation & Usage -### Composer - -To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: - -``` -{ - "repositories": [ - { - "type": "git", - "url": "https://github.com/danskernesdigitalebibliotek/ddb-cover-service-php-client.git" - } - ], - "require": { - "danskernesdigitalebibliotek/ddb-cover-service-php-client": "*@dev" - } -} -``` - -Then run `composer install` - -### Manual Installation - -Download the files and include `autoload.php`: - -```php - require_once('/path/to/SwaggerClient-php/vendor/autoload.php'); -``` - -## Tests - -To run the unit tests: - -``` -composer install -./vendor/bin/phpunit -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```php -getCoverCollection($type, $id, $generic, $size, $limit, $offset); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; -} - -$apiInstance = new CoverServicePhpClient\Client\Api\CoverApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() -); -$id = "id_example"; // string | -$type = "type_example"; // string | - -try { - $result = $apiInstance->getCoverItem($id, $type); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CoverApi->getCoverItem: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -## Documentation for API Endpoints - -All URIs are relative to */* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CoverApi* | [**getCoverCollection**](docs/Api/CoverApi.md#getcovercollection) | **GET** /api/cover/{type} | Retrieves the collection of Cover resources. -*CoverApi* | [**getCoverItem**](docs/Api/CoverApi.md#getcoveritem) | **GET** /api/cover/{type}/{id} | Retrieves a Cover resource. - -## Documentation For Models - - - [CoverRead](docs/Model/CoverRead.md) - -## Documentation For Authorization - - All endpoints do not require authorization. - - -## Author - - - diff --git a/README.md b/README.md index f9ae978..7f1de43 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,108 @@ -# DDB Cover Service PHP Client +# +This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. -Provides a php client for working with the DDB Cover Service API. +This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -Generated from swagger documentation with https://swagger.io/tools/swagger-codegen/. +- API version: 2.0 +- Package version: 2.0.0 +- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen -## Test script. +## Requirements -See `test.php` for an example of the use of the library. +PHP 5.5 and later -Copy `config.php.template` to `config.php` and fill out the required constants. +## Installation & Usage +### Composer + +To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: ``` -composer install -php test.php +{ + "repositories": [ + { + "type": "git", + "url": "https://github.com/danskernesdigitalebibliotek/ddb-cover-service-php-client.git" + } + ], + "require": { + "danskernesdigitalebibliotek/ddb-cover-service-php-client": "*@dev" + } +} ``` -## Get the code generator +Then run `composer install` -See +### Manual Installation -`https://swagger.io/tools/swagger-codegen/` +Download the files and include `autoload.php`: -or on github: +```php + require_once('/path/to//vendor/autoload.php'); +``` -`https://github.com/swagger-api/swagger-codegen` +## Tests -## With Homebrew (mac) +To run the unit tests: ``` -# Install with homebrew -brew install swagger-codegen - -# Generate library from openapi specification. -swagger-codegen generate -i https://cover.dandigbib.org/openapi/openapi.yaml -l php +composer install +./vendor/bin/phpunit ``` -## For other setups see the documentation. -``` -https://github.com/swagger-api/swagger-codegen +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new CoverService\Api\CoverApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$type = "type_example"; // string | The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' +$identifiers = array("identifiers_example"); // string[] | A list of identifiers of {type} +$sizes = array("sizes_example"); // string[] | A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. + +try { + $apiInstance->getCoverCollection($type, $identifiers, $sizes); +} catch (Exception $e) { + echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; +} +?> ``` + +## Documentation for API Endpoints + +All URIs are relative to */* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CoverApi* | [**getCoverCollection**](docs/Api/CoverApi.md#getcovercollection) | **GET** /api/v2/covers | Search multiple covers + +## Documentation For Models + + - [Cover](docs/Model/Cover.md) + +## Documentation For Authorization + + +## oauth + +- **Type**: OAuth +- **Flow**: password +- **Authorization URL**: +- **Scopes**: + - ****: + + +## Author + + + diff --git a/composer.json b/composer.json index b2c7db8..8738a64 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name": "danskernesdigitalebibliotek/ddb-cover-service-php-client", - "description": "Php Client for DDB Cover Service. Generated with https://github.com/swagger-api/swagger-codegen.", + "version": "2.0.0", + "description": "", "keywords": [ "swagger", "php", @@ -27,7 +28,7 @@ "squizlabs/php_codesniffer": "^3.5" }, "autoload": { - "psr-4": { "CoverServicePhpClient\\Client\\" : "lib/" } + "psr-4": { "CoverService\\" : "lib/" } }, "scripts":{ "check": [ diff --git a/config.json b/config.json new file mode 100644 index 0000000..3956489 --- /dev/null +++ b/config.json @@ -0,0 +1,13 @@ + +{ + "packagePath": "", + "artifactVersion": "2.0.0", + "invokerPackage": "CoverService", + "modelPackage": "Model", + "apiPackage": "Api", + "composerVendorName": "danskernesdigitalebibliotek", + "composerProjectName": "ddb-cover-service-php-client", + "httpUserAgent": "CoverService-PHP/2.0.0", + "gitUserId": "danskernesdigitalebibliotek", + "gitRepoId": "ddb-cover-service-php-client" +} \ No newline at end of file diff --git a/config.php.template b/config.php.template deleted file mode 100644 index 68ef527..0000000 --- a/config.php.template +++ /dev/null @@ -1,6 +0,0 @@ - \CoverServicePhpClient\Client\Model\CoverRead[] getCoverCollection($type, $id, $generic, $size, $limit, $offset) +> getCoverCollection($type, $identifiers, $sizes) -Retrieves the collection of Cover resources. +Search multiple covers -### Example -```php -getCoverCollection($type, $id, $generic, $size, $limit, $offset); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **string**| | - **id** | **string**| | - **generic** | **string**| | [optional] - **size** | **string**| | [optional] - **limit** | **int**| | [optional] - **offset** | **int**| | [optional] - -### Return type - -[**\CoverServicePhpClient\Client\Model\CoverRead[]**](../Model/CoverRead.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/ld+json, application/xml, text/xml, text/html - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **getCoverItem** -> \CoverServicePhpClient\Client\Model\CoverRead getCoverItem($id, $type) - -Retrieves a Cover resource. +Get covers by identifier in specific image format(s), specific image size(s) and with or without generic covers. ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new CoverService\Api\CoverApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); -$id = "id_example"; // string | -$type = "type_example"; // string | +$type = "type_example"; // string | The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' +$identifiers = array("identifiers_example"); // string[] | A list of identifiers of {type} +$sizes = array("sizes_example"); // string[] | A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. try { - $result = $apiInstance->getCoverItem($id, $type); - print_r($result); + $apiInstance->getCoverCollection($type, $identifiers, $sizes); } catch (Exception $e) { - echo 'Exception when calling CoverApi->getCoverItem: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -95,21 +43,22 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string**| | - **type** | **string**| | + **type** | **string**| The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' | + **identifiers** | [**string[]**](../Model/string.md)| A list of identifiers of {type} | + **sizes** | [**string[]**](../Model/string.md)| A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. | [optional] ### Return type -[**\CoverServicePhpClient\Client\Model\CoverRead**](../Model/CoverRead.md) +void (empty response body) ### Authorization -No authorization required +[oauth](../../README.md#oauth) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/ld+json, application/xml, text/xml, text/html + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/docs/Model/Cover.md b/docs/Model/Cover.md new file mode 100644 index 0000000..62eaa6d --- /dev/null +++ b/docs/Model/Cover.md @@ -0,0 +1,11 @@ +# Cover + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**type** | **string** | | [optional] +**image_urls** | **string[]** | Get array of image urls. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php index 3ed72a3..124587b 100644 --- a/lib/Api/CoverApi.php +++ b/lib/Api/CoverApi.php @@ -1,10 +1,10 @@ getCoverCollectionWithHttpInfo($type, $id, $generic, $size, $limit, $offset); - - return $response; + $this->getCoverCollectionWithHttpInfo($type, $identifiers, $sizes); } /** * Operation getCoverCollectionWithHttpInfo * - * Retrieves the collection of Cover resources. + * Search multiple covers * - * @param string $type (required) - * @param string $id (required) - * @param string $generic (optional) - * @param string $size (optional) - * @param int $limit (optional) - * @param int $offset (optional) + * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) + * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * - * @return array of \CoverServicePhpClient\Client\Model\CoverRead[], HTTP status code, HTTP response headers (array of strings) + * @throws \CoverService\ApiException on non-2xx response * @throws \InvalidArgumentException - * @throws \CoverServicePhpClient\Client\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + public function getCoverCollectionWithHttpInfo($type, $identifiers, $sizes = null) { - $returnType = '\CoverServicePhpClient\Client\Model\CoverRead[]'; - $request = $this->getCoverCollectionRequest($type, $id, $generic, $size, $limit, $offset); + $returnType = ''; + $request = $this->getCoverCollectionRequest($type, $identifiers, $sizes); try { $options = $this->createHttpClientOption(); @@ -158,31 +150,10 @@ public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $siz ); } - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string', 'integer', 'bool'])) { - $content = json_decode($content); - } - } + return [null, $statusCode, $response->getHeaders()]; - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders(), - ]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\CoverServicePhpClient\Client\Model\CoverRead[]', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } @@ -191,21 +162,18 @@ public function getCoverCollectionWithHttpInfo($type, $id, $generic = null, $siz /** * Operation getCoverCollectionAsync * - * Retrieves the collection of Cover resources. + * Search multiple covers * - * @param string $type (required) - * @param string $id (required) - * @param string $generic (optional) - * @param string $size (optional) - * @param int $limit (optional) - * @param int $offset (optional) + * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) + * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * - * @return \GuzzleHttp\Promise\PromiseInterface * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCoverCollectionAsync($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + public function getCoverCollectionAsync($type, $identifiers, $sizes = null) { - return $this->getCoverCollectionAsyncWithHttpInfo($type, $id, $generic, $size, $limit, $offset) + return $this->getCoverCollectionAsyncWithHttpInfo($type, $identifiers, $sizes) ->then( function ($response) { return $response[0]; @@ -216,42 +184,25 @@ function ($response) { /** * Operation getCoverCollectionAsyncWithHttpInfo * - * Retrieves the collection of Cover resources. + * Search multiple covers * - * @param string $type (required) - * @param string $id (required) - * @param string $generic (optional) - * @param string $size (optional) - * @param int $limit (optional) - * @param int $offset (optional) + * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) + * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * - * @return \GuzzleHttp\Promise\PromiseInterface * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCoverCollectionAsyncWithHttpInfo($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + public function getCoverCollectionAsyncWithHttpInfo($type, $identifiers, $sizes = null) { - $returnType = '\CoverServicePhpClient\Client\Model\CoverRead[]'; - $request = $this->getCoverCollectionRequest($type, $id, $generic, $size, $limit, $offset); + $returnType = ''; + $request = $this->getCoverCollectionRequest($type, $identifiers, $sizes); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders(), - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -273,17 +224,14 @@ function ($exception) { /** * Create request for operation 'getCoverCollection' * - * @param string $type (required) - * @param string $id (required) - * @param string $generic (optional) - * @param string $size (optional) - * @param int $limit (optional) - * @param int $offset (optional) + * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) + * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * - * @return \GuzzleHttp\Psr7\Request * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request */ - protected function getCoverCollectionRequest($type, $id, $generic = null, $size = null, $limit = null, $offset = null) + protected function getCoverCollectionRequest($type, $identifiers, $sizes = null) { // verify the required parameter 'type' is set if ($type === null || (is_array($type) && count($type) === 0)) { @@ -291,14 +239,14 @@ protected function getCoverCollectionRequest($type, $id, $generic = null, $size 'Missing the required parameter $type when calling getCoverCollection' ); } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { + // verify the required parameter 'identifiers' is set + if ($identifiers === null || (is_array($identifiers) && count($identifiers) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getCoverCollection' + 'Missing the required parameter $identifiers when calling getCoverCollection' ); } - $resourcePath = '/api/cover/{type}'; + $resourcePath = '/api/v2/covers'; $formParams = []; $queryParams = []; $headerParams = []; @@ -306,325 +254,35 @@ protected function getCoverCollectionRequest($type, $id, $generic = null, $size $multipart = false; // query params - if ($id !== null) { - $queryParams['id'] = ObjectSerializer::toQueryValue($id); + if ($type !== null) { + $queryParams['type'] = ObjectSerializer::toQueryValue($type); } // query params - if ($generic !== null) { - $queryParams['generic'] = ObjectSerializer::toQueryValue($generic); + if (is_array($identifiers)) { + $identifiers = ObjectSerializer::serializeCollection($identifiers, 'csv', true); } - // query params - if ($size !== null) { - $queryParams['size'] = ObjectSerializer::toQueryValue($size); + if ($identifiers !== null) { + $queryParams['identifiers'] = ObjectSerializer::toQueryValue($identifiers); } // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + if (is_array($sizes)) { + $sizes = ObjectSerializer::serializeCollection($sizes, 'csv', true); } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + if ($sizes !== null) { + $queryParams['sizes'] = ObjectSerializer::toQueryValue($sizes); } - // path params - if ($type !== null) { - $resourcePath = str_replace( - '{'.'type'.'}', - ObjectSerializer::toPathValue($type), - $resourcePath - ); - } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/ld+json', 'application/xml', 'text/xml', 'text/html'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/ld+json', 'application/xml', 'text/xml', 'text/html'], [] ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue, - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - - return new Request( - 'GET', - $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getCoverItem - * - * Retrieves a Cover resource. - * - * @param string $id id (required) - * @param string $type type (required) - * - * @return \CoverServicePhpClient\Client\Model\CoverRead - * @throws \InvalidArgumentException - * @throws \CoverServicePhpClient\Client\ApiException on non-2xx response - */ - public function getCoverItem($id, $type) - { - list($response) = $this->getCoverItemWithHttpInfo($id, $type); - - return $response; - } - - /** - * Operation getCoverItemWithHttpInfo - * - * Retrieves a Cover resource. - * - * @param string $id (required) - * @param string $type (required) - * - * @return array of \CoverServicePhpClient\Client\Model\CoverRead, HTTP status code, HTTP response headers (array of strings) - * @throws \InvalidArgumentException - * @throws \CoverServicePhpClient\Client\ApiException on non-2xx response - */ - public function getCoverItemWithHttpInfo($id, $type) - { - $returnType = '\CoverServicePhpClient\Client\Model\CoverRead'; - $request = $this->getCoverItemRequest($id, $type); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string', 'integer', 'bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders(), - ]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\CoverServicePhpClient\Client\Model\CoverRead', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getCoverItemAsync - * - * Retrieves a Cover resource. - * - * @param string $id (required) - * @param string $type (required) - * - * @return \GuzzleHttp\Promise\PromiseInterface - * @throws \InvalidArgumentException - */ - public function getCoverItemAsync($id, $type) - { - return $this->getCoverItemAsyncWithHttpInfo($id, $type) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getCoverItemAsyncWithHttpInfo - * - * Retrieves a Cover resource. - * - * @param string $id (required) - * @param string $type (required) - * - * @return \GuzzleHttp\Promise\PromiseInterface - * @throws \InvalidArgumentException - */ - public function getCoverItemAsyncWithHttpInfo($id, $type) - { - $returnType = '\CoverServicePhpClient\Client\Model\CoverRead'; - $request = $this->getCoverItemRequest($id, $type); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders(), - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getCoverItem' - * - * @param string $id (required) - * @param string $type (required) - * - * @return \GuzzleHttp\Psr7\Request - * @throws \InvalidArgumentException - */ - protected function getCoverItemRequest($id, $type) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getCoverItem' - ); - } - // verify the required parameter 'type' is set - if ($type === null || (is_array($type) && count($type) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $type when calling getCoverItem' - ); - } - - $resourcePath = '/api/cover/{type}/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{'.'id'.'}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - // path params - if ($type !== null) { - $resourcePath = str_replace( - '{'.'type'.'}', - ObjectSerializer::toPathValue($type), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/ld+json', 'application/xml', 'text/xml', 'text/html'] - ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/ld+json', 'application/xml', 'text/xml', 'text/html'], + [], [] ); } @@ -643,19 +301,25 @@ protected function getCoverItemRequest($id, $type) foreach ($formParams as $formParamName => $formParamValue) { $multipartContents[] = [ 'name' => $formParamName, - 'contents' => $formParamValue, + 'contents' => $formParamValue ]; } // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { $httpBody = \GuzzleHttp\json_encode($formParams); + } else { // for HTTP post (form) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); } } + // this endpoint requires OAuth (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -669,10 +333,9 @@ protected function getCoverItemRequest($id, $type) ); $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( 'GET', - $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -681,8 +344,8 @@ protected function getCoverItemRequest($id, $type) /** * Create http client option * - * @return array of http client options * @throws \RuntimeException on file opening failure + * @return array of http client options */ protected function createHttpClientOption() { @@ -690,7 +353,7 @@ protected function createHttpClientOption() if ($this->config->getDebug()) { $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); } } diff --git a/lib/ApiException.php b/lib/ApiException.php index 9c2f84d..3edfe2d 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -1,10 +1,10 @@ apiKeys[$apiKeyIdentifier] = $key; - return $this; } @@ -149,14 +148,13 @@ public function getApiKey($apiKeyIdentifier) * Sets the prefix for API key (e.g. Bearer) * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer + * @param string $prefix API key prefix, e.g. Bearer * * @return $this */ public function setApiKeyPrefix($apiKeyIdentifier, $prefix) { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; - return $this; } @@ -182,7 +180,6 @@ public function getApiKeyPrefix($apiKeyIdentifier) public function setAccessToken($accessToken) { $this->accessToken = $accessToken; - return $this; } @@ -206,7 +203,6 @@ public function getAccessToken() public function setUsername($username) { $this->username = $username; - return $this; } @@ -230,7 +226,6 @@ public function getUsername() public function setPassword($password) { $this->password = $password; - return $this; } @@ -254,7 +249,6 @@ public function getPassword() public function setHost($host) { $this->host = $host; - return $this; } @@ -273,8 +267,8 @@ public function getHost() * * @param string $userAgent the user agent of the api client * - * @return $this * @throws \InvalidArgumentException + * @return $this */ public function setUserAgent($userAgent) { @@ -283,7 +277,6 @@ public function setUserAgent($userAgent) } $this->userAgent = $userAgent; - return $this; } @@ -307,7 +300,6 @@ public function getUserAgent() public function setDebug($debug) { $this->debug = $debug; - return $this; } @@ -331,7 +323,6 @@ public function getDebug() public function setDebugFile($debugFile) { $this->debugFile = $debugFile; - return $this; } @@ -355,7 +346,6 @@ public function getDebugFile() public function setTempFolderPath($tempFolderPath) { $this->tempFolderPath = $tempFolderPath; - return $this; } @@ -402,11 +392,12 @@ public static function setDefaultConfiguration(Configuration $config) */ public static function toDebugReport() { - $report = 'PHP SDK (CoverServicePhpClient\Client) Debug Report:'.PHP_EOL; - $report .= ' OS: '.php_uname().PHP_EOL; - $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; - $report .= ' OpenAPI Spec Version: 2.0'.PHP_EOL; - $report .= ' Temp Folder Path: '.self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; + $report = 'PHP SDK (CoverService) Debug Report:' . PHP_EOL; + $report .= ' OS: ' . php_uname() . PHP_EOL; + $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; + $report .= ' OpenAPI Spec Version: 2.0' . PHP_EOL; + $report .= ' SDK Package Version: 2.0.0' . PHP_EOL; + $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; } @@ -414,7 +405,7 @@ public static function toDebugReport() /** * Get API key (with prefix if set) * - * @param string $apiKeyIdentifier name of apikey + * @param string $apiKeyIdentifier name of apikey * * @return string API key with the prefix */ @@ -430,7 +421,7 @@ public function getApiKeyWithPrefix($apiKeyIdentifier) if ($prefix === null) { $keyWithPrefix = $apiKey; } else { - $keyWithPrefix = $prefix.' '.$apiKey; + $keyWithPrefix = $prefix . ' ' . $apiKey; } return $keyWithPrefix; diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index 68b19f7..242970f 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -1,10 +1,10 @@ selectContentTypeHeader($contentTypes); - return $headers; } /** * @param string[] $accept - * * @return array */ public function selectHeadersForMultipart($accept) @@ -70,7 +67,6 @@ public function selectHeadersForMultipart($accept) $headers = $this->selectHeaders($accept, []); unset($headers['Content-Type']); - return $headers; } @@ -110,3 +106,4 @@ private function selectContentTypeHeader($contentType) } } } + diff --git a/lib/Model/Cover.php b/lib/Model/Cover.php new file mode 100644 index 0000000..db01dac --- /dev/null +++ b/lib/Model/Cover.php @@ -0,0 +1,381 @@ + 'string', +'type' => 'string', +'image_urls' => 'string[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, +'type' => null, +'image_urls' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', +'type' => 'type', +'image_urls' => 'imageUrls' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', +'type' => 'setType', +'image_urls' => 'setImageUrls' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', +'type' => 'getType', +'image_urls' => 'getImageUrls' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const TYPE_PID = 'pid'; +const TYPE_ISBN = 'isbn'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PID, +self::TYPE_ISBN, ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['image_urls'] = isset($data['image_urls']) ? $data['image_urls'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets image_urls + * + * @return string[] + */ + public function getImageUrls() + { + return $this->container['image_urls']; + } + + /** + * Sets image_urls + * + * @param string[] $image_urls Get array of image urls. + * + * @return $this + */ + public function setImageUrls($image_urls) + { + $this->container['image_urls'] = $image_urls; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 27f4219..7c622af 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -2,10 +2,10 @@ /** * ModelInterface * - * PHP version 7 + * PHP version 5 * * @category Class - * @package CoverServicePhpClient\Client\Model + * @package CoverService\Model * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -13,12 +13,12 @@ /** * DDB Cover Service * - * Search for covers by ISBN/FAUST/PID + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.18 + * Swagger Codegen version: 3.0.20 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace CoverServicePhpClient\Client\Model; +namespace CoverService\Model; /** * Interface abstracting model access. * - * @package CoverServicePhpClient\Client\Model + * @package CoverService\Model * @author Swagger Codegen team */ interface ModelInterface diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 5337809..1ced2af 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -2,10 +2,10 @@ /** * ObjectSerializer * - * PHP version 7 + * PHP version 5 * * @category Class - * @package CoverServicePhpClient\Client + * @package CoverService * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -13,12 +13,12 @@ /** * DDB Cover Service * - * Search for covers by ISBN/FAUST/PID + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.18 + * Swagger Codegen version: 3.0.20 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace CoverServicePhpClient\Client; +namespace CoverService; /** * ObjectSerializer Class Doc Comment * * @category Class - * @package CoverServicePhpClient\Client + * @package CoverService * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -41,8 +41,8 @@ class ObjectSerializer /** * Serialize data * - * @param mixed $data the data to serialize - * @param string $type the SwaggerType of the data + * @param mixed $data the data to serialize + * @param string $type the SwaggerType of the data * @param string $format the format of the Swagger type of the data * * @return string|object serialized form of $data @@ -57,7 +57,6 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); } - return $data; } elseif (is_object($data)) { $values = []; @@ -66,11 +65,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n $getter = $data::getters()[$property]; $value = $data->$getter(); if ($value !== null - && !in_array( - $swaggerType, - ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], - true - ) + && !in_array($swaggerType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) && method_exists($swaggerType, 'getAllowableEnumValues') && !in_array($value, $swaggerType::getAllowableEnumValues())) { $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); @@ -80,7 +75,6 @@ public static function sanitizeForSerialization($data, $type = null, $format = n $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); } } - return (object)$values; } else { return (string)$data; @@ -189,10 +183,10 @@ public static function toString($value) /** * Serialize an array to a string. * - * @param array $collection collection to serialize to a string - * @param string $collectionFormat the format use for serialization (csv, + * @param array $collection collection to serialize to a string + * @param string $collectionFormat the format use for serialization (csv, * ssv, tsv, pipes, multi) - * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array * * @return string */ @@ -223,10 +217,10 @@ public static function serializeCollection(array $collection, $collectionFormat, /** * Deserialize a JSON string into an object * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used * * @return object|array|null an single or an array of $class instances */ @@ -244,7 +238,6 @@ public static function deserialize($data, $class, $httpHeaders = null) $deserialized[$key] = self::deserialize($value, $subClass, null); } } - return $deserialized; } elseif (strcasecmp(substr($class, -2), '[]') === 0) { $subClass = substr($class, 0, -2); @@ -252,11 +245,9 @@ public static function deserialize($data, $class, $httpHeaders = null) foreach ($data as $key => $value) { $values[] = self::deserialize($value, $subClass, null); } - return $values; } elseif ($class === 'object') { settype($data, 'array'); - return $data; } elseif ($class === '\DateTime') { // Some API's return an invalid, empty string as a @@ -270,13 +261,8 @@ public static function deserialize($data, $class, $httpHeaders = null) } else { return null; } - } elseif (in_array( - $class, - ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], - true - )) { + } elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); - return $data; } elseif ($class === '\SplFileObject') { /** @var \Psr\Http\Message\StreamInterface $data */ @@ -284,7 +270,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // determine file name if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath().DIRECTORY_SEPARATOR.self::sanitizeFilename($match[1]); + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); } @@ -301,13 +287,12 @@ public static function deserialize($data, $class, $httpHeaders = null) $imploded = implode("', '", $class::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } - return $data; } else { // If a discriminator is defined and points to a valid subclass, use it. $discriminator = $class::DISCRIMINATOR; if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = '{{invokerPackage}}\Model\\'.$data->{$discriminator}; + $subclass = '{{invokerPackage}}\Model\\' . $data->{$discriminator}; if (is_subclass_of($subclass, $class)) { $class = $subclass; } @@ -325,7 +310,6 @@ public static function deserialize($data, $class, $httpHeaders = null) $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); } } - return $instance; } } diff --git a/phpcs.xml.dist b/phpcs.xml.dist deleted file mode 100644 index cc3f85f..0000000 --- a/phpcs.xml.dist +++ /dev/null @@ -1,12 +0,0 @@ - - - The coding standard. - - lib/ - - - - - * - - diff --git a/test.php b/test.php deleted file mode 100644 index ee749de..0000000 --- a/test.php +++ /dev/null @@ -1,37 +0,0 @@ -setHost(HOST); -$config->setAccessToken(ACCESS_TOKEN); - -$configArray = []; - -if (!empty(BASIC_AUTH_PASSWORD) && !empty(BASIC_AUTH_USERNAME)) { - $config->setUsername(BASIC_AUTH_USERNAME); - $config->setPassword(BASIC_AUTH_PASSWORD); - - $configArray['auth'] = [BASIC_AUTH_USERNAME, BASIC_AUTH_PASSWORD]; -} - -$apiInstance = new CoverApi( - new GuzzleHttp\Client($configArray), - $config -); - -$type = 'pid'; -$ids = ['870970-basis:26957087', '870970-basis:53969127']; -$sizes = ['default','medium']; - -try { - $result = $apiInstance->getCoverCollection('pid', implode(',', $ids), 'true', implode(',', $sizes)); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; -} From 2129af5e8ca23bb2762926d58393dea026aaf51b Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Fri, 29 May 2020 11:58:31 +0200 Subject: [PATCH 08/16] DDBTEAM-498: Updated json lock file --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 5a4f190..c713ca6 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": "beeab549a4bb6c539c9a3e8eacaafcce", + "content-hash": "171e3151ae887a8392dbfbc4c4f6d19a", "packages": [ { "name": "guzzlehttp/guzzle", From a539a7567c77b3a397397f9d4b47b1edf65a50be Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Fri, 29 May 2020 12:04:39 +0200 Subject: [PATCH 09/16] DDBTEAM-498: Fixed dir in phpcs --- .php_cs.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php_cs.dist b/.php_cs.dist index 3035d18..7728963 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -1,7 +1,7 @@ in(__DIR__.'/{lib}') + ->in(__DIR__.'/lib') ; return PhpCsFixer\Config::create() From 1ccfaa60a2a8801625fef174d870a6f5b736cbab Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Fri, 29 May 2020 12:05:55 +0200 Subject: [PATCH 10/16] DDBTEAM-498: Added code style --- lib/Api/CoverApi.php | 5 +---- lib/ApiException.php | 2 +- lib/Configuration.php | 2 +- lib/HeaderSelector.php | 3 +-- lib/Model/Cover.php | 4 ++-- lib/Model/ModelInterface.php | 2 +- lib/ObjectSerializer.php | 2 +- 7 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php index 124587b..1a52ae4 100644 --- a/lib/Api/CoverApi.php +++ b/lib/Api/CoverApi.php @@ -15,7 +15,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -151,7 +151,6 @@ public function getCoverCollectionWithHttpInfo($type, $identifiers, $sizes = nul } return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } @@ -306,10 +305,8 @@ protected function getCoverCollectionRequest($type, $identifiers, $sizes = null) } // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { $httpBody = \GuzzleHttp\json_encode($formParams); - } else { // for HTTP post (form) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); diff --git a/lib/ApiException.php b/lib/ApiException.php index 3edfe2d..d3532c6 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -15,7 +15,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/Configuration.php b/lib/Configuration.php index 1274279..3ab707c 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -15,7 +15,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index 242970f..7e8cdd0 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -15,7 +15,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -106,4 +106,3 @@ private function selectContentTypeHeader($contentType) } } } - diff --git a/lib/Model/Cover.php b/lib/Model/Cover.php index db01dac..1bec789 100644 --- a/lib/Model/Cover.php +++ b/lib/Model/Cover.php @@ -16,7 +16,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -163,7 +163,7 @@ public function getModelName() } const TYPE_PID = 'pid'; -const TYPE_ISBN = 'isbn'; + const TYPE_ISBN = 'isbn'; /** * Gets allowable values of the enum diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 7c622af..321baea 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -16,7 +16,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 1ced2af..f671b90 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -16,7 +16,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ From a207fe6ab7daa05aa93931f09dc8aadd3ac0705c Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Fri, 29 May 2020 21:30:52 +0200 Subject: [PATCH 11/16] DDBTEAM-498: Updated client based on newest API --- README.md | 3 ++- docs/Api/CoverApi.md | 9 ++++---- lib/Api/CoverApi.php | 55 ++++++++++++++++++++++++++++++++++++-------- 3 files changed, 53 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7f1de43..74bfe6a 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,8 @@ $identifiers = array("identifiers_example"); // string[] | A list of identifiers $sizes = array("sizes_example"); // string[] | A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. try { - $apiInstance->getCoverCollection($type, $identifiers, $sizes); + $result = $apiInstance->getCoverCollection($type, $identifiers, $sizes); + print_r($result); } catch (Exception $e) { echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; } diff --git a/docs/Api/CoverApi.md b/docs/Api/CoverApi.md index a26d192..7a5a627 100644 --- a/docs/Api/CoverApi.md +++ b/docs/Api/CoverApi.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**getCoverCollection**](CoverApi.md#getcovercollection) | **GET** /api/v2/covers | Search multiple covers # **getCoverCollection** -> getCoverCollection($type, $identifiers, $sizes) +> \CoverService\Model\Cover[] getCoverCollection($type, $identifiers, $sizes) Search multiple covers @@ -32,7 +32,8 @@ $identifiers = array("identifiers_example"); // string[] | A list of identifiers $sizes = array("sizes_example"); // string[] | A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. try { - $apiInstance->getCoverCollection($type, $identifiers, $sizes); + $result = $apiInstance->getCoverCollection($type, $identifiers, $sizes); + print_r($result); } catch (Exception $e) { echo 'Exception when calling CoverApi->getCoverCollection: ', $e->getMessage(), PHP_EOL; } @@ -49,7 +50,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**\CoverService\Model\Cover[]**](../Model/Cover.md) ### Authorization @@ -58,7 +59,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php index 1a52ae4..dcd0330 100644 --- a/lib/Api/CoverApi.php +++ b/lib/Api/CoverApi.php @@ -97,11 +97,12 @@ public function getConfig() * * @throws \CoverService\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return void + * @return \CoverService\Model\Cover[] */ public function getCoverCollection($type, $identifiers, $sizes = null) { - $this->getCoverCollectionWithHttpInfo($type, $identifiers, $sizes); + list($response) = $this->getCoverCollectionWithHttpInfo($type, $identifiers, $sizes); + return $response; } /** @@ -115,11 +116,11 @@ public function getCoverCollection($type, $identifiers, $sizes = null) * * @throws \CoverService\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \CoverService\Model\Cover[], HTTP status code, HTTP response headers (array of strings) */ public function getCoverCollectionWithHttpInfo($type, $identifiers, $sizes = null) { - $returnType = ''; + $returnType = '\CoverService\Model\Cover[]'; $request = $this->getCoverCollectionRequest($type, $identifiers, $sizes); try { @@ -150,9 +151,31 @@ public function getCoverCollectionWithHttpInfo($type, $identifiers, $sizes = nul ); } - return [null, $statusCode, $response->getHeaders()]; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if (!in_array($returnType, ['string','integer','bool'])) { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\CoverService\Model\Cover[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } @@ -194,14 +217,28 @@ function ($response) { */ public function getCoverCollectionAsyncWithHttpInfo($type, $identifiers, $sizes = null) { - $returnType = ''; + $returnType = '\CoverService\Model\Cover[]'; $request = $this->getCoverCollectionRequest($type, $identifiers, $sizes); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -277,11 +314,11 @@ protected function getCoverCollectionRequest($type, $identifiers, $sizes = null) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], + ['application/json'], [] ); } From bdfe67536c50da09f934d8090826ae8e6b7c7d07 Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Tue, 2 Jun 2020 10:14:10 +0200 Subject: [PATCH 12/16] DDBTEAM-473: Updated to match newest version --- README.md | 5 +- docs/Api/CoverApi.md | 4 +- docs/Model/Cover.md | 2 +- docs/Model/ImageUrl.md | 11 + lib/Api/CoverApi.php | 17 +- lib/ApiException.php | 4 +- lib/Configuration.php | 4 +- lib/HeaderSelector.php | 5 +- lib/Model/Cover.php | 12 +- lib/Model/ImageUrl.php | 387 +++++++++++++++++++++++++++++++++++ lib/Model/ModelInterface.php | 4 +- lib/ObjectSerializer.php | 4 +- 12 files changed, 431 insertions(+), 28 deletions(-) create mode 100644 docs/Model/ImageUrl.md create mode 100644 lib/Model/ImageUrl.php diff --git a/README.md b/README.md index 74bfe6a..9b66fd1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # -This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. +This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: @@ -67,7 +67,7 @@ $apiInstance = new CoverService\Api\CoverApi( $config ); $type = "type_example"; // string | The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' -$identifiers = array("identifiers_example"); // string[] | A list of identifiers of {type} +$identifiers = array("identifiers_example"); // string[] | A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200 $sizes = array("sizes_example"); // string[] | A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. try { @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description ## Documentation For Models - [Cover](docs/Model/Cover.md) + - [ImageUrl](docs/Model/ImageUrl.md) ## Documentation For Authorization diff --git a/docs/Api/CoverApi.md b/docs/Api/CoverApi.md index 7a5a627..ffb536b 100644 --- a/docs/Api/CoverApi.md +++ b/docs/Api/CoverApi.md @@ -28,7 +28,7 @@ $apiInstance = new CoverService\Api\CoverApi( $config ); $type = "type_example"; // string | The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' -$identifiers = array("identifiers_example"); // string[] | A list of identifiers of {type} +$identifiers = array("identifiers_example"); // string[] | A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200 $sizes = array("sizes_example"); // string[] | A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. try { @@ -45,7 +45,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **type** | **string**| The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' | - **identifiers** | [**string[]**](../Model/string.md)| A list of identifiers of {type} | + **identifiers** | [**string[]**](../Model/string.md)| A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200 | **sizes** | [**string[]**](../Model/string.md)| A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. | [optional] ### Return type diff --git a/docs/Model/Cover.md b/docs/Model/Cover.md index 62eaa6d..5abc59a 100644 --- a/docs/Model/Cover.md +++ b/docs/Model/Cover.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] **type** | **string** | | [optional] -**image_urls** | **string[]** | Get array of image urls. | [optional] +**image_urls** | [**\CoverService\Model\ImageUrl[]**](ImageUrl.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageUrl.md b/docs/Model/ImageUrl.md new file mode 100644 index 0000000..0ac2f47 --- /dev/null +++ b/docs/Model/ImageUrl.md @@ -0,0 +1,11 @@ +# ImageUrl + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **string** | | [optional] +**format** | **string** | | [optional] +**size** | **string** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php index dcd0330..6b69c54 100644 --- a/lib/Api/CoverApi.php +++ b/lib/Api/CoverApi.php @@ -12,10 +12,10 @@ /** * DDB Cover Service * - * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -92,7 +92,7 @@ public function getConfig() * Search multiple covers * * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) - * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $identifiers A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200 (required) * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * * @throws \CoverService\ApiException on non-2xx response @@ -111,7 +111,7 @@ public function getCoverCollection($type, $identifiers, $sizes = null) * Search multiple covers * * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) - * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $identifiers A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200 (required) * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * * @throws \CoverService\ApiException on non-2xx response @@ -166,6 +166,7 @@ public function getCoverCollectionWithHttpInfo($type, $identifiers, $sizes = nul $response->getStatusCode(), $response->getHeaders() ]; + } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -187,7 +188,7 @@ public function getCoverCollectionWithHttpInfo($type, $identifiers, $sizes = nul * Search multiple covers * * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) - * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $identifiers A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200 (required) * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * * @throws \InvalidArgumentException @@ -209,7 +210,7 @@ function ($response) { * Search multiple covers * * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) - * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $identifiers A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200 (required) * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * * @throws \InvalidArgumentException @@ -261,7 +262,7 @@ function ($exception) { * Create request for operation 'getCoverCollection' * * @param string $type The type of the identifier, i.e. 'isbn', 'faust', 'pid' or 'issn' (required) - * @param string[] $identifiers A list of identifiers of {type} (required) + * @param string[] $identifiers A list of identifiers of {type}. Maximum number os identifiers per reqeust is 200 (required) * @param string[] $sizes A list of image sizes (Cloudinary transformations) for the cover(s) you want to receive. (optional) * * @throws \InvalidArgumentException @@ -342,8 +343,10 @@ protected function getCoverCollectionRequest($type, $identifiers, $sizes = null) } // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { $httpBody = \GuzzleHttp\json_encode($formParams); + } else { // for HTTP post (form) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); diff --git a/lib/ApiException.php b/lib/ApiException.php index d3532c6..f10ad47 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -12,10 +12,10 @@ /** * DDB Cover Service * - * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/Configuration.php b/lib/Configuration.php index 3ab707c..ddf9a97 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -12,10 +12,10 @@ /** * DDB Cover Service * - * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index 7e8cdd0..f58377d 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -12,10 +12,10 @@ /** * DDB Cover Service * - * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -106,3 +106,4 @@ private function selectContentTypeHeader($contentType) } } } + diff --git a/lib/Model/Cover.php b/lib/Model/Cover.php index 1bec789..4eba1ba 100644 --- a/lib/Model/Cover.php +++ b/lib/Model/Cover.php @@ -13,10 +13,10 @@ /** * DDB Cover Service * - * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -58,7 +58,7 @@ class Cover implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'id' => 'string', 'type' => 'string', -'image_urls' => 'string[]' ]; +'image_urls' => '\CoverService\Model\ImageUrl[]' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -163,7 +163,7 @@ public function getModelName() } const TYPE_PID = 'pid'; - const TYPE_ISBN = 'isbn'; +const TYPE_ISBN = 'isbn'; /** * Gets allowable values of the enum @@ -289,7 +289,7 @@ public function setType($type) /** * Gets image_urls * - * @return string[] + * @return \CoverService\Model\ImageUrl[] */ public function getImageUrls() { @@ -299,7 +299,7 @@ public function getImageUrls() /** * Sets image_urls * - * @param string[] $image_urls Get array of image urls. + * @param \CoverService\Model\ImageUrl[] $image_urls image_urls * * @return $this */ diff --git a/lib/Model/ImageUrl.php b/lib/Model/ImageUrl.php new file mode 100644 index 0000000..23e7bce --- /dev/null +++ b/lib/Model/ImageUrl.php @@ -0,0 +1,387 @@ + 'string', +'format' => 'string', +'size' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'url' => 'url', +'format' => null, +'size' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', +'format' => 'format', +'size' => 'size' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', +'format' => 'setFormat', +'size' => 'setSize' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', +'format' => 'getFormat', +'size' => 'getSize' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const SIZE__DEFAULT = 'default'; +const SIZE_ORIGINAL = 'original'; +const SIZE_SMALL = 'small'; +const SIZE_MEDIUM = 'medium'; +const SIZE_LARGE = 'large'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSizeAllowableValues() + { + return [ + self::SIZE__DEFAULT, +self::SIZE_ORIGINAL, +self::SIZE_SMALL, +self::SIZE_MEDIUM, +self::SIZE_LARGE, ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['format'] = isset($data['format']) ? $data['format'] : null; + $this->container['size'] = isset($data['size']) ? $data['size'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getSizeAllowableValues(); + if (!is_null($this->container['size']) && !in_array($this->container['size'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'size', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url url + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets format + * + * @return string + */ + public function getFormat() + { + return $this->container['format']; + } + + /** + * Sets format + * + * @param string $format format + * + * @return $this + */ + public function setFormat($format) + { + $this->container['format'] = $format; + + return $this; + } + + /** + * Gets size + * + * @return string + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param string $size size + * + * @return $this + */ + public function setSize($size) + { + $allowedValues = $this->getSizeAllowableValues(); + if (!is_null($size) && !in_array($size, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'size', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['size'] = $size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 321baea..8d8d4a6 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -13,10 +13,10 @@ /** * DDB Cover Service * - * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index f671b90..fed45c7 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -13,10 +13,10 @@ /** * DDB Cover Service * - * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * Pagination: not implemented. + * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ From 99555c7bd8305fe724e33707110eea64e9d6cb66 Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Tue, 2 Jun 2020 13:05:38 +0200 Subject: [PATCH 13/16] DDBTEAM-499: Applied automatically code style fixes --- lib/Api/CoverApi.php | 5 +---- lib/ApiException.php | 2 +- lib/Configuration.php | 2 +- lib/HeaderSelector.php | 3 +-- lib/Model/Cover.php | 4 ++-- lib/Model/ImageUrl.php | 10 +++++----- lib/Model/ModelInterface.php | 2 +- lib/ObjectSerializer.php | 2 +- phpcs.xml.dist | 12 ++++++++++++ 9 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 phpcs.xml.dist diff --git a/lib/Api/CoverApi.php b/lib/Api/CoverApi.php index 6b69c54..4608dac 100644 --- a/lib/Api/CoverApi.php +++ b/lib/Api/CoverApi.php @@ -15,7 +15,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -166,7 +166,6 @@ public function getCoverCollectionWithHttpInfo($type, $identifiers, $sizes = nul $response->getStatusCode(), $response->getHeaders() ]; - } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -343,10 +342,8 @@ protected function getCoverCollectionRequest($type, $identifiers, $sizes = null) } // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { $httpBody = \GuzzleHttp\json_encode($formParams); - } else { // for HTTP post (form) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); diff --git a/lib/ApiException.php b/lib/ApiException.php index f10ad47..93cf873 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -15,7 +15,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/Configuration.php b/lib/Configuration.php index ddf9a97..85e123c 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -15,7 +15,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index f58377d..3fb45c8 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -15,7 +15,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -106,4 +106,3 @@ private function selectContentTypeHeader($contentType) } } } - diff --git a/lib/Model/Cover.php b/lib/Model/Cover.php index 4eba1ba..faa268e 100644 --- a/lib/Model/Cover.php +++ b/lib/Model/Cover.php @@ -16,7 +16,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -163,7 +163,7 @@ public function getModelName() } const TYPE_PID = 'pid'; -const TYPE_ISBN = 'isbn'; + const TYPE_ISBN = 'isbn'; /** * Gets allowable values of the enum diff --git a/lib/Model/ImageUrl.php b/lib/Model/ImageUrl.php index 23e7bce..49da7dd 100644 --- a/lib/Model/ImageUrl.php +++ b/lib/Model/ImageUrl.php @@ -16,7 +16,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -163,10 +163,10 @@ public function getModelName() } const SIZE__DEFAULT = 'default'; -const SIZE_ORIGINAL = 'original'; -const SIZE_SMALL = 'small'; -const SIZE_MEDIUM = 'medium'; -const SIZE_LARGE = 'large'; + const SIZE_ORIGINAL = 'original'; + const SIZE_SMALL = 'small'; + const SIZE_MEDIUM = 'medium'; + const SIZE_LARGE = 'large'; /** * Gets allowable values of the enum diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 8d8d4a6..f16a2f5 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -16,7 +16,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index fed45c7..ba08b17 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -16,7 +16,7 @@ * This service provides covers for library materials indexed by isbn, issn, faust, pid. The service is provided by [Danskernes Digitale Bibliotek](https://www.danskernesdigitalebibliotek.dk/) ### Authentication notes Authentication is done via OAuth2 against auth.dbc.dk. To obtain a valid token follow instructions in [1.2. Password Grant](https://github.com/DBCDK/hejmdal/blob/master/docs/oauth2.md#12-password-grant). To use the \"Authorize\" option in this tool use your 'client_id' and 'client_secret' and fill in '@' for both username and password. ### Implementation notes Currently the API is not fully implemented. The following features are missing: * Generic Covers: parameter is currently ignored. Service doesn't yet provide generic covers. * * OpenAPI spec version: 2.0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..cc3f85f --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,12 @@ + + + The coding standard. + + lib/ + + + + + * + + From f02d2b153dd4e0e580514b3609231c06226983c7 Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Tue, 2 Jun 2020 13:23:24 +0200 Subject: [PATCH 14/16] DDBTEAM-499: Fixed indentions --- .php_cs | 18 ------------------ .php_cs.dist | 1 + lib/Model/Cover.php | 22 +++++++++++----------- lib/Model/ImageUrl.php | 28 ++++++++++++++-------------- 4 files changed, 26 insertions(+), 43 deletions(-) delete mode 100644 .php_cs diff --git a/.php_cs b/.php_cs deleted file mode 100644 index 6b8e23c..0000000 --- a/.php_cs +++ /dev/null @@ -1,18 +0,0 @@ -level(Symfony\CS\FixerInterface::PSR2_LEVEL) - ->setUsingCache(true) - ->fixers( - [ - 'ordered_use', - 'phpdoc_order', - 'short_array_syntax', - 'strict', - 'strict_param' - ] - ) - ->finder( - Symfony\CS\Finder\DefaultFinder::create() - ->in(__DIR__) - ); diff --git a/.php_cs.dist b/.php_cs.dist index 7728963..da5bda9 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -10,5 +10,6 @@ return PhpCsFixer\Config::create() 'phpdoc_align' => false, 'no_superfluous_phpdoc_tags' => false, 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, ]) ->setFinder($finder); diff --git a/lib/Model/Cover.php b/lib/Model/Cover.php index faa268e..7e6337b 100644 --- a/lib/Model/Cover.php +++ b/lib/Model/Cover.php @@ -57,8 +57,8 @@ class Cover implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'id' => 'string', -'type' => 'string', -'image_urls' => '\CoverService\Model\ImageUrl[]' ]; + 'type' => 'string', + 'image_urls' => '\CoverService\Model\ImageUrl[]' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -67,8 +67,8 @@ class Cover implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'id' => null, -'type' => null, -'image_urls' => null ]; + 'type' => null, + 'image_urls' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -98,8 +98,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'id' => 'id', -'type' => 'type', -'image_urls' => 'imageUrls' ]; + 'type' => 'type', + 'image_urls' => 'imageUrls' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -108,8 +108,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'id' => 'setId', -'type' => 'setType', -'image_urls' => 'setImageUrls' ]; + 'type' => 'setType', + 'image_urls' => 'setImageUrls' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -118,8 +118,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'id' => 'getId', -'type' => 'getType', -'image_urls' => 'getImageUrls' ]; + 'type' => 'getType', + 'image_urls' => 'getImageUrls' ]; /** * Array of attributes where the key is the local name, @@ -174,7 +174,7 @@ public function getTypeAllowableValues() { return [ self::TYPE_PID, -self::TYPE_ISBN, ]; + self::TYPE_ISBN, ]; } /** diff --git a/lib/Model/ImageUrl.php b/lib/Model/ImageUrl.php index 49da7dd..1a136fc 100644 --- a/lib/Model/ImageUrl.php +++ b/lib/Model/ImageUrl.php @@ -57,8 +57,8 @@ class ImageUrl implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'url' => 'string', -'format' => 'string', -'size' => 'string' ]; + 'format' => 'string', + 'size' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -67,8 +67,8 @@ class ImageUrl implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'url' => 'url', -'format' => null, -'size' => null ]; + 'format' => null, + 'size' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -98,8 +98,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'url' => 'url', -'format' => 'format', -'size' => 'size' ]; + 'format' => 'format', + 'size' => 'size' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -108,8 +108,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'url' => 'setUrl', -'format' => 'setFormat', -'size' => 'setSize' ]; + 'format' => 'setFormat', + 'size' => 'setSize' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -118,8 +118,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'url' => 'getUrl', -'format' => 'getFormat', -'size' => 'getSize' ]; + 'format' => 'getFormat', + 'size' => 'getSize' ]; /** * Array of attributes where the key is the local name, @@ -177,10 +177,10 @@ public function getSizeAllowableValues() { return [ self::SIZE__DEFAULT, -self::SIZE_ORIGINAL, -self::SIZE_SMALL, -self::SIZE_MEDIUM, -self::SIZE_LARGE, ]; + self::SIZE_ORIGINAL, + self::SIZE_SMALL, + self::SIZE_MEDIUM, + self::SIZE_LARGE, ]; } /** From 530e634f16f50e78c94246f12a2f6d3a2e852d65 Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Tue, 2 Jun 2020 13:26:37 +0200 Subject: [PATCH 15/16] DDBTEAM-499: Added php-cs-fix to build script --- generate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generate.sh b/generate.sh index 44b92be..d8a82d6 100755 --- a/generate.sh +++ b/generate.sh @@ -3,5 +3,6 @@ set -eu java -DapiTests=false -DmodelTests=false -jar /usr/local/opt/swagger-codegen/libexec/swagger-codegen-cli.jar generate -i $1 -l php --config config.json --output "." - rm -rf .swagger-codegen + +composer run apply-coding-standards/php-cs-fixer From e1eb9e6ff385f6bdfdf9fb9dc95e78c7a0b5b10e Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Tue, 2 Jun 2020 14:51:33 +0200 Subject: [PATCH 16/16] DDBTEAM-499: Updated php-cs-fix code style --- .php_cs.dist | 1 + lib/Model/Cover.php | 10 +++++----- lib/Model/ImageUrl.php | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.php_cs.dist b/.php_cs.dist index da5bda9..e4f9f2b 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -11,5 +11,6 @@ return PhpCsFixer\Config::create() 'no_superfluous_phpdoc_tags' => false, 'array_syntax' => ['syntax' => 'short'], 'array_indentation' => true, + 'trim_array_spaces' => true, ]) ->setFinder($finder); diff --git a/lib/Model/Cover.php b/lib/Model/Cover.php index 7e6337b..8f4d85d 100644 --- a/lib/Model/Cover.php +++ b/lib/Model/Cover.php @@ -58,7 +58,7 @@ class Cover implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'id' => 'string', 'type' => 'string', - 'image_urls' => '\CoverService\Model\ImageUrl[]' ]; + 'image_urls' => '\CoverService\Model\ImageUrl[]']; /** * Array of property to format mappings. Used for (de)serialization @@ -68,7 +68,7 @@ class Cover implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'id' => null, 'type' => null, - 'image_urls' => null ]; + 'image_urls' => null]; /** * Array of property to type mappings. Used for (de)serialization @@ -99,7 +99,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'id' => 'id', 'type' => 'type', - 'image_urls' => 'imageUrls' ]; + 'image_urls' => 'imageUrls']; /** * Array of attributes to setter functions (for deserialization of responses) @@ -109,7 +109,7 @@ public static function swaggerFormats() protected static $setters = [ 'id' => 'setId', 'type' => 'setType', - 'image_urls' => 'setImageUrls' ]; + 'image_urls' => 'setImageUrls']; /** * Array of attributes to getter functions (for serialization of requests) @@ -119,7 +119,7 @@ public static function swaggerFormats() protected static $getters = [ 'id' => 'getId', 'type' => 'getType', - 'image_urls' => 'getImageUrls' ]; + 'image_urls' => 'getImageUrls']; /** * Array of attributes where the key is the local name, diff --git a/lib/Model/ImageUrl.php b/lib/Model/ImageUrl.php index 1a136fc..0a94d7b 100644 --- a/lib/Model/ImageUrl.php +++ b/lib/Model/ImageUrl.php @@ -58,7 +58,7 @@ class ImageUrl implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'url' => 'string', 'format' => 'string', - 'size' => 'string' ]; + 'size' => 'string']; /** * Array of property to format mappings. Used for (de)serialization @@ -68,7 +68,7 @@ class ImageUrl implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'url' => 'url', 'format' => null, - 'size' => null ]; + 'size' => null]; /** * Array of property to type mappings. Used for (de)serialization @@ -99,7 +99,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'url' => 'url', 'format' => 'format', - 'size' => 'size' ]; + 'size' => 'size']; /** * Array of attributes to setter functions (for deserialization of responses) @@ -109,7 +109,7 @@ public static function swaggerFormats() protected static $setters = [ 'url' => 'setUrl', 'format' => 'setFormat', - 'size' => 'setSize' ]; + 'size' => 'setSize']; /** * Array of attributes to getter functions (for serialization of requests) @@ -119,7 +119,7 @@ public static function swaggerFormats() protected static $getters = [ 'url' => 'getUrl', 'format' => 'getFormat', - 'size' => 'getSize' ]; + 'size' => 'getSize']; /** * Array of attributes where the key is the local name,