From bc370a81cdb650fdc0f96914065b8ae265676425 Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Sat, 31 Dec 2016 15:41:54 -0800 Subject: [PATCH] Update dependencies. (#25) --- .php_cs | 10 + bin/phpqa | 10 +- composer.json | 11 +- composer.lock | 1016 ++++++++++++----- config/.php_cs | 10 +- phpqa.yml | 13 +- phpunit.xml.dist | 2 +- src/{Console => }/Application.php | 13 +- src/Command/AnalyzeCommand.php | 127 ++- src/Command/InitCommand.php | 5 - src/Input/FilesOption.php | 4 +- src/Style/SymfonyStyle.php | 224 ++++ src/{ => Utils}/Config.php | 6 +- .../Command/AnalyzeCommandTest.php | 20 +- 14 files changed, 1075 insertions(+), 396 deletions(-) create mode 100644 .php_cs rename src/{Console => }/Application.php (64%) create mode 100644 src/Style/SymfonyStyle.php rename src/{ => Utils}/Config.php (97%) diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..f396a67 --- /dev/null +++ b/.php_cs @@ -0,0 +1,10 @@ +setRules( + [ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + ] + ) + ->setUsingCache(false); diff --git a/bin/phpqa b/bin/phpqa index a93daba..9387249 100755 --- a/bin/phpqa +++ b/bin/phpqa @@ -6,6 +6,10 @@ * http://carlosbuenosvinos.com/write-your-git-hooks-in-php-and-keep-them-under-git-control/ */ +use JMOlivas\Phpqa\Application; +use JMOlivas\Phpqa\Command\AnalyzeCommand; +use JMOlivas\Phpqa\Command\InitCommand; + if (file_exists(__DIR__.'/../vendor/autoload.php')) { require_once __DIR__.'/../vendor/autoload.php'; } elseif (file_exists(__DIR__.'/../../../autoload.php')) { @@ -16,11 +20,7 @@ if (file_exists(__DIR__.'/../vendor/autoload.php')) { exit(1); } -use JMOlivas\Phpqa\Console\Application; -use JMOlivas\Phpqa\Command\AnalyzeCommand; -use JMOlivas\Phpqa\Command\InitCommand; - -$application = new Application('PHP QA Analyzer', '0.0.1'); +$application = new Application(); $application->add(new AnalyzeCommand()); $application->add(new InitCommand()); $application->run(); diff --git a/composer.json b/composer.json index 24816ae..c54ba5f 100644 --- a/composer.json +++ b/composer.json @@ -13,14 +13,14 @@ ], "require": { "php": ">=5.4.5", - "symfony/console": "2.7.*", - "symfony/config":"2.7.*", - "symfony/process": "2.7.*", + "symfony/console": "2.8.*", + "symfony/config":"2.8.*", + "symfony/process": "2.8.*", "jakub-onderka/php-parallel-lint": "0.*", "jakub-onderka/php-console-highlighter": "0.*", "fabpot/php-cs-fixer": "@stable", "squizlabs/php_codesniffer": "2.5.1", - "drupal/coder": "8.2.7", + "drupal/coder": "8.*", "phpmd/phpmd" : "@stable", "phploc/phploc": "@stable", "sebastian/phpcpd": "@stable", @@ -29,7 +29,8 @@ }, "bin": ["bin/phpqa"], "config": { - "bin-dir": "bin/" + "bin-dir": "bin/", + "secure-http" : false }, "autoload": { "psr-4": {"JMOlivas\\Phpqa\\": "src"} diff --git a/composer.lock b/composer.lock index 7c6e5fd..d984258 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "09d75106019d71b683ee42e1748bded2", + "content-hash": "c52ea3b62795be8bb0f89ce41431d55a", "packages": [ { "name": "doctrine/instantiator", @@ -58,19 +58,26 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "drupal/coder", - "version": "8.2.3", + "version": "8.2.8", "source": { "type": "git", - "url": "http://git.drupal.org/project/coder.git", - "reference": "fcda9b7e7cc8dc741ce01dfbeb44fd6c4cf3cde8" + "url": "https://github.com/klausi/coder.git", + "reference": "6d717e1a5a5dd592ebbeaafad11746849fb52532" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/klausi/coder/zipball/6d717e1a5a5dd592ebbeaafad11746849fb52532", + "reference": "6d717e1a5a5dd592ebbeaafad11746849fb52532", + "shasum": "" }, "require": { - "php": ">=5.2.0", - "squizlabs/php_codesniffer": ">=2.3.3" + "php": ">=5.4.0", + "squizlabs/php_codesniffer": ">=2.5.1", + "symfony/yaml": ">=2.0.0" }, "require-dev": { "phpunit/phpunit": ">=3.7" @@ -81,49 +88,60 @@ "GPL-2.0+" ], "description": "Coder is a library to review Drupal code.", - "homepage": "https://drupal.org/project/coder", + "homepage": "https://www.drupal.org/project/coder", "keywords": [ "code review", "phpcs", "standards" ], - "time": "2015-06-26 10:04:23" + "time": "2016-07-05T20:48:03+00:00" }, { "name": "fabpot/php-cs-fixer", - "version": "v1.9.1", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "f2c2c5527113f346d77eb790e62395fe8de58c4f" + "reference": "f3baf72eb2f58bf275b372540f5b47d25aed910f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/f2c2c5527113f346d77eb790e62395fe8de58c4f", - "reference": "f2c2c5527113f346d77eb790e62395fe8de58c4f", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/f3baf72eb2f58bf275b372540f5b47d25aed910f", + "reference": "f3baf72eb2f58bf275b372540f5b47d25aed910f", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.6", - "sebastian/diff": "~1.1", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/filesystem": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.3", - "symfony/stopwatch": "~2.5" + "php": "^5.3.6 || >=7.0 <7.2", + "sebastian/diff": "^1.1", + "symfony/console": "^2.3 || ^3.0", + "symfony/event-dispatcher": "^2.1 || ^3.0", + "symfony/filesystem": "^2.4 || ^3.0", + "symfony/finder": "^2.2 || ^3.0", + "symfony/polyfill-php54": "^1.0", + "symfony/process": "^2.3 || ^3.0", + "symfony/stopwatch": "^2.5 || ^3.0" + }, + "conflict": { + "hhvm": "<3.9" }, "require-dev": { - "satooshi/php-coveralls": "0.7.*@dev" + "gecko-packages/gecko-php-unit": "^2.0", + "phpunit/phpunit": "^4.5|^5", + "satooshi/php-coveralls": "^1.0" }, "bin": [ "php-cs-fixer" ], "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "psr-4": { - "Symfony\\CS\\": "Symfony/CS/" + "PhpCsFixer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -141,7 +159,8 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2015-07-08 21:03:30" + "abandoned": "friendsofphp/php-cs-fixer", + "time": "2016-12-01T06:18:06+00:00" }, { "name": "jakub-onderka/php-console-color", @@ -184,7 +203,7 @@ "homepage": "http://www.acci.cz" } ], - "time": "2014-04-08 15:00:19" + "time": "2014-04-08T15:00:19+00:00" }, { "name": "jakub-onderka/php-console-highlighter", @@ -228,20 +247,20 @@ "homepage": "http://www.acci.cz/" } ], - "time": "2015-04-20 18:58:01" + "time": "2015-04-20T18:58:01+00:00" }, { "name": "jakub-onderka/php-parallel-lint", - "version": "v0.9", + "version": "v0.9.2", "source": { "type": "git", "url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git", - "reference": "1b693fb455201cacf595163c92bfb1adfa2158d8" + "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/1b693fb455201cacf595163c92bfb1adfa2158d8", - "reference": "1b693fb455201cacf595163c92bfb1adfa2158d8", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa", + "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa", "shasum": "" }, "require": { @@ -265,7 +284,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD" + "BSD-2-Clause" ], "authors": [ { @@ -275,38 +294,39 @@ ], "description": "This tool check syntax of PHP files about 20x faster than serial check.", "homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint", - "time": "2015-06-16 10:17:07" + "time": "2015-12-15T10:42:16+00:00" }, { "name": "pdepend/pdepend", - "version": "2.1.0", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "f58902a774449f73f1a1d9cd1a07aeac8fbee367" + "reference": "8d7ab8fe8c1f9de5056bb7ea2c0852f4ddd44f90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/f58902a774449f73f1a1d9cd1a07aeac8fbee367", - "reference": "f58902a774449f73f1a1d9cd1a07aeac8fbee367", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/8d7ab8fe8c1f9de5056bb7ea2c0852f4ddd44f90", + "reference": "8d7ab8fe8c1f9de5056bb7ea2c0852f4ddd44f90", "shasum": "" }, "require": { - "symfony/config": ">=2.4", - "symfony/dependency-injection": ">=2.4", - "symfony/filesystem": ">=2.4" + "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.*@stable", - "squizlabs/php_codesniffer": "@stable" + "phpunit/phpunit": "^4.4.0,<4.8", + "squizlabs/php_codesniffer": "^2.0.0" }, "bin": [ "src/bin/pdepend" ], "type": "library", "autoload": { - "psr-0": { - "PDepend\\": "src/main/php/" + "psr-4": { + "PDepend\\": "src/main/php/PDepend" } }, "notification-url": "https://packagist.org/downloads/", @@ -314,41 +334,138 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2015-05-21 18:09:06" + "time": "2016-11-23T20:25:02+00:00" + }, + { + "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-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "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-30T07:12:33+00:00" + }, + { + "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": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -360,34 +477,34 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2016-11-25T06:54:22+00:00" }, { "name": "phploc/phploc", - "version": "2.1.3", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phploc.git", - "reference": "ab893cbe5c4b63760b1560b370fedc001eb5717f" + "reference": "74f917e6f80f291856989960d31afa44a4196859" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/ab893cbe5c4b63760b1560b370fedc001eb5717f", - "reference": "ab893cbe5c4b63760b1560b370fedc001eb5717f", + "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/74f917e6f80f291856989960d31afa44a4196859", + "reference": "74f917e6f80f291856989960d31afa44a4196859", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.6", "sebastian/finder-facade": "~1.1", - "sebastian/git": "~2.0", - "sebastian/version": "~1.0.3", - "symfony/console": "~2.5" + "sebastian/git": "~2.1", + "sebastian/version": "~1.0.3|~2.0", + "symfony/console": "~2.5|~3.0" }, "require-dev": { - "phpunit/phpunit": "~4" + "phpunit/phpunit": "~5" }, "bin": [ "phploc" @@ -395,7 +512,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -416,32 +533,29 @@ ], "description": "A tool for quickly measuring the size of a PHP project.", "homepage": "https://github.com/sebastianbergmann/phploc", - "time": "2015-06-04 13:18:14" + "time": "2016-04-25T08:11:21+00:00" }, { "name": "phpmd/phpmd", - "version": "2.2.3", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "5eeb5a4d39c8304910b33ae49f8813905346cc35" + "reference": "9298602a922cd8c46666df8d540a60bc5925ce55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/5eeb5a4d39c8304910b33ae49f8813905346cc35", - "reference": "5eeb5a4d39c8304910b33ae49f8813905346cc35", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/9298602a922cd8c46666df8d540a60bc5925ce55", + "reference": "9298602a922cd8c46666df8d540a60bc5925ce55", "shasum": "" }, "require": { - "pdepend/pdepend": "~2.0", - "php": ">=5.3.0", - "symfony/config": ">=2.4", - "symfony/dependency-injection": ">=2.4", - "symfony/filesystem": ">=2.4" + "pdepend/pdepend": "^2.0.4", + "php": ">=5.3.9" }, "require-dev": { - "phpunit/phpunit": "*", - "squizlabs/php_codesniffer": "*" + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.0" }, "bin": [ "src/bin/phpmd" @@ -461,12 +575,18 @@ "name": "Manuel Pichler", "email": "github@manuel-pichler.de", "homepage": "https://github.com/manuelpichler", - "role": "Project founder" + "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.", @@ -478,34 +598,37 @@ "phpmd", "pmd" ], - "time": "2015-05-27 18:16:57" + "time": "2016-11-23T20:33:32+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.4.1", + "version": "v1.6.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373" + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", - "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "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" + "phpspec/phpspec": "^2.0", + "phpunit/phpunit": "^4.8 || ^5.6.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -538,20 +661,20 @@ "spy", "stub" ], - "time": "2015-04-27 22:15:08" + "time": "2016-11-21T14:58:47+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.1.8", + "version": "2.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6044546998c7627ab997501a3d0db972b3db9790" + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6044546998c7627ab997501a3d0db972b3db9790", - "reference": "6044546998c7627ab997501a3d0db972b3db9790", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", "shasum": "" }, "require": { @@ -559,7 +682,7 @@ "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "~1.0", + "sebastian/environment": "^1.3.2", "sebastian/version": "~1.0" }, "require-dev": { @@ -574,7 +697,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { @@ -600,20 +723,20 @@ "testing", "xunit" ], - "time": "2015-07-13 11:25:58" + "time": "2015-10-06T15:47:00+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.0", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", - "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", "shasum": "" }, "require": { @@ -647,7 +770,7 @@ "filesystem", "iterator" ], - "time": "2015-04-02 05:19:05" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", @@ -688,25 +811,28 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.6", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d" + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/83fe1bdc5d47658b727595c14da140da92b3d66d", - "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d", + "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": [ @@ -729,20 +855,20 @@ "keywords": [ "timer" ], - "time": "2015-06-13 07:35:30" + "time": "2016-05-12T18:03:57+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.3", + "version": "1.4.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9" + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/7a9b0969488c3c54fd62b4d504b3ec758fd005d9", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", "shasum": "" }, "require": { @@ -778,7 +904,7 @@ "keywords": [ "tokenizer" ], - "time": "2015-06-19 03:43:16" + "time": "2016-11-15T14:06:22+00:00" }, { "name": "phpunit/phpunit", @@ -850,26 +976,27 @@ "testing", "xunit" ], - "time": "2015-06-03 05:03:30" + "time": "2015-06-03T05:03:30+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.5", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "1c330b1b6e1ea8fd15f2fbea46770576e366855c" + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/1c330b1b6e1ea8fd15f2fbea46770576e366855c", - "reference": "1c330b1b6e1ea8fd15f2fbea46770576e366855c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", "shasum": "" }, "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", + "doctrine/instantiator": "^1.0.2", "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -905,26 +1032,73 @@ "mock", "xunit" ], - "time": "2015-07-04 05:41:32" + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.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": "2016-10-10T12:19:37+00:00" }, { "name": "sebastian/comparator", - "version": "1.1.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" + "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", + "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" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -932,7 +1106,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -969,32 +1143,32 @@ "compare", "equality" ], - "time": "2015-01-29 16:28:08" + "time": "2016-11-19T09:18:40+00:00" }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1017,31 +1191,31 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", - "version": "1.2.2", + "version": "1.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -1071,20 +1245,20 @@ "environment", "hhvm" ], - "time": "2015-01-01 10:01:08" + "time": "2016-08-18T05:49:44+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "84839970d05254c73cde183a721c7af13aede943" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", - "reference": "84839970d05254c73cde183a721c7af13aede943", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -1092,12 +1266,13 @@ "sebastian/recursion-context": "~1.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -1137,24 +1312,24 @@ "export", "exporter" ], - "time": "2015-01-27 07:23:06" + "time": "2016-06-17T09:04:28+00:00" }, { "name": "sebastian/finder-facade", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "a520dcc3dd39160eea480daa3426f4fd419a327b" + "reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/a520dcc3dd39160eea480daa3426f4fd419a327b", - "reference": "a520dcc3dd39160eea480daa3426f4fd419a327b", + "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9", + "reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9", "shasum": "" }, "require": { - "symfony/finder": "~2.3", + "symfony/finder": "~2.3|~3.0", "theseer/fdomdocument": "~1.3" }, "type": "library", @@ -1176,20 +1351,20 @@ ], "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2015-06-04 08:11:58" + "time": "2016-02-17T07:02:23+00:00" }, { "name": "sebastian/git", - "version": "2.0.1", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/git.git", - "reference": "2d5c139d0eedcb9e67e0e9ca08023be6e9b7b47b" + "reference": "5100bc50cd9e70f424c643618e142214225024f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/git/zipball/2d5c139d0eedcb9e67e0e9ca08023be6e9b7b47b", - "reference": "2d5c139d0eedcb9e67e0e9ca08023be6e9b7b47b", + "url": "https://api.github.com/repos/sebastianbergmann/git/zipball/5100bc50cd9e70f424c643618e142214225024f3", + "reference": "5100bc50cd9e70f424c643618e142214225024f3", "shasum": "" }, "require": { @@ -1198,7 +1373,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -1221,20 +1396,20 @@ "keywords": [ "git" ], - "time": "2015-04-06 16:23:43" + "time": "2016-06-15T09:30:19+00:00" }, { "name": "sebastian/global-state", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", "shasum": "" }, "require": { @@ -1272,28 +1447,28 @@ "keywords": [ "global state" ], - "time": "2014-10-06 09:23:50" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/phpcpd", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpcpd.git", - "reference": "d3ad100fdf15805495f6ff19f473f4314c99390c" + "reference": "24d9a880deadb0b8c9680e9cfe78e30b704225db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/d3ad100fdf15805495f6ff19f473f4314c99390c", - "reference": "d3ad100fdf15805495f6ff19f473f4314c99390c", + "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/24d9a880deadb0b8c9680e9cfe78e30b704225db", + "reference": "24d9a880deadb0b8c9680e9cfe78e30b704225db", "shasum": "" }, "require": { "php": ">=5.3.3", - "phpunit/php-timer": "~1.0", + "phpunit/php-timer": ">=1.0.6", "sebastian/finder-facade": "~1.1", - "sebastian/version": "~1.0", - "symfony/console": "~2.2", + "sebastian/version": "~1.0|~2.0", + "symfony/console": "~2.7|^3.0", "theseer/fdomdocument": "~1.4" }, "bin": [ @@ -1323,7 +1498,7 @@ ], "description": "Copy/Paste Detector (CPD) for PHP code.", "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2015-03-26 14:47:38" + "time": "2016-04-17T19:32:49+00:00" }, { "name": "sebastian/phpdcd", @@ -1377,20 +1552,21 @@ ], "description": "Dead Code Detector (DCD) for PHP code.", "homepage": "https://github.com/sebastianbergmann/phpdcd", - "time": "2014-04-27 06:42:32" + "abandoned": true, + "time": "2014-04-27T06:42:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252" + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { @@ -1430,7 +1606,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-01-24 09:48:32" + "time": "2015-11-11T19:50:13+00:00" }, { "name": "sebastian/version", @@ -1465,20 +1641,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2015-06-21T13:59:46+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.3.3", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "c1a26c729508f73560c1a4f767f60b8ab6b4a666" + "reference": "6731851d6aaf1d0d6c58feff1065227b7fda3ba8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/c1a26c729508f73560c1a4f767f60b8ab6b4a666", - "reference": "c1a26c729508f73560c1a4f767f60b8ab6b4a666", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6731851d6aaf1d0d6c58feff1065227b7fda3ba8", + "reference": "6731851d6aaf1d0d6c58feff1065227b7fda3ba8", "shasum": "" }, "require": { @@ -1486,6 +1662,9 @@ "ext-xmlwriter": "*", "php": ">=5.1.2" }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, "bin": [ "scripts/phpcs", "scripts/phpcbf" @@ -1493,7 +1672,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -1539,39 +1718,45 @@ "phpcs", "standards" ], - "time": "2015-06-24 03:16:23" + "time": "2016-01-19T23:39:10+00:00" }, { "name": "symfony/config", - "version": "v2.7.2", + "version": "v2.8.15", "source": { "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "6c905bbed1e728226de656e4c07d620dfe9e80d9" + "url": "https://github.com/symfony/config.git", + "reference": "b522856007b258f46d5ee35d3b7b235c11e76e86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/6c905bbed1e728226de656e4c07d620dfe9e80d9", - "reference": "6c905bbed1e728226de656e4c07d620dfe9e80d9", + "url": "https://api.github.com/repos/symfony/config/zipball/b522856007b258f46d5ee35d3b7b235c11e76e86", + "reference": "b522856007b258f46d5ee35d3b7b235c11e76e86", "shasum": "" }, "require": { "php": ">=5.3.9", - "symfony/filesystem": "~2.3" + "symfony/filesystem": "~2.3|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/yaml": "~2.7|~3.0.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Config\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1589,30 +1774,31 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" + "time": "2016-12-10T08:21:45+00:00" }, { "name": "symfony/console", - "version": "v2.7.2", + "version": "v2.8.15", "source": { "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "8cf484449130cabfd98dcb4694ca9945802a21ed" + "url": "https://github.com/symfony/console.git", + "reference": "d5643cd095e5e37d31e004bb2606b5dd7e96602f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/8cf484449130cabfd98dcb4694ca9945802a21ed", - "reference": "8cf484449130cabfd98dcb4694ca9945802a21ed", + "url": "https://api.github.com/repos/symfony/console/zipball/d5643cd095e5e37d31e004bb2606b5dd7e96602f", + "reference": "d5643cd095e5e37d31e004bb2606b5dd7e96602f", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "symfony/debug": "~2.7,>=2.7.2|~3.0.0", + "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1622,13 +1808,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1646,49 +1835,109 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" + "time": "2016-12-06T11:59:35+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "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 Debug Component", + "homepage": "https://symfony.com", + "time": "2016-07-30T07:22:48+00:00" }, { "name": "symfony/dependency-injection", - "version": "v2.7.2", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "d56b1b89a0c8b34a6eca6211ec76c43256ec4030" + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "037054501c41007c93b6de1b5c7a7acb83523593" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/d56b1b89a0c8b34a6eca6211ec76c43256ec4030", - "reference": "d56b1b89a0c8b34a6eca6211ec76c43256ec4030", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/037054501c41007c93b6de1b5c7a7acb83523593", + "reference": "037054501c41007c93b6de1b5c7a7acb83523593", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "conflict": { - "symfony/expression-language": "<2.6" + "symfony/yaml": "<3.2" }, "require-dev": { - "symfony/config": "~2.2", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/yaml": "~2.1" + "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": "2.7-dev" + "dev-master": "3.2-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1706,32 +1955,31 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" + "time": "2016-12-08T15:27:33+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v2.7.2", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "e8f47a327c2f0fd5aa04fa60af2b693006ed7283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", - "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e8f47a327c2f0fd5aa04fa60af2b693006ed7283", + "reference": "e8f47a327c2f0fd5aa04fa60af2b693006ed7283", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.3" + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" }, "suggest": { "symfony/dependency-injection": "", @@ -1740,13 +1988,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.2-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1764,38 +2015,38 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2015-06-18 19:21:56" + "time": "2016-10-13T06:29:04+00:00" }, { "name": "symfony/filesystem", - "version": "v2.7.2", + "version": "v3.0.9", "source": { "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8" + "url": "https://github.com/symfony/filesystem.git", + "reference": "b2da5009d9bacbd91d83486aa1f44c793a8c380d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", - "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2da5009d9bacbd91d83486aa1f44c793a8c380d", + "reference": "b2da5009d9bacbd91d83486aa1f44c793a8c380d", "shasum": "" }, "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1813,38 +2064,38 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" + "time": "2016-07-20T05:43:46+00:00" }, { "name": "symfony/finder", - "version": "v2.7.2", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4" + "url": "https://github.com/symfony/finder.git", + "reference": "a69cb5d455b4885ca376dc5bb3e1155cc8c08c4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/ae0f363277485094edc04c9f3cbe595b183b78e4", - "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4", + "url": "https://api.github.com/repos/symfony/finder/zipball/a69cb5d455b4885ca376dc5bb3e1155cc8c08c4b", + "reference": "a69cb5d455b4885ca376dc5bb3e1155cc8c08c4b", "shasum": "" }, "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.2-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1862,38 +2113,155 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" + "time": "2016-12-13T09:39:43+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-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" + ], + "time": "2016-11-14T01:06:16+00:00" + }, + { + "name": "symfony/polyfill-php54", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php54.git", + "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/90e085822963fdcc9d1c5b73deb3d2e5783b16a0", + "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php54\\": "" + }, + "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 5.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/process", - "version": "v2.7.2", + "version": "v2.8.15", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "48aeb0e48600321c272955132d7606ab0a49adb3" + "url": "https://github.com/symfony/process.git", + "reference": "1a1bd056395540d0bc549d39818316513565d278" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/48aeb0e48600321c272955132d7606ab0a49adb3", - "reference": "48aeb0e48600321c272955132d7606ab0a49adb3", + "url": "https://api.github.com/repos/symfony/process/zipball/1a1bd056395540d0bc549d39818316513565d278", + "reference": "1a1bd056395540d0bc549d39818316513565d278", "shasum": "" }, "require": { "php": ">=5.3.9" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1911,38 +2279,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-07-01 11:25:50" + "time": "2016-11-24T00:43:03+00:00" }, { "name": "symfony/stopwatch", - "version": "v2.7.2", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/Stopwatch.git", - "reference": "b07a866719bbac5294c67773340f97b871733310" + "url": "https://github.com/symfony/stopwatch.git", + "reference": "5b139e1c4290e6c7640ba80d9c9b5e49ef22b841" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/b07a866719bbac5294c67773340f97b871733310", - "reference": "b07a866719bbac5294c67773340f97b871733310", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b139e1c4290e6c7640ba80d9c9b5e49ef22b841", + "reference": "5b139e1c4290e6c7640ba80d9c9b5e49ef22b841", "shasum": "" }, "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.2-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Stopwatch\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1960,38 +2328,44 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2015-07-01 18:23:16" + "time": "2016-06-29T05:43:10+00:00" }, { "name": "symfony/yaml", - "version": "v2.7.2", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "4bfbe0ed3909bfddd75b70c094391ec1f142f860" + "url": "https://github.com/symfony/yaml.git", + "reference": "a7095af4b97a0955f85c8989106c249fa649011f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/4bfbe0ed3909bfddd75b70c094391ec1f142f860", - "reference": "4bfbe0ed3909bfddd75b70c094391ec1f142f860", + "url": "https://api.github.com/repos/symfony/yaml/zipball/a7095af4b97a0955f85c8989106c249fa649011f", + "reference": "a7095af4b97a0955f85c8989106c249fa649011f", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.2-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2009,7 +2383,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-07-01 11:25:50" + "time": "2016-12-10T10:07:06+00:00" }, { "name": "theseer/fdomdocument", @@ -2049,7 +2423,57 @@ ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2015-05-27 22:58:02" + "time": "2015-05-27T22:58:02+00:00" + }, + { + "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-23T20:04:58+00:00" } ], "packages-dev": [], diff --git a/config/.php_cs b/config/.php_cs index 1c54818..f396a67 100644 --- a/config/.php_cs +++ b/config/.php_cs @@ -1,4 +1,10 @@ level(Symfony\CS\FixerInterface::PSR2_LEVEL); \ No newline at end of file +return PhpCsFixer\Config::create() + ->setRules( + [ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + ] + ) + ->setUsingCache(false); diff --git a/phpqa.yml b/phpqa.yml index cf8ad5f..0edc351 100644 --- a/phpqa.yml +++ b/phpqa.yml @@ -17,9 +17,6 @@ application: php-cs-fixer: enabled: true exception: false - file: - config-file: .php_cs - single-execution: false options: level: psr2 arguments: @@ -36,7 +33,7 @@ application: arguments: - '-n' phpcs: - enabled: true + enabled: false exception: false options: standard: PSR2 @@ -45,7 +42,7 @@ application: arguments: - '-n' phpmd: - enabled: true + enabled: false exception: false options: arguments: @@ -54,13 +51,13 @@ application: - 'text' - 'cleancode,codesize,unusedcode,naming,controversial,design' phploc: - enabled: true + enabled: false exception: false phpcpd: - enabled: true + enabled: false exception: false phpdcd: - enabled: true + enabled: false exception: false phpunit: enabled: true diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6af178a..1a5ed85 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/src/Console/Application.php b/src/Application.php similarity index 64% rename from src/Console/Application.php rename to src/Application.php index ea99dbf..7099c97 100644 --- a/src/Console/Application.php +++ b/src/Application.php @@ -5,15 +5,14 @@ * Contains \JMOlivas\Phpqa\Console\Application. */ -namespace JMOlivas\Phpqa\Console; +namespace JMOlivas\Phpqa; use Symfony\Component\Console\Application as BaseApplication; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use JMOlivas\Phpqa\Config; +use JMOlivas\Phpqa\Utils\Config; /** * Class Application + * * @package JMOlivas\Phpqa\Console */ class Application extends BaseApplication @@ -23,9 +22,9 @@ class Application extends BaseApplication */ private $config; - public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') + public function __construct() { - parent::__construct($name, $version); + parent::__construct('PHP QA Analyzer', '0.1.0'); $this->config = new Config(); } @@ -42,6 +41,6 @@ public function getConfig() */ public function getApplicationDirectory() { - return __DIR__ . '/../../'; + return __DIR__ . '/../'; } } diff --git a/src/Command/AnalyzeCommand.php b/src/Command/AnalyzeCommand.php index fb5bdff..ed46ae0 100644 --- a/src/Command/AnalyzeCommand.php +++ b/src/Command/AnalyzeCommand.php @@ -8,8 +8,14 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use JMOlivas\Phpqa\Style\SymfonyStyle; use Symfony\Component\Process\ProcessBuilder; +/** + * Class AnalyzeCommand + * + * @package JMOlivas\Phpqa\Command + */ class AnalyzeCommand extends Command { /** @@ -17,14 +23,23 @@ class AnalyzeCommand extends Command */ private $needle = '/(\.php)|(\.inc)$/'; + /** + * @var + */ private $directory; + /** + * @var array + */ private $projects = [ 'php', 'symfony', 'drupal' ]; + /** + * + */ protected function configure() { $this @@ -52,8 +67,12 @@ protected function configure() ); } + /** + * {@inheritdoc} + */ protected function execute(InputInterface $input, OutputInterface $output) { + $io = new SymfonyStyle($input, $output); $project = $input->getOption('project'); /** @@ -62,7 +81,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $application = $this->getApplication(); /** - * @var \JMOlivas\Phpqa\Config $config + * @var \JMOlivas\Phpqa\Utils\Config $config */ $config = $application->getConfig(); @@ -89,7 +108,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->directory = $application->getApplicationDirectory(); - $output->writeln(sprintf('%s', $application->getName())); + $io->section($application->getName()); $filesOption = new FilesOption($input->getOption('files')); $git = $input->getOption('git'); @@ -107,36 +126,21 @@ protected function execute(InputInterface $input, OutputInterface $output) } if ($git) { - $files = $this->extractCommitedFiles($output, $config); + $files = $this->extractCommitedFiles($io, $config); } else { $files = $filesOption->normalize(); } - $output->writeln( - sprintf( - '%s', - $config->get('application.messages.files.info') - ) - ); - - foreach ($files as $file) { - $output->writeln( - sprintf( - ' - %s', - $file - ) - ); - } - - $this->checkComposer($output, $files, $config); - + $io->info($config->get('application.messages.files.info')); + $io->listing($files); + $this->checkComposer($io, $files, $config); $analyzers = array_keys($config->get('application.analyzer')); foreach ($analyzers as $analyzer) { - $this->analyzer($output, $analyzer, $files, $config, $project); + $this->analyzer($io, $analyzer, $files, $config, $project); } - $output->writeln( + $io->writeln( sprintf( '%s', $config->get('application.messages.completed.info') @@ -144,14 +148,14 @@ protected function execute(InputInterface $input, OutputInterface $output) ); } - private function extractCommitedFiles($output, $config) + /** + * @param $io + * @param $config + * @return array + */ + private function extractCommitedFiles(SymfonyStyle $io, $config) { - $output->writeln( - sprintf( - '%s', - $config->get('application.messages.git.info') - ) - ); + $io->info($config->get('application.messages.git.info')); $files = []; $result = 0; @@ -170,18 +174,19 @@ private function extractCommitedFiles($output, $config) return $files; } - private function checkComposer($output, $files, $config) + /** + * @param $io + * @param $files + * @param $config + * @throws \Exception + */ + private function checkComposer(SymfonyStyle $io, $files, $config) { if (!$config->get('application.method.composer.enabled')) { return; } - $output->writeln( - sprintf( - '%s', - $config->get('application.messages.composer.info') - ) - ); + $io->info($config->get('application.messages.composer.info')); $composerJsonDetected = false; $composerLockDetected = false; @@ -201,16 +206,19 @@ private function checkComposer($output, $files, $config) throw new Exception($config->get('application.messages.composer.error')); } - $output->writeln( - sprintf( - ' %s', - $config->get('application.messages.composer.error') - ) - ); + $io->error($config->get('application.messages.composer.error')); } } - private function analyzer($output, $analyzer, $files, $config, $project) + /** + * @param $io + * @param $analyzer + * @param $files + * @param $config + * @param $project + * @throws \Exception + */ + private function analyzer(SymfonyStyle $io, $analyzer, $files, $config, $project) { if (!$config->get('application.analyzer.'.$analyzer.'.enabled', false)) { return; @@ -228,12 +236,7 @@ private function analyzer($output, $analyzer, $files, $config, $project) $success = true; - $output->writeln( - sprintf( - '%s', - $config->get('application.messages.'.$analyzer.'.info') - ) - ); + $io->info($config->get('application.messages.'.$analyzer.'.info')); $processArguments = [ 'php', @@ -244,7 +247,7 @@ private function analyzer($output, $analyzer, $files, $config, $project) $singleExecution = $config->get('application.analyzer.'.$analyzer.'.file.single-execution'); if ($singleExecution) { - $process = $this->executeProcess($output, $processArguments, $configFile, $prefixes, $postfixes, $arguments, $options); + $process = $this->executeProcess($io, $processArguments, $configFile, $prefixes, $postfixes, $arguments, $options); $success = $process->isSuccessful(); $files = []; } @@ -257,7 +260,7 @@ private function analyzer($output, $analyzer, $files, $config, $project) continue; } - $process = $this->executeProcess($output, $processArguments, $file, $prefixes, $postfixes, $arguments, $options); + $process = $this->executeProcess($io, $processArguments, $file, $prefixes, $postfixes, $arguments, $options); if ($success) { $success = $process->isSuccessful(); @@ -269,7 +272,17 @@ private function analyzer($output, $analyzer, $files, $config, $project) } } - public function executeProcess($output, $processArguments, $file, $prefixes, $postfixes, $arguments, $options) + /** + * @param $io + * @param $processArguments + * @param $file + * @param $prefixes + * @param $postfixes + * @param $arguments + * @param $options + * @return \Symfony\Component\Process\Process + */ + public function executeProcess(SymfonyStyle $io, $processArguments, $file, $prefixes, $postfixes, $arguments, $options) { foreach ($prefixes as $prefix) { $processArguments[] = $prefix; @@ -295,16 +308,20 @@ public function executeProcess($output, $processArguments, $file, $prefixes, $po $process->run(); if (!$process->isSuccessful()) { - $output->writeln(sprintf('%s', trim($process->getErrorOutput()))); + $io->error(trim($process->getErrorOutput())); } if ($process->getOutput()) { - $output->writeln($process->getOutput()); + $io->writeln($process->getOutput()); } return $process; } + /** + * @param $binaryFile + * @throws \Exception + */ private function validateBinary($binaryFile) { if (!file_exists($this->directory.$binaryFile)) { diff --git a/src/Command/InitCommand.php b/src/Command/InitCommand.php index 3582eea..398cc29 100644 --- a/src/Command/InitCommand.php +++ b/src/Command/InitCommand.php @@ -42,11 +42,6 @@ class InitCommand extends Command 'drupal' ]; - private $dirs = [ - 'home', - 'current' - ]; - protected function configure() { $this diff --git a/src/Input/FilesOption.php b/src/Input/FilesOption.php index ee7797a..6d535e9 100644 --- a/src/Input/FilesOption.php +++ b/src/Input/FilesOption.php @@ -4,7 +4,9 @@ class FilesOption { - /** @var array */ + /** + * @var array + */ private $files; /** diff --git a/src/Style/SymfonyStyle.php b/src/Style/SymfonyStyle.php new file mode 100644 index 0000000..7f3d6ac --- /dev/null +++ b/src/Style/SymfonyStyle.php @@ -0,0 +1,224 @@ +input = $input; + parent::__construct($input, $output); + } + + /** + * @param string $question + * @param array $choices + * @param mixed $default + * @param bool $allowEmpty + * + * @return string + */ + public function choiceNoList($question, array $choices, $default = null, $allowEmpty = false) + { + if ($allowEmpty) { + $default = ' '; + } + + if (is_null($default)) { + $default = current($choices); + } + + if (!in_array($default, $choices)) { + $choices[] = $default; + } + + if (null !== $default) { + $values = array_flip($choices); + $default = $values[$default]; + } + + return trim($this->askChoiceQuestion(new ChoiceQuestion($question, $choices, $default))); + } + + /** + * @param string $question + * @param array $choices + * @param null $default + * @param bool $multiple + * + * @return string + */ + public function choice($question, array $choices, $default = null, $multiple = false) + { + if (null !== $default) { + $values = array_flip($choices); + $default = $values[$default]; + } + + $choiceQuestion = new ChoiceQuestion($question, $choices, $default); + $choiceQuestion->setMultiselect($multiple); + + return $this->askQuestion($choiceQuestion); + } + + /** + * @param ChoiceQuestion $question + * + * @return string + */ + public function askChoiceQuestion(ChoiceQuestion $question) + { + $questionHelper = new QuestionHelper(); + $answer = $questionHelper->ask($this->input, $this, $question); + + return $answer; + } + + /** + * @param $question + * + * @return string + */ + public function askHiddenEmpty($question) + { + $question = new Question($question, ' '); + $question->setHidden(true); + + return trim($this->askQuestion($question)); + } + + /** + * @param string $question + * @param null|callable $validator + * + * @return string + */ + public function askEmpty($question, $validator = null) + { + $question = new Question($question, ' '); + $question->setValidator($validator); + + return trim($this->askQuestion($question)); + } + + /** + * @param $message + * @param bool $newLine + */ + public function info($message, $newLine = true) + { + $message = sprintf(' %s', $message); + if ($newLine) { + $this->writeln($message); + } else { + $this->write($message); + } + } + + /** + * @param array|string $message + * @param bool $newLine + */ + public function comment($message, $newLine = true) + { + $message = sprintf(' %s', $message); + if ($newLine) { + $this->writeln($message); + } else { + $this->write($message); + } + } + + /** + * @param $message + */ + public function commentBlock($message) + { + $this->block( + $message, null, + 'bg=yellow;fg=black', + ' ', + true + ); + } + + /** + * @param array $headers + * @param array $rows + * @param string $style + */ + public function table(array $headers, array $rows, $style = 'symfony-style-guide') + { + $headers = array_map( + function ($value) { + return sprintf('%s', $value); + }, $headers + ); + + if (!is_array(current($rows))) { + $rows = array_map( + function ($row) { + return [$row]; + }, + $rows + ); + } + + $table = new Table($this); + $table->setHeaders($headers); + $table->setRows($rows); + $table->setStyle($style); + + $table->render(); + $this->newLine(); + } + + /** + * @param $message + * @param bool $newLine + */ + public function simple($message, $newLine = true) + { + $message = sprintf(' %s', $message); + if ($newLine) { + $this->writeln($message); + } else { + $this->write($message); + } + } + + /** + * @param array|string $message + */ + public function text($message) + { + $message = sprintf('// %s', $message); + parent::text($message); + } +} diff --git a/src/Config.php b/src/Utils/Config.php similarity index 97% rename from src/Config.php rename to src/Utils/Config.php index 8e64c90..23d5155 100644 --- a/src/Config.php +++ b/src/Utils/Config.php @@ -5,7 +5,7 @@ * Contains \JMOlivas\Phpqa\Config. */ -namespace JMOlivas\Phpqa; +namespace JMOlivas\Phpqa\Utils; use Symfony\Component\Yaml\Parser; @@ -25,7 +25,7 @@ public function __construct() { $this->custom = false; $this->config = []; - $this->loadFile(__DIR__.'/../'.'phpqa.yml'); + $this->loadFile(__DIR__.'/../../'.'phpqa.yml'); if ($this->getApplicationConfigFile()) { $this->loadFile($this->getApplicationConfigFile()); $this->custom = true; @@ -77,7 +77,7 @@ public function getApplicationDirectory() public function getBaseConfigDirectory() { - return __DIR__.'/../config/'; + return __DIR__.'/../../config/'; } public function getUserConfigDirectory() diff --git a/tests/integration/Command/AnalyzeCommandTest.php b/tests/integration/Command/AnalyzeCommandTest.php index e446055..f196da5 100644 --- a/tests/integration/Command/AnalyzeCommandTest.php +++ b/tests/integration/Command/AnalyzeCommandTest.php @@ -2,7 +2,7 @@ namespace JMOlivas\Phpqa\Command; -use JMOlivas\Phpqa\Console\Application; +use JMOlivas\Phpqa\Application; use PHPUnit_Framework_TestCase as TestCase; use Symfony\Component\Console\Tester\CommandTester; @@ -13,7 +13,7 @@ class AnalyzeCommandTest extends TestCase * @expectedException \Exception * @expectedExceptionMessage You must set `files` or `git` options. */ - function it_should_throw_exception_if_neither_files_nor_git_options_are_provided() + public function it_should_throw_exception_if_neither_files_nor_git_options_are_provided() { $application = new Application(); $command = new AnalyzeCommand(); @@ -29,7 +29,7 @@ function it_should_throw_exception_if_neither_files_nor_git_options_are_provided * @expectedException \Exception * @expectedExceptionMessage Options `files` and `git` cannot be used in combination. */ - function it_should_throw_exception_if_both_files_and_git_options_are_provided() + public function it_should_throw_exception_if_both_files_and_git_options_are_provided() { $application = new Application(); $command = new AnalyzeCommand(); @@ -37,10 +37,12 @@ function it_should_throw_exception_if_both_files_and_git_options_are_provided() $tester = new CommandTester($command); - $tester->execute([ + $tester->execute( + [ '--files' => [null], '--git' => true - ]); + ] + ); } /** @@ -48,7 +50,7 @@ function it_should_throw_exception_if_both_files_and_git_options_are_provided() * @expectedException \Exception * @expectedExceptionMessage Options `files` needs at least one file. */ - function it_should_throw_exception_if_files_is_provided_but_it_is_empty() + public function it_should_throw_exception_if_files_is_provided_but_it_is_empty() { $application = new Application(); $command = new AnalyzeCommand(); @@ -56,8 +58,10 @@ function it_should_throw_exception_if_files_is_provided_but_it_is_empty() $tester = new CommandTester($command); - $tester->execute([ + $tester->execute( + [ '--files' => [null], - ]); + ] + ); } }