diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..3151aa3 --- /dev/null +++ b/.php_cs @@ -0,0 +1,14 @@ +in(__DIR__ . '/src') + ->in(__DIR__ . '/tests') +; + +return PhpCsFixer\Config::create() + ->setUsingCache(false) + ->setRules([ + '@PSR2' => true, + ]) + ->setFinder($finder) +; diff --git a/.travis.yml b/.travis.yml index c69e7dc..9c0cb34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,5 @@ install: - travis_retry composer install --no-interaction --prefer-source script: - - composer test \ No newline at end of file + - make lint + - make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..04cde88 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +THIS := $(realpath $(lastword $(MAKEFILE_LIST))) +HERE := $(shell dirname $(THIS)) + +.PHONY: all fix lint test + +all: lint test + +fix: + php $(HERE)/vendor/bin/php-cs-fixer fix --config=$(HERE)/.php_cs + +lint: + php $(HERE)/vendor/bin/php-cs-fixer fix --config=$(HERE)/.php_cs --dry-run + +test: + php $(HERE)/vendor/bin/phpunit --configuration $(HERE)/phpunit.xml diff --git a/composer.json b/composer.json index f408a31..6fed1ff 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,8 @@ "require": { "guzzlehttp/guzzle": "^6.2.2", "php": ">=7.0.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "friendsofphp/php-cs-fixer": "^2.6" }, "require-dev": { "phpunit/phpunit": "5.7.5", @@ -22,8 +23,5 @@ "psr-4": { "Cloudflare\\API\\": "src/" } - }, - "scripts": { - "test": "phpunit" } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index e34fe8c..0000000 --- a/composer.lock +++ /dev/null @@ -1,1826 +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#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "533c8c88c144b1b6e504f0516bb32484", - "content-hash": "d281226d284be3cf32b714f95ea517e2", - "packages": [ - { - "name": "guzzlehttp/guzzle", - "version": "6.2.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60", - "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.3.1", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "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": "2016-10-08 15:01:37" - }, - { - "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-20 10:07:11" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-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" - } - ], - "description": "PSR-7 message implementation", - "keywords": [ - "http", - "message", - "stream", - "uri" - ], - "time": "2016-06-24 23:00:38" - }, - { - "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-06 14:39:51" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.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://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "myclabs/deep-copy", - "version": "1.5.5", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/399c1f9781e222f6eb6cc238796f5200d1b7f108", - "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2016-10-31 17:19:45" - }, - { - "name": "pdepend/pdepend", - "version": "2.4.1", - "source": { - "type": "git", - "url": "https://github.com/pdepend/pdepend.git", - "reference": "3acfa4fcadbb8b65b8b2ec077408c5ef0e112e68" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/3acfa4fcadbb8b65b8b2ec077408c5ef0e112e68", - "reference": "3acfa4fcadbb8b65b8b2ec077408c5ef0e112e68", - "shasum": "" - }, - "require": { - "php": ">=5.3.7", - "symfony/config": "^2.3.0|^3", - "symfony/dependency-injection": "^2.3.0|^3", - "symfony/filesystem": "^2.3.0|^3" - }, - "require-dev": { - "phpunit/phpunit": "^4.4.0,<4.8", - "squizlabs/php_codesniffer": "^2.0.0" - }, - "bin": [ - "src/bin/pdepend" - ], - "type": "library", - "autoload": { - "psr-4": { - "PDepend\\": "src/main/php/PDepend" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Official version of pdepend to be handled with Composer", - "time": "2017-01-11 16:15:35" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.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": "2015-12-27 11:43:31" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.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" - } - ], - "time": "2016-11-25 06:54:22" - }, - { - "name": "phpmd/phpmd", - "version": "2.5.0", - "source": { - "type": "git", - "url": "https://github.com/phpmd/phpmd.git", - "reference": "9298602a922cd8c46666df8d540a60bc5925ce55" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/9298602a922cd8c46666df8d540a60bc5925ce55", - "reference": "9298602a922cd8c46666df8d540a60bc5925ce55", - "shasum": "" - }, - "require": { - "pdepend/pdepend": "^2.0.4", - "php": ">=5.3.9" - }, - "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.0" - }, - "bin": [ - "src/bin/phpmd" - ], - "type": "project", - "autoload": { - "psr-0": { - "PHPMD\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Manuel Pichler", - "email": "github@manuel-pichler.de", - "homepage": "https://github.com/manuelpichler", - "role": "Project Founder" - }, - { - "name": "Other contributors", - "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", - "role": "Contributors" - }, - { - "name": "Marc Würth", - "email": "ravage@bluewin.ch", - "homepage": "https://github.com/ravage84", - "role": "Project Maintainer" - } - ], - "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", - "homepage": "http://phpmd.org/", - "keywords": [ - "mess detection", - "mess detector", - "pdepend", - "phpmd", - "pmd" - ], - "time": "2016-11-23 20:33:32" - }, - { - "name": "phpspec/prophecy", - "version": "v1.6.2", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", - "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0|^2.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.0", - "phpunit/phpunit": "^4.8 || ^5.6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "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": "2016-11-21 14:58:47" - }, - { - "name": "phpunit/php-code-coverage", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c14196e64a78570034afd0b7a9f3757ba71c2a0a", - "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "^1.4.2", - "sebastian/code-unit-reverse-lookup": "~1.0", - "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "~1.0|~2.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "^5.4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.4.0", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0.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": "2016-12-20 15:22:42" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "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": "2016-10-03 07:40:28" - }, - { - "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-21 13:50:34" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4|~5" - }, - "type": "library", - "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": "2016-05-12 18:03:57" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", - "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", - "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": "2016-11-15 14:06:22" - }, - { - "name": "phpunit/phpunit", - "version": "5.7.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "50fd2be8f3e23e91da825f36f08e5f9633076ffe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50fd2be8f3e23e91da825f36f08e5f9633076ffe", - "reference": "50fd2be8f3e23e91da825f36f08e5f9633076ffe", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.6.2", - "phpunit/php-code-coverage": "^4.0.3", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "^1.3.4 || ^2.0", - "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.0 || ^2.0", - "sebastian/object-enumerator": "~2.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0|~2.0", - "symfony/yaml": "~2.1|~3.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.7.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": "2016-12-28 07:18:51" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "3.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" - }, - "conflict": { - "phpunit/phpunit": "<5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.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": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2016-12-08 20:27:08" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "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": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13 06:45:14" - }, - { - "name": "sebastian/comparator", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f", - "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f", - "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": "2016-11-19 09:18:40" - }, - { - "name": "sebastian/diff", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "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": "2015-12-08 07:14:41" - }, - { - "name": "sebastian/environment", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "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-11-26 07:53:53" - }, - { - "name": "sebastian/exporter", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~2.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "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-11-19 08:54:04" - }, - { - "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-12 03:26:01" - }, - { - "name": "sebastian/object-enumerator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35", - "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-11-19 07:35:10" - }, - { - "name": "sebastian/recursion-context", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "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-11-19 07:33:16" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "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": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "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": "2016-10-03 07:35:21" - }, - { - "name": "symfony/config", - "version": "v3.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "c5ea878b5a7f6a01b9a2f182f905831711b9ff3f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/c5ea878b5a7f6a01b9a2f182f905831711b9ff3f", - "reference": "c5ea878b5a7f6a01b9a2f182f905831711b9ff3f", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" - }, - "require-dev": { - "symfony/yaml": "~3.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "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 Config Component", - "homepage": "https://symfony.com", - "time": "2017-01-02 20:32:22" - }, - { - "name": "symfony/dependency-injection", - "version": "v3.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "22b2c97cffc6a612db82084f9e7823b095958751" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/22b2c97cffc6a612db82084f9e7823b095958751", - "reference": "22b2c97cffc6a612db82084f9e7823b095958751", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "conflict": { - "symfony/yaml": "<3.2" - }, - "require-dev": { - "symfony/config": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/yaml": "~3.2" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "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 DependencyInjection Component", - "homepage": "https://symfony.com", - "time": "2017-01-10 14:21:25" - }, - { - "name": "symfony/filesystem", - "version": "v3.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "a0c6ef2dc78d33b58d91d3a49f49797a184d06f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/a0c6ef2dc78d33b58d91d3a49f49797a184d06f4", - "reference": "a0c6ef2dc78d33b58d91d3a49f49797a184d06f4", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-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": "2017-01-08 20:47:33" - }, - { - "name": "symfony/yaml", - "version": "v3.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "50eadbd7926e31842893c957eca362b21592a97d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/50eadbd7926e31842893c957eca362b21592a97d", - "reference": "50eadbd7926e31842893c957eca362b21592a97d", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-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", - "time": "2017-01-03 13:51:32" - }, - { - "name": "webmozart/assert", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2016-11-23 20:04:58" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "phpmd/phpmd": 0 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=7.0.0" - }, - "platform-dev": [] -} diff --git a/src/Adapter/Adapter.php b/src/Adapter/Adapter.php index b8416dd..9c4775e 100644 --- a/src/Adapter/Adapter.php +++ b/src/Adapter/Adapter.php @@ -72,4 +72,4 @@ interface Adapter * @return mixed */ public function delete(String $uri, array $headers, array $body): ResponseInterface; -} \ No newline at end of file +} diff --git a/src/Adapter/Guzzle.php b/src/Adapter/Guzzle.php index 84e4222..aa858ba 100644 --- a/src/Adapter/Guzzle.php +++ b/src/Adapter/Guzzle.php @@ -7,7 +7,6 @@ namespace Cloudflare\API\Adapter; - use Cloudflare\API\Auth\Auth; use GuzzleHttp\Client; use Psr\Http\Message\ResponseInterface; @@ -44,7 +43,6 @@ class Guzzle implements Adapter $this->checkError($response); return $response; - } /** @@ -52,7 +50,9 @@ class Guzzle implements Adapter */ public function post(String $uri, array $headers = array(), array $body = array()): ResponseInterface { - $response = $this->client->post($uri, [ + $response = $this->client->post( + $uri, + [ 'headers' => $headers, 'json' => $body ] @@ -69,7 +69,9 @@ class Guzzle implements Adapter { $jsonBody = json_encode($body); - $response = $this->client->put($uri, [ + $response = $this->client->put( + $uri, + [ 'headers' => $headers, 'json' => $jsonBody ] @@ -86,7 +88,9 @@ class Guzzle implements Adapter { $jsonBody = json_encode($body); - $response = $this->client->patch($uri, [ + $response = $this->client->patch( + $uri, + [ 'headers' => $headers, 'json' => $jsonBody ] @@ -101,7 +105,9 @@ class Guzzle implements Adapter */ public function delete(String $uri, array $headers = array(), array $body = array()): ResponseInterface { - $response = $this->client->delete($uri, [ + $response = $this->client->delete( + $uri, + [ 'headers' => $headers, 'json' => $body ] diff --git a/src/Adapter/JSONException.php b/src/Adapter/JSONException.php index 34ee75e..e9da7e4 100644 --- a/src/Adapter/JSONException.php +++ b/src/Adapter/JSONException.php @@ -8,8 +8,6 @@ namespace Cloudflare\API\Adapter; - class JSONException extends \Exception { - -} \ No newline at end of file +} diff --git a/src/Adapter/ResponseException.php b/src/Adapter/ResponseException.php index 845a6dd..22c01d4 100644 --- a/src/Adapter/ResponseException.php +++ b/src/Adapter/ResponseException.php @@ -8,8 +8,6 @@ namespace Cloudflare\API\Adapter; - class ResponseException extends \Exception { - -} \ No newline at end of file +} diff --git a/src/Auth/APIKey.php b/src/Auth/APIKey.php index aa52406..ddfb1ac 100644 --- a/src/Auth/APIKey.php +++ b/src/Auth/APIKey.php @@ -7,7 +7,6 @@ namespace Cloudflare\API\Auth; - class APIKey implements Auth { private $email; @@ -26,4 +25,4 @@ class APIKey implements Auth 'X-Auth-Key' => $this->apiKey ]; } -} \ No newline at end of file +} diff --git a/src/Auth/Auth.php b/src/Auth/Auth.php index e22faaa..55cead8 100644 --- a/src/Auth/Auth.php +++ b/src/Auth/Auth.php @@ -7,8 +7,7 @@ namespace Cloudflare\API\Auth; - interface Auth { public function getHeaders(): array; -} \ No newline at end of file +} diff --git a/src/Auth/None.php b/src/Auth/None.php index aa203e3..0c8efd5 100644 --- a/src/Auth/None.php +++ b/src/Auth/None.php @@ -8,11 +8,10 @@ namespace Cloudflare\API\Auth; - class None implements Auth { public function getHeaders(): array { return []; } -} \ No newline at end of file +} diff --git a/src/Auth/UserServiceKey.php b/src/Auth/UserServiceKey.php index fcc4f14..7f07d8b 100644 --- a/src/Auth/UserServiceKey.php +++ b/src/Auth/UserServiceKey.php @@ -7,7 +7,6 @@ namespace Cloudflare\API\Auth; - class UserServiceKey implements Auth { private $userServiceKey; @@ -23,4 +22,4 @@ class UserServiceKey implements Auth 'X-Auth-User-Service-Key' => $this->userServiceKey, ]; } -} \ No newline at end of file +} diff --git a/src/Configurations/Configurations.php b/src/Configurations/Configurations.php index bdcbdb2..ba20907 100644 --- a/src/Configurations/Configurations.php +++ b/src/Configurations/Configurations.php @@ -8,8 +8,7 @@ namespace Cloudflare\API\Configurations; - interface Configurations { public function getArray(): array; -} \ No newline at end of file +} diff --git a/src/Configurations/ConfigurationsException.php b/src/Configurations/ConfigurationsException.php index ece1687..23aade6 100644 --- a/src/Configurations/ConfigurationsException.php +++ b/src/Configurations/ConfigurationsException.php @@ -8,8 +8,6 @@ namespace Cloudflare\API\Configurations; - class ConfigurationsException extends \Exception { - -} \ No newline at end of file +} diff --git a/src/Configurations/PageRulesActions.php b/src/Configurations/PageRulesActions.php index b1cbcb0..931fc17 100644 --- a/src/Configurations/PageRulesActions.php +++ b/src/Configurations/PageRulesActions.php @@ -366,4 +366,4 @@ class PageRulesActions implements Configurations { return $this->configs; } -} \ No newline at end of file +} diff --git a/src/Configurations/PageRulesTargets.php b/src/Configurations/PageRulesTargets.php index 24c43a2..82d9777 100644 --- a/src/Configurations/PageRulesTargets.php +++ b/src/Configurations/PageRulesTargets.php @@ -8,7 +8,6 @@ namespace Cloudflare\API\Configurations; - class PageRulesTargets implements Configurations { private $targets; @@ -28,4 +27,4 @@ class PageRulesTargets implements Configurations { return $this->targets; } -} \ No newline at end of file +} diff --git a/src/Configurations/UARules.php b/src/Configurations/UARules.php index d7e989b..3bed629 100644 --- a/src/Configurations/UARules.php +++ b/src/Configurations/UARules.php @@ -8,7 +8,6 @@ namespace Cloudflare\API\Configurations; - class UARules implements Configurations { private $configs = array(); @@ -26,4 +25,4 @@ class UARules implements Configurations { return $this->configs; } -} \ No newline at end of file +} diff --git a/src/Configurations/ZoneLockdown.php b/src/Configurations/ZoneLockdown.php index c4d6da3..644bde4 100644 --- a/src/Configurations/ZoneLockdown.php +++ b/src/Configurations/ZoneLockdown.php @@ -8,7 +8,6 @@ namespace Cloudflare\API\Configurations; - class ZoneLockdown implements Configurations { private $configs = array(); @@ -35,4 +34,4 @@ class ZoneLockdown implements Configurations { return $this->configs; } -} \ No newline at end of file +} diff --git a/src/Endpoints/API.php b/src/Endpoints/API.php index ebcaab0..113075f 100644 --- a/src/Endpoints/API.php +++ b/src/Endpoints/API.php @@ -7,10 +7,9 @@ namespace Cloudflare\API\Endpoints; - use Cloudflare\API\Adapter\Adapter; interface API { public function __construct(Adapter $adapter); -} \ No newline at end of file +} diff --git a/src/Endpoints/DNS.php b/src/Endpoints/DNS.php index 06cedae..9adb9aa 100644 --- a/src/Endpoints/DNS.php +++ b/src/Endpoints/DNS.php @@ -121,5 +121,4 @@ class DNS implements API return false; } - -} \ No newline at end of file +} diff --git a/src/Endpoints/EndpointException.php b/src/Endpoints/EndpointException.php index 92b0671..2855e00 100644 --- a/src/Endpoints/EndpointException.php +++ b/src/Endpoints/EndpointException.php @@ -8,8 +8,6 @@ namespace Cloudflare\API\Endpoints; - class EndpointException extends \Exception { - -} \ No newline at end of file +} diff --git a/src/Endpoints/IPs.php b/src/Endpoints/IPs.php index 0745907..0ce79c0 100644 --- a/src/Endpoints/IPs.php +++ b/src/Endpoints/IPs.php @@ -8,7 +8,6 @@ namespace Cloudflare\API\Endpoints; - use Cloudflare\API\Adapter\Adapter; class IPs implements API @@ -20,10 +19,11 @@ class IPs implements API $this->adapter = $adapter; } - public function listIPs(): \stdClass { + public function listIPs(): \stdClass + { $ips = $this->adapter->get('ips', [], []); $body = json_decode($ips->getBody()); return $body->result; } -} \ No newline at end of file +} diff --git a/src/Endpoints/PageRules.php b/src/Endpoints/PageRules.php index fe6c7e0..d171c61 100644 --- a/src/Endpoints/PageRules.php +++ b/src/Endpoints/PageRules.php @@ -8,7 +8,6 @@ namespace Cloudflare\API\Endpoints; - use Cloudflare\API\Adapter\Adapter; use Cloudflare\API\Configurations\PageRulesActions; use Cloudflare\API\Configurations\PageRulesTargets; @@ -146,4 +145,4 @@ class PageRules implements API return false; } -} \ No newline at end of file +} diff --git a/src/Endpoints/UARules.php b/src/Endpoints/UARules.php index 698fd71..8741eab 100644 --- a/src/Endpoints/UARules.php +++ b/src/Endpoints/UARules.php @@ -46,7 +46,6 @@ class UARules implements API string $id = null, string $description = null ): bool { - $options = [ 'mode' => $mode, 'configurations' => $configuration->getArray() @@ -85,7 +84,6 @@ class UARules implements API \Cloudflare\API\Configurations\UARules $configuration, string $description = null ): bool { - $options = [ 'mode' => $mode, 'id' => $ruleID, @@ -119,4 +117,4 @@ class UARules implements API return false; } -} \ No newline at end of file +} diff --git a/src/Endpoints/User.php b/src/Endpoints/User.php index 0ee5dd0..1be88ff 100644 --- a/src/Endpoints/User.php +++ b/src/Endpoints/User.php @@ -7,7 +7,6 @@ namespace Cloudflare\API\Endpoints; - use Cloudflare\API\Adapter\Adapter; class User implements API @@ -41,4 +40,4 @@ class User implements API $response = $this->adapter->patch("user", [], $details); return json_decode($response->getBody()); } -} \ No newline at end of file +} diff --git a/src/Endpoints/ZoneLockdown.php b/src/Endpoints/ZoneLockdown.php index 0aba048..985d232 100644 --- a/src/Endpoints/ZoneLockdown.php +++ b/src/Endpoints/ZoneLockdown.php @@ -46,7 +46,6 @@ class ZoneLockdown implements API string $id = null, string $description = null ): bool { - $options = [ 'urls' => $urls, 'configurations' => $configuration->getArray() @@ -85,7 +84,6 @@ class ZoneLockdown implements API \Cloudflare\API\Configurations\ZoneLockdown $configuration, string $description = null ): bool { - $options = [ 'urls' => $urls, 'id' => $lockdownID, @@ -119,4 +117,4 @@ class ZoneLockdown implements API return false; } -} \ No newline at end of file +} diff --git a/tests/Adapter/GuzzleTest.php b/tests/Adapter/GuzzleTest.php index f5e21a8..2ef16e6 100644 --- a/tests/Adapter/GuzzleTest.php +++ b/tests/Adapter/GuzzleTest.php @@ -63,8 +63,11 @@ class GuzzleTest extends PHPUnit_Framework_TestCase public function testPatch() { - $response = $this->client->patch('https://httpbin.org/patch', [], - ['X-Patch-Test' => 'Testing a PATCH request.']); + $response = $this->client->patch( + 'https://httpbin.org/patch', + [], + ['X-Patch-Test' => 'Testing a PATCH request.'] + ); $headers = $response->getHeaders(); $this->assertEquals("application/json", $headers["Content-Type"][0]); @@ -75,8 +78,11 @@ class GuzzleTest extends PHPUnit_Framework_TestCase public function testDelete() { - $response = $this->client->delete('https://httpbin.org/delete', [], - ['X-Delete-Test' => 'Testing a DELETE request.']); + $response = $this->client->delete( + 'https://httpbin.org/delete', + [], + ['X-Delete-Test' => 'Testing a DELETE request.'] + ); $headers = $response->getHeaders(); $this->assertEquals("application/json", $headers["Content-Type"][0]); @@ -124,9 +130,9 @@ class GuzzleTest extends PHPUnit_Framework_TestCase $method->invokeArgs($this->client, [$response]); } - public function testNotFound() { + public function testNotFound() + { $this->expectException(\GuzzleHttp\Exception\RequestException::class); $response = $this->client->get('https://httpbin.org/status/404'); - } } diff --git a/tests/Auth/APIKeyTest.php b/tests/Auth/APIKeyTest.php index 355d071..35ea509 100644 --- a/tests/Auth/APIKeyTest.php +++ b/tests/Auth/APIKeyTest.php @@ -19,6 +19,5 @@ class APIKeyTest extends PHPUnit_Framework_TestCase $this->assertEquals('1234567893feefc5f0q5000bfo0c38d90bbeb', $headers['X-Auth-Key']); $this->assertEquals(2, sizeof($headers)); - } } diff --git a/tests/Auth/UserServiceKeyTest.php b/tests/Auth/UserServiceKeyTest.php index b0a367d..10955c4 100644 --- a/tests/Auth/UserServiceKeyTest.php +++ b/tests/Auth/UserServiceKeyTest.php @@ -14,10 +14,11 @@ class UserServiceKeyTest extends PHPUnit_Framework_TestCase $this->assertArrayHasKey('X-Auth-User-Service-Key', $headers); - $this->assertEquals('v1.0-e24fd090c02efcfecb4de8f4ff246fd5c75b48946fdf0ce26c59f91d0d90797b-cfa33fe60e8e34073c149323454383fc9005d25c9b4c502c2f063457ef65322eade065975001a0b4b4c591c5e1bd36a6e8f7e2d4fa8a9ec01c64c041e99530c2-07b9efe0acd78c82c8d9c690aacb8656d81c369246d7f996a205fe3c18e9254a', - $headers['X-Auth-User-Service-Key']); + $this->assertEquals( + 'v1.0-e24fd090c02efcfecb4de8f4ff246fd5c75b48946fdf0ce26c59f91d0d90797b-cfa33fe60e8e34073c149323454383fc9005d25c9b4c502c2f063457ef65322eade065975001a0b4b4c591c5e1bd36a6e8f7e2d4fa8a9ec01c64c041e99530c2-07b9efe0acd78c82c8d9c690aacb8656d81c369246d7f996a205fe3c18e9254a', + $headers['X-Auth-User-Service-Key'] + ); $this->assertEquals(1, sizeof($headers)); - } } diff --git a/tests/Configurations/ConfigurationsUARulesTest.php b/tests/Configurations/ConfigurationsUARulesTest.php index 2ee461e..529e84d 100644 --- a/tests/Configurations/ConfigurationsUARulesTest.php +++ b/tests/Configurations/ConfigurationsUARulesTest.php @@ -19,7 +19,9 @@ class ConfigurationsUARulesTest extends PHPUnit_Framework_TestCase $this->assertObjectHasAttribute('target', $array[0]); $this->assertEquals('ua', $array[0]->target); $this->assertObjectHasAttribute('value', $array[0]); - $this->assertEquals('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4', - $array[0]->value); + $this->assertEquals( + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4', + $array[0]->value + ); } } diff --git a/tests/Configurations/PageRulesTargetTest.php b/tests/Configurations/PageRulesTargetTest.php index 4a9cb3d..8b2f4cf 100644 --- a/tests/Configurations/PageRulesTargetTest.php +++ b/tests/Configurations/PageRulesTargetTest.php @@ -10,7 +10,8 @@ use Cloudflare\API\Configurations\PageRulesTargets; class PageRulesTargetTest extends PHPUnit_Framework_TestCase { - public function testGetArray() { + public function testGetArray() + { $targets = new PageRulesTargets('junade.com/*'); $array = $targets->getArray(); diff --git a/tests/Endpoints/DNSTest.php b/tests/Endpoints/DNSTest.php index 3c97eb5..f5267bb 100644 --- a/tests/Endpoints/DNSTest.php +++ b/tests/Endpoints/DNSTest.php @@ -37,7 +37,9 @@ class DNSTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('post') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records'), $this->equalTo([]), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records'), + $this->equalTo([]), $this->equalTo([ 'type' => 'A', 'name' => 'example.com', @@ -88,7 +90,8 @@ class DNSTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records'), $this->equalTo([ 'page' => 1, 'per_page' => 20, @@ -102,7 +105,7 @@ class DNSTest extends PHPUnit_Framework_TestCase ); $zones = new \Cloudflare\API\Endpoints\DNS($mock); - $result = $zones->listRecords("023e105f4ecef8ad9ca31a8372d0c353","A", "example.com", "127.0.0.1", 1, 20, "type", "desc", "all"); + $result = $zones->listRecords("023e105f4ecef8ad9ca31a8372d0c353", "A", "example.com", "127.0.0.1", 1, 20, "type", "desc", "all"); $this->assertObjectHasAttribute('result', $result); $this->assertObjectHasAttribute('result_info', $result); @@ -140,7 +143,8 @@ class DNSTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records/372e67954025e0ba6aaa6d586b9e0b59'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records/372e67954025e0ba6aaa6d586b9e0b59'), $this->equalTo([]) ); diff --git a/tests/Endpoints/IPsTest.php b/tests/Endpoints/IPsTest.php index 1a47bf8..2be3942 100644 --- a/tests/Endpoints/IPsTest.php +++ b/tests/Endpoints/IPsTest.php @@ -10,7 +10,8 @@ use Cloudflare\API\Endpoints\IPs; class IPsTest extends PHPUnit_Framework_TestCase { - public function testListIPs() { + public function testListIPs() + { $stream = GuzzleHttp\Psr7\stream_for(' { "success": true, @@ -31,7 +32,9 @@ class IPsTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('ips'), $this->equalTo([]) + ->with( + $this->equalTo('ips'), + $this->equalTo([]) ); $ips = new \Cloudflare\API\Endpoints\IPs($mock); diff --git a/tests/Endpoints/PageRulesTest.php b/tests/Endpoints/PageRulesTest.php index fc040f4..d8cf688 100644 --- a/tests/Endpoints/PageRulesTest.php +++ b/tests/Endpoints/PageRulesTest.php @@ -53,7 +53,9 @@ class PageRulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('post') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules'), $this->equalTo([]), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules'), + $this->equalTo([]), $this->equalTo([ 'targets' => $target->getArray(), 'actions' => $action->getArray(), @@ -116,7 +118,8 @@ class PageRulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules'), $this->equalTo([ 'status' => 'active', 'order' => 'status', @@ -170,7 +173,9 @@ class PageRulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac'), $this->equalTo([]) + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac'), + $this->equalTo([]) ); $pr = new \Cloudflare\API\Endpoints\PageRules($mock); @@ -220,7 +225,9 @@ class PageRulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('patch') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules'), $this->equalTo([]), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules'), + $this->equalTo([]), $this->equalTo([ 'targets' => $target->getArray(), 'actions' => $action->getArray(), @@ -256,7 +263,9 @@ class PageRulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('delete') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac'), $this->equalTo([]), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac'), + $this->equalTo([]), $this->equalTo([]) ); diff --git a/tests/Endpoints/UARulesTest.php b/tests/Endpoints/UARulesTest.php index 58d2b59..7cf93cc 100644 --- a/tests/Endpoints/UARulesTest.php +++ b/tests/Endpoints/UARulesTest.php @@ -45,7 +45,8 @@ class UARulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules'), $this->equalTo([ 'page' => 1, 'per_page' => 20 @@ -93,7 +94,9 @@ class UARulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('post') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules'), $this->equalTo([]), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules'), + $this->equalTo([]), $this->equalTo([ 'mode' => 'js_challenge', 'id' => '372e67954025e0ba6aaa6d586b9e0b59', @@ -103,9 +106,13 @@ class UARulesTest extends PHPUnit_Framework_TestCase ); $ld = new \Cloudflare\API\Endpoints\UARules($mock); - $ld->createRule('023e105f4ecef8ad9ca31a8372d0c353', 'js_challenge', $config, + $ld->createRule( + '023e105f4ecef8ad9ca31a8372d0c353', + 'js_challenge', + $config, '372e67954025e0ba6aaa6d586b9e0b59', - 'Prevent access from abusive clients identified by this UserAgent to mitigate DDoS attack'); + 'Prevent access from abusive clients identified by this UserAgent to mitigate DDoS attack' + ); } public function getRuleDetails() @@ -135,7 +142,8 @@ class UARulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules/372e67954025e0ba6aaa6d586b9e0b59'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules/372e67954025e0ba6aaa6d586b9e0b59'), $this->equalTo([]) ); @@ -175,7 +183,8 @@ class UARulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('put') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules/372e67954025e0ba6aaa6d586b9e0b59'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules/372e67954025e0ba6aaa6d586b9e0b59'), $this->equalTo([]), $this->equalTo([ 'mode' => 'js_challenge', @@ -186,9 +195,13 @@ class UARulesTest extends PHPUnit_Framework_TestCase ); $ld = new \Cloudflare\API\Endpoints\UARules($mock); - $ld->updateRule('023e105f4ecef8ad9ca31a8372d0c353', '372e67954025e0ba6aaa6d586b9e0b59', - 'js_challenge', $config, - 'Restrict access to these endpoints to requests from a known IP address'); + $ld->updateRule( + '023e105f4ecef8ad9ca31a8372d0c353', + '372e67954025e0ba6aaa6d586b9e0b59', + 'js_challenge', + $config, + 'Restrict access to these endpoints to requests from a known IP address' + ); } public function testDeleteRule() @@ -211,7 +224,8 @@ class UARulesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('delete') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules/372e67954025e0ba6aaa6d586b9e0b59'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules/372e67954025e0ba6aaa6d586b9e0b59'), $this->equalTo([]), $this->equalTo([]) ); diff --git a/tests/Endpoints/ZoneLockdownTest.php b/tests/Endpoints/ZoneLockdownTest.php index 81d03fb..9783110 100644 --- a/tests/Endpoints/ZoneLockdownTest.php +++ b/tests/Endpoints/ZoneLockdownTest.php @@ -43,7 +43,8 @@ class ZoneLockdownTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns'), $this->equalTo([ 'page' => 1, 'per_page' => 20, @@ -91,7 +92,9 @@ class ZoneLockdownTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('post') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns'), $this->equalTo([]), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns'), + $this->equalTo([]), $this->equalTo([ 'urls' => ["api.mysite.com/some/endpoint*"], 'id' => '372e67954025e0ba6aaa6d586b9e0b59', @@ -101,9 +104,13 @@ class ZoneLockdownTest extends PHPUnit_Framework_TestCase ); $ld = new \Cloudflare\API\Endpoints\ZoneLockdown($mock); - $ld->createLockdown('023e105f4ecef8ad9ca31a8372d0c353', ["api.mysite.com/some/endpoint*"], $config, + $ld->createLockdown( + '023e105f4ecef8ad9ca31a8372d0c353', + ["api.mysite.com/some/endpoint*"], + $config, '372e67954025e0ba6aaa6d586b9e0b59', - 'Restrict access to these endpoints to requests from a known IP address'); + 'Restrict access to these endpoints to requests from a known IP address' + ); } public function testGetRecordDetails() @@ -137,7 +144,8 @@ class ZoneLockdownTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns/372e67954025e0ba6aaa6d586b9e0b59'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns/372e67954025e0ba6aaa6d586b9e0b59'), $this->equalTo([]) ); @@ -181,7 +189,8 @@ class ZoneLockdownTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('put') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns/372e67954025e0ba6aaa6d586b9e0b59'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns/372e67954025e0ba6aaa6d586b9e0b59'), $this->equalTo([]), $this->equalTo([ 'urls' => ["api.mysite.com/some/endpoint*"], @@ -192,9 +201,13 @@ class ZoneLockdownTest extends PHPUnit_Framework_TestCase ); $ld = new \Cloudflare\API\Endpoints\ZoneLockdown($mock); - $ld->updateLockdown('023e105f4ecef8ad9ca31a8372d0c353', '372e67954025e0ba6aaa6d586b9e0b59', - ["api.mysite.com/some/endpoint*"], $config, - 'Restrict access to these endpoints to requests from a known IP address'); + $ld->updateLockdown( + '023e105f4ecef8ad9ca31a8372d0c353', + '372e67954025e0ba6aaa6d586b9e0b59', + ["api.mysite.com/some/endpoint*"], + $config, + 'Restrict access to these endpoints to requests from a known IP address' + ); } public function testDeleteLockdown() @@ -221,7 +234,8 @@ class ZoneLockdownTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('delete') - ->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns/372e67954025e0ba6aaa6d586b9e0b59'), + ->with( + $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns/372e67954025e0ba6aaa6d586b9e0b59'), $this->equalTo([]), $this->equalTo([]) ); diff --git a/tests/Endpoints/ZonesTest.php b/tests/Endpoints/ZonesTest.php index d1026ed..8ce838c 100644 --- a/tests/Endpoints/ZonesTest.php +++ b/tests/Endpoints/ZonesTest.php @@ -70,7 +70,8 @@ class ZonesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('post') - ->with($this->equalTo('zones'), + ->with( + $this->equalTo('zones'), $this->equalTo([]), $this->equalTo(['name' => 'example.com', 'jumpstart' => false]) ); @@ -90,7 +91,8 @@ class ZonesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('post') - ->with($this->equalTo('zones'), + ->with( + $this->equalTo('zones'), $this->equalTo([]), $this->equalTo(['name' => 'example.com', 'jumpstart' => true, 'organization' => $org]) ); @@ -115,7 +117,8 @@ class ZonesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('put') - ->with($this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/activation_check'), + ->with( + $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/activation_check'), $this->equalTo([]), $this->equalTo([]) ); @@ -196,7 +199,8 @@ class ZonesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones'), + ->with( + $this->equalTo('zones'), $this->equalTo([ 'page' => 1, 'per_page' => 20, @@ -289,7 +293,8 @@ class ZonesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('get') - ->with($this->equalTo('zones'), + ->with( + $this->equalTo('zones'), $this->equalTo([ 'page' => 1, 'per_page' => 20, @@ -321,7 +326,8 @@ class ZonesTest extends PHPUnit_Framework_TestCase $mock->expects($this->once()) ->method('delete') - ->with($this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/purge_cache'), + ->with( + $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/purge_cache'), $this->equalTo([]), $this->equalTo(["purge_everything" => true]) );