License updated to GPLv3

🧲 New features
Custom user role permissions
Employee edit form updated
Employee daily task list
Attendance and employee distribution charts on dashboard
Improvements to company structure and company assets module
Improved tables for displaying data in several modules
Faster data loading (specially for employee module)
Initials based profile pictures
Re-designed login page
Re-designed user profile page
Improvements to filtering
New REST endpoints for employee qualifications

🐛 Bug fixes
Fixed, issue with managers being able to create performance reviews for employees who are not their direct reports
Fixed, issues related to using full profile image instead of using smaller version of profile image
Changing third gender to other
Improvements and fixes for internal frontend data caching
This commit is contained in:
Thilina Pituwala
2020-10-31 19:02:37 +01:00
parent 86b8345505
commit b1df0037db
29343 changed files with 867614 additions and 2191082 deletions

View File

@@ -1,4 +1,11 @@
{
"config": {
"bin-dir": "../../../bin",
"process-timeout": 500,
"platform": {
"php": "7.0"
}
},
"require": {
"monolog/monolog": "^1.23",
"twig/twig": "1.23.*",
@@ -12,10 +19,18 @@
"cebe/markdown": "^1.2",
"neitanod/forceutf8": "^2.0",
"google/apiclient": "^2.2",
"predis/predis": "^1.1"
"predis/predis": "^1.1",
"firebase/php-jwt": "^5.2",
"pimple/pimple": "^3.2"
},
"require-dev": {
"phpunit/phpunit": "~6"
"phpunit/phpunit": "~6",
"pdepend/pdepend": "2.5.*",
"phploc/phploc": "4.0.*",
"phpmd/phpmd": "2.3.*",
"sebastian/phpcpd": "1.4.*",
"mayflower/php-codebrowser": "~1.1",
"squizlabs/php_codesniffer": "2.*"
},
"autoload": {
"psr-4": {

File diff suppressed because it is too large Load Diff

View File

@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit6d4a28cd96a5bc5d5b97781c062572d9::getLoader();
return ComposerAutoloaderInit5bce11e11de2274869867527dbd4b40e::getLoader();

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env php
<?php
include 'export-plural-rules.php';

View File

@@ -1,234 +0,0 @@
<?php
use Gettext\Languages\Exporter\Exporter;
use Gettext\Languages\Language;
// Let's start by imposing that we don't accept any error or warning.
// This is a really life-saving approach.
error_reporting(E_ALL);
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
Enviro::echoErr("$errstr\nFile: $errfile\nLine: $errline\nCode: $errno\n");
die(5);
});
require_once dirname(__DIR__).'/src/autoloader.php';
// Parse the command line options
Enviro::initialize();
try {
if (isset(Enviro::$languages)) {
$languages = array();
foreach (Enviro::$languages as $languageId) {
$language = Language::getById($languageId);
if (!isset($language)) {
throw new Exception("Unable to find the language with id '$languageId'");
}
$languages[] = $language;
}
} else {
$languages = Language::getAll();
}
if (Enviro::$reduce) {
$languages = Enviro::reduce($languages);
}
if (isset(Enviro::$outputFilename)) {
echo call_user_func(array(Exporter::getExporterClassName(Enviro::$outputFormat), 'toFile'), $languages, Enviro::$outputFilename, array('us-ascii' => Enviro::$outputUSAscii));
} else {
echo call_user_func(array(Exporter::getExporterClassName(Enviro::$outputFormat), 'toString'), $languages, array('us-ascii' => Enviro::$outputUSAscii));
}
} catch (Exception $x) {
Enviro::echoErr($x->getMessage()."\n");
Enviro::echoErr("Trace:\n");
Enviro::echoErr($x->getTraceAsString()."\n");
die(4);
}
die(0);
/**
* Helper class to handle command line options.
*/
class Enviro
{
/**
* Shall the output contain only US-ASCII characters?
* @var bool
*/
public static $outputUSAscii;
/**
* The output format.
* @var string
*/
public static $outputFormat;
/**
* Output file name.
* @var string
*/
public static $outputFilename;
/**
* List of wanted language IDs; it not set: all languages will be returned.
* @var array|null
*/
public static $languages;
/**
* Reduce the language list to the minimum common denominator.
* @var bool
*/
public static $reduce;
/**
* Parse the command line options.
*/
public static function initialize()
{
global $argv;
self::$outputUSAscii = false;
self::$outputFormat = null;
self::$outputFilename = null;
self::$languages = null;
self::$reduce = null;
$exporters = Exporter::getExporters();
if (isset($argv) && is_array($argv)) {
foreach ($argv as $argi => $arg) {
if ($argi === 0) {
continue;
}
if (is_string($arg)) {
$argLC = trim(strtolower($arg));
switch ($argLC) {
case '--us-ascii':
self::$outputUSAscii = true;
break;
case '--reduce=yes':
self::$reduce = true;
break;
case '--reduce=no':
self::$reduce = false;
break;
default:
if (preg_match('/^--output=.+$/', $argLC)) {
if (isset(self::$outputFilename)) {
self::echoErr("The output file name has been specified more than once!\n");
self::showSyntax();
die(3);
}
list(, self::$outputFilename) = explode('=', $arg, 2);
self::$outputFilename = trim(self::$outputFilename);
} elseif (preg_match('/^--languages?=.+$/', $argLC)) {
list(, $s) = explode('=', $arg, 2);
$list = explode(',', $s);
if (is_array(self::$languages)) {
self::$languages = array_merge(self::$languages, $list);
} else {
self::$languages = $list;
}
} elseif (isset($exporters[$argLC])) {
if (isset(self::$outputFormat)) {
self::echoErr("The output format has been specified more than once!\n");
self::showSyntax();
die(3);
}
self::$outputFormat = $argLC;
} else {
self::echoErr("Unknown option: $arg\n");
self::showSyntax();
die(2);
}
break;
}
}
}
}
if (!isset(self::$outputFormat)) {
self::showSyntax();
die(1);
}
if (isset(self::$languages)) {
self::$languages = array_values(array_unique(self::$languages));
}
if (!isset(self::$reduce)) {
self::$reduce = isset(self::$languages) ? false : true;
}
}
/**
* Write out the syntax.
*/
public static function showSyntax()
{
$exporters = array_keys(Exporter::getExporters(true));
self::echoErr("Syntax: php ".basename(__FILE__)." [--us-ascii] [--languages=<LanguageId>[,<LanguageId>,...]] [--reduce=yes|no] [--output=<file name>] <".implode('|', $exporters).">\n");
self::echoErr("Where:\n");
self::echoErr("--us-ascii : if specified, the output will contain only US-ASCII characters.\n");
self::echoErr("--languages: (or --language) export only the specified language codes.\n");
self::echoErr(" Separate languages with commas; you can also use this argument\n");
self::echoErr(" more than once; it's case insensitive and accepts both '_' and\n");
self::echoErr(" '-' as locale chunks separator (eg we accept 'it_IT' as well as\n");
self::echoErr(" 'it-it').\n");
self::echoErr("--reduce : if set to yes the output won't contain languages with the same\n");
self::echoErr(" base language and rules.\n For instance nl_BE ('Flemish') will be\n");
self::echoErr(" omitted because it's the same as nl ('Dutch').\n");
self::echoErr(" Defaults to 'no' --languages is specified, to 'yes' otherwise.\n");
self::echoErr("--output : if specified, the output will be saved to <file name>. If not\n");
self::echoErr(" specified we'll output to standard output.\n");
self::echoErr("Output formats\n");
$len = max(array_map('strlen', $exporters));
foreach ($exporters as $exporter) {
self::echoErr(str_pad($exporter, $len).": ".Exporter::getExporterDescription($exporter)."\n");
}
}
/**
* Print a string to stderr.
* @param string $str The string to be printed out.
*/
public static function echoErr($str)
{
$hStdErr = @fopen('php://stderr', 'a');
if ($hStdErr === false) {
echo $str;
} else {
fwrite($hStdErr, $str);
fclose($hStdErr);
}
}
/**
* Reduce a language list to the minimum common denominator.
* @param Language[] $languages
* @return Language[]
*/
public static function reduce($languages)
{
for ($numChunks = 3; $numChunks >= 2; $numChunks--) {
$filtered = array();
foreach ($languages as $language) {
$chunks = explode('_', $language->id);
$compatibleFound = false;
if (count($chunks) === $numChunks) {
$categoriesHash = serialize($language->categories);
$otherIds = array();
$otherIds[] = $chunks[0];
for ($k = 2; $k < $numChunks; $k++) {
$otherIds[] = $chunks[0].'_'.$chunks[$numChunks - 1];
}
foreach ($languages as $check) {
foreach ($otherIds as $otherId) {
if (($check->id === $otherId) && ($check->formula === $language->formula) && (serialize($check->categories) === $categoriesHash)) {
$compatibleFound = true;
break;
}
}
if ($compatibleFound === true) {
break;
}
}
}
if (!$compatibleFound) {
$filtered[] = $language;
}
}
$languages = $filtered;
}
return $languages;
}
}

View File

@@ -1,170 +0,0 @@
#!/usr/bin/env php
<?php
/**
* @copyright Copyright (c) 2014 Carsten Brandt
* @license https://github.com/cebe/markdown/blob/master/LICENSE
* @link https://github.com/cebe/markdown#readme
*/
$composerAutoload = [
__DIR__ . '/../vendor/autoload.php', // standalone with "composer install" run
__DIR__ . '/../../../autoload.php', // script is installed as a composer binary
];
foreach ($composerAutoload as $autoload) {
if (file_exists($autoload)) {
require($autoload);
break;
}
}
// Send all errors to stderr
ini_set('display_errors', 'stderr');
$flavor = 'cebe\\markdown\\Markdown';
$flavors = [
'gfm' => ['cebe\\markdown\\GithubMarkdown', __DIR__ . '/../GithubMarkdown.php'],
'extra' => ['cebe\\markdown\\MarkdownExtra', __DIR__ . '/../MarkdownExtra.php'],
];
$full = false;
$src = [];
foreach($argv as $k => $arg) {
if ($k == 0) {
continue;
}
if ($arg[0] == '-') {
$arg = explode('=', $arg);
switch($arg[0]) {
case '--flavor':
if (isset($arg[1])) {
if (isset($flavors[$arg[1]])) {
require($flavors[$arg[1]][1]);
$flavor = $flavors[$arg[1]][0];
} else {
error("Unknown flavor: " . $arg[1], "usage");
}
} else {
error("Incomplete argument --flavor!", "usage");
}
break;
case '--full':
$full = true;
break;
case '-h':
case '--help':
echo "PHP Markdown to HTML converter\n";
echo "------------------------------\n\n";
echo "by Carsten Brandt <mail@cebe.cc>\n\n";
usage();
break;
default:
error("Unknown argument " . $arg[0], "usage");
}
} else {
$src[] = $arg;
}
}
if (empty($src)) {
$markdown = file_get_contents("php://stdin");
} elseif (count($src) == 1) {
$file = reset($src);
if (!file_exists($file)) {
error("File does not exist:" . $file);
}
$markdown = file_get_contents($file);
} else {
error("Converting multiple files is not yet supported.", "usage");
}
/** @var cebe\markdown\Parser $md */
$md = new $flavor();
$markup = $md->parse($markdown);
if ($full) {
echo <<<HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style>
body { font-family: Arial, sans-serif; }
code { background: #eeeeff; padding: 2px; }
li { margin-bottom: 5px; }
img { max-width: 1200px; }
table, td, th { border: solid 1px #ccc; border-collapse: collapse; }
</style>
</head>
<body>
$markup
</body>
</html>
HTML;
} else {
echo $markup;
}
// functions
/**
* Display usage information
*/
function usage() {
global $argv;
$cmd = $argv[0];
echo <<<EOF
Usage:
$cmd [--flavor=<flavor>] [--full] [file.md]
--flavor specifies the markdown flavor to use. If omitted the original markdown by John Gruber [1] will be used.
Available flavors:
gfm - Github flavored markdown [2]
extra - Markdown Extra [3]
--full ouput a full HTML page with head and body. If not given, only the parsed markdown will be output.
--help shows this usage information.
If no file is specified input will be read from STDIN.
Examples:
Render a file with original markdown:
$cmd README.md > README.html
Render a file using gihtub flavored markdown:
$cmd --flavor=gfm README.md > README.html
Convert the original markdown description to html using STDIN:
curl http://daringfireball.net/projects/markdown/syntax.text | $cmd > md.html
[1] http://daringfireball.net/projects/markdown/syntax
[2] https://help.github.com/articles/github-flavored-markdown
[3] http://michelf.ca/projects/php-markdown/extra/
EOF;
exit(1);
}
/**
* Send custom error message to stderr
* @param $message string
* @param $callback mixed called before script exit
* @return void
*/
function error($message, $callback = null) {
$fe = fopen("php://stderr", "w");
fwrite($fe, "Error: " . $message . "\n");
if (is_callable($callback)) {
call_user_func($callback);
}
exit(1);
}

View File

@@ -1,53 +0,0 @@
#!/usr/bin/env php
<?php
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (version_compare('7.0.0', PHP_VERSION, '>')) {
fwrite(
STDERR,
sprintf(
'This version of PHPUnit is supported on PHP 7.0 and PHP 7.1.' . PHP_EOL .
'You are using PHP %s (%s).' . PHP_EOL,
PHP_VERSION,
PHP_BINARY
)
);
die(1);
}
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
if (file_exists($file)) {
define('PHPUNIT_COMPOSER_INSTALL', $file);
break;
}
}
unset($file);
if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
fwrite(
STDERR,
'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
' composer install' . PHP_EOL . PHP_EOL .
'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL
);
die(1);
}
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env php
<?php
/**
* if we're running from phar load the phar autoload,
* else let the script 'robo' search for the autoloader
*/
if (strpos(basename(__FILE__), 'phar')) {
require_once 'phar://robo.phar/vendor/autoload.php';
} else {
if (file_exists(__DIR__.'/vendor/autoload.php')) {
require_once __DIR__.'/vendor/autoload.php';
} elseif (file_exists(__DIR__.'/../../autoload.php')) {
require_once __DIR__ . '/../../autoload.php';
} else {
require_once 'phar://robo.phar/vendor/autoload.php';
}
}
$runner = new \Robo\Runner();
$runner->setSelfUpdateRepository('consolidation/robo');
$statusCode = $runner->execute($_SERVER['argv']);
exit($statusCode);

View File

@@ -6,11 +6,113 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'DivisionByZeroError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
'Error' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/Error.php',
'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php',
'Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php',
'Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php',
'Generic_Sniffs_Classes_DuplicateClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php',
'Generic_Sniffs_Classes_OpeningBraceSameLineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php',
'Generic_Sniffs_CodeAnalysis_EmptyStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php',
'Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php',
'Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php',
'Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php',
'Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php',
'Generic_Sniffs_CodeAnalysis_UnnecessaryFinalModifierSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php',
'Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php',
'Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php',
'Generic_Sniffs_Commenting_DocCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php',
'Generic_Sniffs_Commenting_FixmeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php',
'Generic_Sniffs_Commenting_TodoSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php',
'Generic_Sniffs_ControlStructures_InlineControlStructureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php',
'Generic_Sniffs_Debug_CSSLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php',
'Generic_Sniffs_Debug_ClosureLinterSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php',
'Generic_Sniffs_Debug_ESLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ESLintSniff.php',
'Generic_Sniffs_Debug_JSHintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php',
'Generic_Sniffs_Files_ByteOrderMarkSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php',
'Generic_Sniffs_Files_EndFileNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php',
'Generic_Sniffs_Files_EndFileNoNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php',
'Generic_Sniffs_Files_InlineHTMLSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php',
'Generic_Sniffs_Files_LineEndingsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php',
'Generic_Sniffs_Files_LineLengthSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php',
'Generic_Sniffs_Files_LowercasedFilenameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php',
'Generic_Sniffs_Files_OneClassPerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php',
'Generic_Sniffs_Files_OneInterfacePerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php',
'Generic_Sniffs_Files_OneTraitPerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php',
'Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php',
'Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php',
'Generic_Sniffs_Formatting_NoSpaceAfterCastSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php',
'Generic_Sniffs_Formatting_SpaceAfterCastSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php',
'Generic_Sniffs_Formatting_SpaceAfterNotSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php',
'Generic_Sniffs_Functions_CallTimePassByReferenceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php',
'Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php',
'Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php',
'Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php',
'Generic_Sniffs_Metrics_CyclomaticComplexitySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php',
'Generic_Sniffs_Metrics_NestingLevelSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php',
'Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php',
'Generic_Sniffs_NamingConventions_ConstructorNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php',
'Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php',
'Generic_Sniffs_PHP_BacktickOperatorSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php',
'Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php',
'Generic_Sniffs_PHP_ClosingPHPTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php',
'Generic_Sniffs_PHP_DeprecatedFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php',
'Generic_Sniffs_PHP_DisallowAlternativePHPTagsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php',
'Generic_Sniffs_PHP_DisallowShortOpenTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php',
'Generic_Sniffs_PHP_ForbiddenFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php',
'Generic_Sniffs_PHP_LowerCaseConstantSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php',
'Generic_Sniffs_PHP_LowerCaseKeywordSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php',
'Generic_Sniffs_PHP_NoSilencedErrorsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php',
'Generic_Sniffs_PHP_SAPIUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php',
'Generic_Sniffs_PHP_SyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php',
'Generic_Sniffs_PHP_UpperCaseConstantSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php',
'Generic_Sniffs_Strings_UnnecessaryStringConcatSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php',
'Generic_Sniffs_VersionControl_SubversionPropertiesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php',
'Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php',
'Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php',
'Generic_Sniffs_WhiteSpace_ScopeIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php',
'Google_Service_Exception' => $vendorDir . '/google/apiclient/src/Google/Service/Exception.php',
'Google_Service_Resource' => $vendorDir . '/google/apiclient/src/Google/Service/Resource.php',
'MySource_Sniffs_CSS_BrowserSpecificStylesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php',
'MySource_Sniffs_Channels_DisallowSelfActionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php',
'MySource_Sniffs_Channels_IncludeOwnSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php',
'MySource_Sniffs_Channels_IncludeSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php',
'MySource_Sniffs_Channels_UnusedSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php',
'MySource_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php',
'MySource_Sniffs_Debug_DebugCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php',
'MySource_Sniffs_Debug_FirebugConsoleSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php',
'MySource_Sniffs_Objects_AssignThisSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php',
'MySource_Sniffs_Objects_CreateWidgetTypeCallbackSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php',
'MySource_Sniffs_Objects_DisallowNewWidgetSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php',
'MySource_Sniffs_PHP_AjaxNullComparisonSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php',
'MySource_Sniffs_PHP_EvalObjectFactorySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php',
'MySource_Sniffs_PHP_GetRequestDataSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php',
'MySource_Sniffs_PHP_ReturnFunctionValueSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php',
'MySource_Sniffs_Strings_JoinStringsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php',
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PEAR_Exception' => $vendorDir . '/pear/pear_exception/PEAR/Exception.php',
'PEAR_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php',
'PEAR_Sniffs_Commenting_ClassCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php',
'PEAR_Sniffs_Commenting_FileCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php',
'PEAR_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php',
'PEAR_Sniffs_Commenting_InlineCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php',
'PEAR_Sniffs_ControlStructures_ControlSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php',
'PEAR_Sniffs_ControlStructures_MultiLineConditionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php',
'PEAR_Sniffs_Files_IncludingFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php',
'PEAR_Sniffs_Formatting_MultiLineAssignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php',
'PEAR_Sniffs_Functions_FunctionCallSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php',
'PEAR_Sniffs_Functions_FunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php',
'PEAR_Sniffs_Functions_ValidDefaultValueSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php',
'PEAR_Sniffs_NamingConventions_ValidClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php',
'PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
'PEAR_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php',
'PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php',
'PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
'PEAR_Sniffs_WhiteSpace_ScopeIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php',
'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php',
@@ -183,6 +285,44 @@ return array(
'PHPUnit\\Util\\Xml' => $vendorDir . '/phpunit/phpunit/src/Util/Xml.php',
'PHPUnit\\Util\\XmlTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/MockObject.php',
'PHP_CodeSniffer' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer.php',
'PHP_CodeSniffer_CLI' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/CLI.php',
'PHP_CodeSniffer_DocGenerators_Generator' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php',
'PHP_CodeSniffer_DocGenerators_HTML' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php',
'PHP_CodeSniffer_DocGenerators_Markdown' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php',
'PHP_CodeSniffer_DocGenerators_Text' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php',
'PHP_CodeSniffer_Exception' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Exception.php',
'PHP_CodeSniffer_File' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/File.php',
'PHP_CodeSniffer_Fixer' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Fixer.php',
'PHP_CodeSniffer_Report' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Report.php',
'PHP_CodeSniffer_Reporting' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reporting.php',
'PHP_CodeSniffer_Reports_Cbf' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php',
'PHP_CodeSniffer_Reports_Checkstyle' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php',
'PHP_CodeSniffer_Reports_Csv' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php',
'PHP_CodeSniffer_Reports_Diff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php',
'PHP_CodeSniffer_Reports_Emacs' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php',
'PHP_CodeSniffer_Reports_Full' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php',
'PHP_CodeSniffer_Reports_Gitblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php',
'PHP_CodeSniffer_Reports_Hgblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php',
'PHP_CodeSniffer_Reports_Info' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php',
'PHP_CodeSniffer_Reports_Json' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php',
'PHP_CodeSniffer_Reports_Junit' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php',
'PHP_CodeSniffer_Reports_Notifysend' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php',
'PHP_CodeSniffer_Reports_Source' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php',
'PHP_CodeSniffer_Reports_Summary' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php',
'PHP_CodeSniffer_Reports_Svnblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php',
'PHP_CodeSniffer_Reports_VersionControl' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php',
'PHP_CodeSniffer_Reports_Xml' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php',
'PHP_CodeSniffer_Sniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Sniff.php',
'PHP_CodeSniffer_Standards_AbstractPatternSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php',
'PHP_CodeSniffer_Standards_AbstractScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php',
'PHP_CodeSniffer_Standards_AbstractVariableSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php',
'PHP_CodeSniffer_Standards_IncorrectPatternException' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php',
'PHP_CodeSniffer_Tokenizers_CSS' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php',
'PHP_CodeSniffer_Tokenizers_Comment' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php',
'PHP_CodeSniffer_Tokenizers_JS' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php',
'PHP_CodeSniffer_Tokenizers_PHP' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php',
'PHP_CodeSniffer_Tokens' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokens.php',
'PHP_Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php',
'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
@@ -383,6 +523,22 @@ return array(
'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PSR1_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php',
'PSR1_Sniffs_Files_SideEffectsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php',
'PSR1_Sniffs_Methods_CamelCapsMethodNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php',
'PSR2_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php',
'PSR2_Sniffs_Classes_PropertyDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php',
'PSR2_Sniffs_ControlStructures_ControlStructureSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php',
'PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
'PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
'PSR2_Sniffs_Files_ClosingTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php',
'PSR2_Sniffs_Files_EndFileNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php',
'PSR2_Sniffs_Methods_FunctionCallSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php',
'PSR2_Sniffs_Methods_FunctionClosingBraceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php',
'PSR2_Sniffs_Methods_MethodDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php',
'PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php',
'PSR2_Sniffs_Namespaces_UseDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php',
'ParseError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ParseError.php',
'PharIo\\Manifest\\Application' => $vendorDir . '/phar-io/manifest/src/values/Application.php',
'PharIo\\Manifest\\ApplicationName' => $vendorDir . '/phar-io/manifest/src/values/ApplicationName.php',
'PharIo\\Manifest\\Author' => $vendorDir . '/phar-io/manifest/src/values/Author.php',
@@ -524,6 +680,8 @@ return array(
'SebastianBergmann\\Environment\\OperatingSystem' => $vendorDir . '/sebastian/environment/src/OperatingSystem.php',
'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php',
'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php',
'SebastianBergmann\\FinderFacade\\Configuration' => $vendorDir . '/sebastian/finder-facade/src/Configuration.php',
'SebastianBergmann\\FinderFacade\\FinderFacade' => $vendorDir . '/sebastian/finder-facade/src/FinderFacade.php',
'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php',
'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php',
'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/exceptions/Exception.php',
@@ -536,11 +694,131 @@ return array(
'SebastianBergmann\\ObjectReflector\\Exception' => $vendorDir . '/sebastian/object-reflector/src/Exception.php',
'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => $vendorDir . '/sebastian/object-reflector/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php',
'SebastianBergmann\\PHPCPD\\CodeClone' => $vendorDir . '/sebastian/phpcpd/src/CodeClone.php',
'SebastianBergmann\\PHPCPD\\CodeCloneMap' => $vendorDir . '/sebastian/phpcpd/src/CodeCloneMap.php',
'SebastianBergmann\\PHPCPD\\Detector\\Detector' => $vendorDir . '/sebastian/phpcpd/src/Detector/Detector.php',
'SebastianBergmann\\PHPCPD\\Detector\\Strategy\\AbstractStrategy' => $vendorDir . '/sebastian/phpcpd/src/Detector/Strategy/Abstract.php',
'SebastianBergmann\\PHPCPD\\Detector\\Strategy\\DefaultStrategy' => $vendorDir . '/sebastian/phpcpd/src/Detector/Strategy/Default.php',
'SebastianBergmann\\PHPCPD\\Log\\AbstractXmlLogger' => $vendorDir . '/sebastian/phpcpd/src/Log/AbstractXmlLogger.php',
'SebastianBergmann\\PHPCPD\\Log\\PMD' => $vendorDir . '/sebastian/phpcpd/src/Log/PMD.php',
'SebastianBergmann\\PHPCPD\\TextUI\\Command' => $vendorDir . '/sebastian/phpcpd/src/TextUI/Command.php',
'SebastianBergmann\\PHPCPD\\TextUI\\ResultPrinter' => $vendorDir . '/sebastian/phpcpd/src/TextUI/ResultPrinter.php',
'SebastianBergmann\\PHPLOC\\Analyser' => $vendorDir . '/phploc/phploc/src/Analyser.php',
'SebastianBergmann\\PHPLOC\\CLI\\Application' => $vendorDir . '/phploc/phploc/src/CLI/Application.php',
'SebastianBergmann\\PHPLOC\\CLI\\Command' => $vendorDir . '/phploc/phploc/src/CLI/Command.php',
'SebastianBergmann\\PHPLOC\\Collector' => $vendorDir . '/phploc/phploc/src/Collector.php',
'SebastianBergmann\\PHPLOC\\Exception' => $vendorDir . '/phploc/phploc/src/Exception/Exception.php',
'SebastianBergmann\\PHPLOC\\Log\\Csv' => $vendorDir . '/phploc/phploc/src/Log/Csv.php',
'SebastianBergmann\\PHPLOC\\Log\\Text' => $vendorDir . '/phploc/phploc/src/Log/Text.php',
'SebastianBergmann\\PHPLOC\\Log\\Xml' => $vendorDir . '/phploc/phploc/src/Log/Xml.php',
'SebastianBergmann\\PHPLOC\\Publisher' => $vendorDir . '/phploc/phploc/src/Publisher.php',
'SebastianBergmann\\PHPLOC\\RuntimeException' => $vendorDir . '/phploc/phploc/src/Exception/RuntimeException.php',
'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php',
'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php',
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php',
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php',
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
'SessionUpdateTimestampHandlerInterface' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
'Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php',
'Squiz_Sniffs_Arrays_ArrayDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php',
'Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php',
'Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php',
'Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php',
'Squiz_Sniffs_CSS_ColonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php',
'Squiz_Sniffs_CSS_ColourDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php',
'Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php',
'Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php',
'Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php',
'Squiz_Sniffs_CSS_EmptyClassDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php',
'Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php',
'Squiz_Sniffs_CSS_ForbiddenStylesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php',
'Squiz_Sniffs_CSS_IndentationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php',
'Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php',
'Squiz_Sniffs_CSS_MissingColonSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php',
'Squiz_Sniffs_CSS_NamedColoursSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php',
'Squiz_Sniffs_CSS_OpacitySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php',
'Squiz_Sniffs_CSS_SemicolonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php',
'Squiz_Sniffs_CSS_ShorthandSizeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php',
'Squiz_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php',
'Squiz_Sniffs_Classes_ClassFileNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php',
'Squiz_Sniffs_Classes_DuplicatePropertySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php',
'Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php',
'Squiz_Sniffs_Classes_SelfMemberReferenceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php',
'Squiz_Sniffs_Classes_ValidClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php',
'Squiz_Sniffs_Commenting_BlockCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php',
'Squiz_Sniffs_Commenting_ClassCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php',
'Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php',
'Squiz_Sniffs_Commenting_DocCommentAlignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php',
'Squiz_Sniffs_Commenting_EmptyCatchCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php',
'Squiz_Sniffs_Commenting_FileCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php',
'Squiz_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php',
'Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php',
'Squiz_Sniffs_Commenting_InlineCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php',
'Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php',
'Squiz_Sniffs_Commenting_PostStatementCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php',
'Squiz_Sniffs_Commenting_VariableCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php',
'Squiz_Sniffs_ControlStructures_ControlSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php',
'Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
'Squiz_Sniffs_Debug_JSLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php',
'Squiz_Sniffs_Debug_JavaScriptLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php',
'Squiz_Sniffs_Files_FileExtensionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php',
'Squiz_Sniffs_Formatting_OperatorBracketSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php',
'Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php',
'Squiz_Sniffs_Functions_FunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php',
'Squiz_Sniffs_Functions_FunctionDuplicateArgumentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php',
'Squiz_Sniffs_Functions_GlobalFunctionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php',
'Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php',
'Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php',
'Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
'Squiz_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php',
'Squiz_Sniffs_Objects_DisallowObjectStringIndexSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php',
'Squiz_Sniffs_Objects_ObjectInstantiationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php',
'Squiz_Sniffs_Objects_ObjectMemberCommaSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php',
'Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php',
'Squiz_Sniffs_Operators_IncrementDecrementUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php',
'Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php',
'Squiz_Sniffs_PHP_CommentedOutCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php',
'Squiz_Sniffs_PHP_DisallowBooleanStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php',
'Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php',
'Squiz_Sniffs_PHP_DisallowInlineIfSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php',
'Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php',
'Squiz_Sniffs_PHP_DisallowObEndFlushSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php',
'Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php',
'Squiz_Sniffs_PHP_DiscouragedFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php',
'Squiz_Sniffs_PHP_EmbeddedPhpSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php',
'Squiz_Sniffs_PHP_EvalSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php',
'Squiz_Sniffs_PHP_ForbiddenFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php',
'Squiz_Sniffs_PHP_GlobalKeywordSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php',
'Squiz_Sniffs_PHP_HeredocSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php',
'Squiz_Sniffs_PHP_InnerFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php',
'Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php',
'Squiz_Sniffs_PHP_NonExecutableCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php',
'Squiz_Sniffs_Scope_MemberVarScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php',
'Squiz_Sniffs_Scope_MethodScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php',
'Squiz_Sniffs_Scope_StaticThisUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php',
'Squiz_Sniffs_Strings_ConcatenationSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php',
'Squiz_Sniffs_Strings_DoubleQuoteUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php',
'Squiz_Sniffs_Strings_EchoedStringsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php',
'Squiz_Sniffs_WhiteSpace_CastSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php',
'Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php',
'Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_LogicalOperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
'Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php',
'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
@@ -550,4 +828,117 @@ return array(
'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php',
'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php',
'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php',
'TheSeer\\fDOM\\CSS\\DollarEqualRule' => $vendorDir . '/theseer/fdomdocument/src/css/DollarEqualRule.php',
'TheSeer\\fDOM\\CSS\\NotRule' => $vendorDir . '/theseer/fdomdocument/src/css/NotRule.php',
'TheSeer\\fDOM\\CSS\\NthChildRule' => $vendorDir . '/theseer/fdomdocument/src/css/NthChildRule.php',
'TheSeer\\fDOM\\CSS\\RegexRule' => $vendorDir . '/theseer/fdomdocument/src/css/RegexRule.php',
'TheSeer\\fDOM\\CSS\\RuleInterface' => $vendorDir . '/theseer/fdomdocument/src/css/RuleInterface.php',
'TheSeer\\fDOM\\CSS\\Translator' => $vendorDir . '/theseer/fdomdocument/src/css/Translator.php',
'TheSeer\\fDOM\\XPathQuery' => $vendorDir . '/theseer/fdomdocument/src/XPathQuery.php',
'TheSeer\\fDOM\\XPathQueryException' => $vendorDir . '/theseer/fdomdocument/src/XPathQueryException.php',
'TheSeer\\fDOM\\fDOMDocument' => $vendorDir . '/theseer/fdomdocument/src/fDOMDocument.php',
'TheSeer\\fDOM\\fDOMDocumentFragment' => $vendorDir . '/theseer/fdomdocument/src/fDOMDocumentFragment.php',
'TheSeer\\fDOM\\fDOMElement' => $vendorDir . '/theseer/fdomdocument/src/fDOMElement.php',
'TheSeer\\fDOM\\fDOMException' => $vendorDir . '/theseer/fdomdocument/src/fDOMException.php',
'TheSeer\\fDOM\\fDOMNode' => $vendorDir . '/theseer/fdomdocument/src/fDOMNode.php',
'TheSeer\\fDOM\\fDOMXPath' => $vendorDir . '/theseer/fdomdocument/src/fDOMXPath.php',
'TypeError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
'Zend_Sniffs_Debug_CodeAnalyzerSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php',
'Zend_Sniffs_Files_ClosingTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php',
'Zend_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php',
'ezcBase' => $vendorDir . '/zetacomponents/base/src/base.php',
'ezcBaseAutoloadException' => $vendorDir . '/zetacomponents/base/src/exceptions/autoload.php',
'ezcBaseAutoloadOptions' => $vendorDir . '/zetacomponents/base/src/options/autoload.php',
'ezcBaseConfigurationInitializer' => $vendorDir . '/zetacomponents/base/src/interfaces/configuration_initializer.php',
'ezcBaseDoubleClassRepositoryPrefixException' => $vendorDir . '/zetacomponents/base/src/exceptions/double_class_repository_prefix.php',
'ezcBaseException' => $vendorDir . '/zetacomponents/base/src/exceptions/exception.php',
'ezcBaseExportable' => $vendorDir . '/zetacomponents/base/src/interfaces/exportable.php',
'ezcBaseExtensionNotFoundException' => $vendorDir . '/zetacomponents/base/src/exceptions/extension_not_found.php',
'ezcBaseFeatures' => $vendorDir . '/zetacomponents/base/src/features.php',
'ezcBaseFile' => $vendorDir . '/zetacomponents/base/src/file.php',
'ezcBaseFileException' => $vendorDir . '/zetacomponents/base/src/exceptions/file_exception.php',
'ezcBaseFileFindContext' => $vendorDir . '/zetacomponents/base/src/structs/file_find_context.php',
'ezcBaseFileIoException' => $vendorDir . '/zetacomponents/base/src/exceptions/file_io.php',
'ezcBaseFileNotFoundException' => $vendorDir . '/zetacomponents/base/src/exceptions/file_not_found.php',
'ezcBaseFilePermissionException' => $vendorDir . '/zetacomponents/base/src/exceptions/file_permission.php',
'ezcBaseFunctionalityNotSupportedException' => $vendorDir . '/zetacomponents/base/src/exceptions/functionality_not_supported.php',
'ezcBaseInit' => $vendorDir . '/zetacomponents/base/src/init.php',
'ezcBaseInitCallbackConfiguredException' => $vendorDir . '/zetacomponents/base/src/exceptions/init_callback_configured.php',
'ezcBaseInitInvalidCallbackClassException' => $vendorDir . '/zetacomponents/base/src/exceptions/invalid_callback_class.php',
'ezcBaseInvalidParentClassException' => $vendorDir . '/zetacomponents/base/src/exceptions/invalid_parent_class.php',
'ezcBaseMetaData' => $vendorDir . '/zetacomponents/base/src/metadata.php',
'ezcBaseMetaDataPearReader' => $vendorDir . '/zetacomponents/base/src/metadata/pear.php',
'ezcBaseMetaDataTarballReader' => $vendorDir . '/zetacomponents/base/src/metadata/tarball.php',
'ezcBaseOptions' => $vendorDir . '/zetacomponents/base/src/options.php',
'ezcBasePersistable' => $vendorDir . '/zetacomponents/base/src/interfaces/persistable.php',
'ezcBasePropertyNotFoundException' => $vendorDir . '/zetacomponents/base/src/exceptions/property_not_found.php',
'ezcBasePropertyPermissionException' => $vendorDir . '/zetacomponents/base/src/exceptions/property_permission.php',
'ezcBaseRepositoryDirectory' => $vendorDir . '/zetacomponents/base/src/structs/repository_directory.php',
'ezcBaseSettingNotFoundException' => $vendorDir . '/zetacomponents/base/src/exceptions/setting_not_found.php',
'ezcBaseSettingValueException' => $vendorDir . '/zetacomponents/base/src/exceptions/setting_value.php',
'ezcBaseStruct' => $vendorDir . '/zetacomponents/base/src/struct.php',
'ezcBaseValueException' => $vendorDir . '/zetacomponents/base/src/exceptions/value.php',
'ezcBaseWhateverException' => $vendorDir . '/zetacomponents/base/src/exceptions/whatever.php',
'ezcConsoleArgument' => $vendorDir . '/zetacomponents/console-tools/src/input/argument.php',
'ezcConsoleArgumentAlreadyRegisteredException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/argument_already_registered.php',
'ezcConsoleArgumentException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/argument.php',
'ezcConsoleArgumentMandatoryViolationException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/argument_mandatory_violation.php',
'ezcConsoleArgumentTypeViolationException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/argument_type_violation.php',
'ezcConsoleArguments' => $vendorDir . '/zetacomponents/console-tools/src/input/arguments.php',
'ezcConsoleDialog' => $vendorDir . '/zetacomponents/console-tools/src/interfaces/dialog.php',
'ezcConsoleDialogAbortException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/dialog_abort.php',
'ezcConsoleDialogOptions' => $vendorDir . '/zetacomponents/console-tools/src/options/dialog.php',
'ezcConsoleDialogValidator' => $vendorDir . '/zetacomponents/console-tools/src/interfaces/dialog_validator.php',
'ezcConsoleDialogViewer' => $vendorDir . '/zetacomponents/console-tools/src/dialog_viewer.php',
'ezcConsoleException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/exception.php',
'ezcConsoleInput' => $vendorDir . '/zetacomponents/console-tools/src/input.php',
'ezcConsoleInputHelpGenerator' => $vendorDir . '/zetacomponents/console-tools/src/interfaces/input_help_generator.php',
'ezcConsoleInputStandardHelpGenerator' => $vendorDir . '/zetacomponents/console-tools/src/input/help_generators/standard.php',
'ezcConsoleInputValidator' => $vendorDir . '/zetacomponents/console-tools/src/interfaces/input_validator.php',
'ezcConsoleInvalidOptionNameException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/invalid_option_name.php',
'ezcConsoleInvalidOutputTargetException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/invalid_output_target.php',
'ezcConsoleMenuDialog' => $vendorDir . '/zetacomponents/console-tools/src/dialog/menu_dialog.php',
'ezcConsoleMenuDialogDefaultValidator' => $vendorDir . '/zetacomponents/console-tools/src/dialog/validators/menu_dialog_default.php',
'ezcConsoleMenuDialogOptions' => $vendorDir . '/zetacomponents/console-tools/src/options/menu_dialog.php',
'ezcConsoleMenuDialogValidator' => $vendorDir . '/zetacomponents/console-tools/src/interfaces/menu_dialog_validator.php',
'ezcConsoleNoPositionStoredException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/no_position_stored.php',
'ezcConsoleNoValidDialogResultException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/no_valid_dialog_result.php',
'ezcConsoleOption' => $vendorDir . '/zetacomponents/console-tools/src/input/option.php',
'ezcConsoleOptionAlreadyRegisteredException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_already_registered.php',
'ezcConsoleOptionArgumentsViolationException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_arguments_violation.php',
'ezcConsoleOptionDependencyViolationException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_dependency_violation.php',
'ezcConsoleOptionException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option.php',
'ezcConsoleOptionExclusionViolationException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_exclusion_violation.php',
'ezcConsoleOptionMandatoryViolationException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_mandatory_violation.php',
'ezcConsoleOptionMissingValueException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_missing_value.php',
'ezcConsoleOptionNoAliasException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_no_alias.php',
'ezcConsoleOptionNotExistsException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_not_exists.php',
'ezcConsoleOptionRule' => $vendorDir . '/zetacomponents/console-tools/src/structs/option_rule.php',
'ezcConsoleOptionStringNotWellformedException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_string_not_wellformed.php',
'ezcConsoleOptionTooManyValuesException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_too_many_values.php',
'ezcConsoleOptionTypeViolationException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/option_type_violation.php',
'ezcConsoleOutput' => $vendorDir . '/zetacomponents/console-tools/src/output.php',
'ezcConsoleOutputFormat' => $vendorDir . '/zetacomponents/console-tools/src/structs/output_format.php',
'ezcConsoleOutputFormats' => $vendorDir . '/zetacomponents/console-tools/src/structs/output_formats.php',
'ezcConsoleOutputOptions' => $vendorDir . '/zetacomponents/console-tools/src/options/output.php',
'ezcConsoleProgressMonitor' => $vendorDir . '/zetacomponents/console-tools/src/progressmonitor.php',
'ezcConsoleProgressMonitorOptions' => $vendorDir . '/zetacomponents/console-tools/src/options/progressmonitor.php',
'ezcConsoleProgressbar' => $vendorDir . '/zetacomponents/console-tools/src/progressbar.php',
'ezcConsoleProgressbarOptions' => $vendorDir . '/zetacomponents/console-tools/src/options/progressbar.php',
'ezcConsoleQuestionDialog' => $vendorDir . '/zetacomponents/console-tools/src/dialog/question_dialog.php',
'ezcConsoleQuestionDialogCollectionValidator' => $vendorDir . '/zetacomponents/console-tools/src/dialog/validators/question_dialog_collection.php',
'ezcConsoleQuestionDialogMappingValidator' => $vendorDir . '/zetacomponents/console-tools/src/dialog/validators/question_dialog_mapping.php',
'ezcConsoleQuestionDialogOptions' => $vendorDir . '/zetacomponents/console-tools/src/options/question_dialog.php',
'ezcConsoleQuestionDialogRegexValidator' => $vendorDir . '/zetacomponents/console-tools/src/dialog/validators/question_dialog_regex.php',
'ezcConsoleQuestionDialogTypeValidator' => $vendorDir . '/zetacomponents/console-tools/src/dialog/validators/question_dialog_type.php',
'ezcConsoleQuestionDialogValidator' => $vendorDir . '/zetacomponents/console-tools/src/interfaces/question_dialog_validator.php',
'ezcConsoleStandardInputValidator' => $vendorDir . '/zetacomponents/console-tools/src/input/validators/standard.php',
'ezcConsoleStatusbar' => $vendorDir . '/zetacomponents/console-tools/src/statusbar.php',
'ezcConsoleStatusbarOptions' => $vendorDir . '/zetacomponents/console-tools/src/options/statusbar.php',
'ezcConsoleStringTool' => $vendorDir . '/zetacomponents/console-tools/src/tools/string.php',
'ezcConsoleTable' => $vendorDir . '/zetacomponents/console-tools/src/table.php',
'ezcConsoleTableCell' => $vendorDir . '/zetacomponents/console-tools/src/table/cell.php',
'ezcConsoleTableOptions' => $vendorDir . '/zetacomponents/console-tools/src/options/table.php',
'ezcConsoleTableRow' => $vendorDir . '/zetacomponents/console-tools/src/table/row.php',
'ezcConsoleTooManyArgumentsException' => $vendorDir . '/zetacomponents/console-tools/src/exceptions/argument_too_many.php',
);

View File

@@ -7,10 +7,17 @@ $baseDir = dirname($vendorDir);
return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
);

View File

@@ -7,14 +7,14 @@ $baseDir = dirname($vendorDir);
return array(
'Twig_' => array($vendorDir . '/twig/twig/lib'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'),
'PEAR' => array($vendorDir . '/pear/pear_exception'),
'Pimple' => array($vendorDir . '/pimple/pimple/src'),
'PHPMD\\' => array($vendorDir . '/phpmd/phpmd/src/main/php'),
'PHPCodeBrowser\\' => array($vendorDir . '/mayflower/php-codebrowser/src'),
'Net' => array($vendorDir . '/pear/net_smtp', $vendorDir . '/pear/net_socket'),
'Mail' => array($vendorDir . '/pear/mail'),
'Google_Service_' => array($vendorDir . '/google/apiclient-services/src'),
'Google_' => array($vendorDir . '/google/apiclient/src'),
'ForceUTF8\\' => array($vendorDir . '/neitanod/forceutf8/src'),
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'),
'Dflydev\\DotAccessData' => array($vendorDir . '/dflydev/dot-access-data/src'),
'Console' => array($vendorDir . '/pear/console_getopt'),
'' => array($vendorDir . '/pear/pear-core-minimal/src'),

View File

@@ -11,20 +11,31 @@ return array(
'cebe\\markdown\\' => array($vendorDir . '/cebe/markdown'),
'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'),
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
'Symfony\\Polyfill\\Iconv\\' => array($vendorDir . '/symfony/polyfill-iconv'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'),
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Symfony\\Component\\Config\\' => array($vendorDir . '/symfony/config'),
'SelfUpdate\\' => array($vendorDir . '/consolidation/self-update/src'),
'Robo\\' => array($vendorDir . '/consolidation/robo/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
'Predis\\' => array($vendorDir . '/predis/predis/src'),
'PDepend\\' => array($vendorDir . '/pdepend/pdepend/src/main/php/PDepend'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'League\\Container\\' => array($vendorDir . '/league/container/src'),
'Interop\\Container\\' => array($vendorDir . '/container-interop/container-interop/src/Interop/Container'),
@@ -37,8 +48,9 @@ return array(
'Gettext\\Languages\\' => array($vendorDir . '/gettext/languages/src'),
'Gettext\\' => array($vendorDir . '/gettext/gettext/src'),
'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/EmailValidator'),
'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
'Consolidation\\OutputFormatters\\' => array($vendorDir . '/consolidation/output-formatters/src'),
'Consolidation\\Log\\' => array($vendorDir . '/consolidation/log/src'),

View File

@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit6d4a28cd96a5bc5d5b97781c062572d9
class ComposerAutoloaderInit5bce11e11de2274869867527dbd4b40e
{
private static $loader;
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit6d4a28cd96a5bc5d5b97781c062572d9
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit6d4a28cd96a5bc5d5b97781c062572d9', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit5bce11e11de2274869867527dbd4b40e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit6d4a28cd96a5bc5d5b97781c062572d9', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit5bce11e11de2274869867527dbd4b40e', 'loadClassLoader'));
$includePaths = require __DIR__ . '/include_paths.php';
$includePaths[] = get_include_path();
@@ -31,7 +31,7 @@ class ComposerAutoloaderInit6d4a28cd96a5bc5d5b97781c062572d9
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit5bce11e11de2274869867527dbd4b40e::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@@ -52,19 +52,19 @@ class ComposerAutoloaderInit6d4a28cd96a5bc5d5b97781c062572d9
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit5bce11e11de2274869867527dbd4b40e::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire6d4a28cd96a5bc5d5b97781c062572d9($fileIdentifier, $file);
composerRequire5bce11e11de2274869867527dbd4b40e($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire6d4a28cd96a5bc5d5b97781c062572d9($fileIdentifier, $file)
function composerRequire5bce11e11de2274869867527dbd4b40e($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@@ -4,16 +4,23 @@
namespace Composer\Autoload;
class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
class ComposerStaticInit5bce11e11de2274869867527dbd4b40e
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
);
public static $prefixLengthsPsr4 = array (
@@ -33,14 +40,23 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
),
'S' =>
array (
'Symfony\\Polyfill\\Php72\\' => 23,
'Symfony\\Polyfill\\Php70\\' => 23,
'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
'Symfony\\Polyfill\\Iconv\\' => 23,
'Symfony\\Polyfill\\Ctype\\' => 23,
'Symfony\\Component\\Yaml\\' => 23,
'Symfony\\Component\\Process\\' => 26,
'Symfony\\Component\\Finder\\' => 25,
'Symfony\\Component\\Filesystem\\' => 29,
'Symfony\\Component\\EventDispatcher\\' => 34,
'Symfony\\Component\\DependencyInjection\\' => 38,
'Symfony\\Component\\Debug\\' => 24,
'Symfony\\Component\\Console\\' => 26,
'Symfony\\Component\\Config\\' => 25,
'SelfUpdate\\' => 11,
),
'R' =>
array (
@@ -52,7 +68,9 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
'Psr\\Http\\Message\\' => 17,
'Psr\\Container\\' => 14,
'Psr\\Cache\\' => 10,
'Prophecy\\' => 9,
'Predis\\' => 7,
'PDepend\\' => 8,
),
'M' =>
array (
@@ -88,6 +106,7 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
'D' =>
array (
'Doctrine\\Instantiator\\' => 22,
'Doctrine\\Common\\Lexer\\' => 22,
'DeepCopy\\' => 9,
),
'C' =>
@@ -126,10 +145,34 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
array (
0 => __DIR__ . '/..' . '/webmozart/assert/src',
),
'Symfony\\Polyfill\\Php72\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
),
'Symfony\\Polyfill\\Php70\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php70',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
),
'Symfony\\Polyfill\\Intl\\Idn\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
),
'Symfony\\Polyfill\\Iconv\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-iconv',
),
'Symfony\\Polyfill\\Ctype\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
),
'Symfony\\Component\\Yaml\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/yaml',
@@ -150,6 +193,10 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
array (
0 => __DIR__ . '/..' . '/symfony/event-dispatcher',
),
'Symfony\\Component\\DependencyInjection\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/dependency-injection',
),
'Symfony\\Component\\Debug\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/debug',
@@ -158,6 +205,14 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
array (
0 => __DIR__ . '/..' . '/symfony/console',
),
'Symfony\\Component\\Config\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/config',
),
'SelfUpdate\\' =>
array (
0 => __DIR__ . '/..' . '/consolidation/self-update/src',
),
'Robo\\' =>
array (
0 => __DIR__ . '/..' . '/consolidation/robo/src',
@@ -178,10 +233,18 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
array (
0 => __DIR__ . '/..' . '/psr/cache/src',
),
'Prophecy\\' =>
array (
0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy',
),
'Predis\\' =>
array (
0 => __DIR__ . '/..' . '/predis/predis/src',
),
'PDepend\\' =>
array (
0 => __DIR__ . '/..' . '/pdepend/pdepend/src/main/php/PDepend',
),
'Monolog\\' =>
array (
0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
@@ -232,12 +295,16 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
),
'Egulias\\EmailValidator\\' =>
array (
0 => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator',
0 => __DIR__ . '/..' . '/egulias/email-validator/src',
),
'Doctrine\\Instantiator\\' =>
array (
0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
),
'Doctrine\\Common\\Lexer\\' =>
array (
0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer',
),
'DeepCopy\\' =>
array (
0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
@@ -278,13 +345,17 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
),
'P' =>
array (
'Prophecy\\' =>
'Pimple' =>
array (
0 => __DIR__ . '/..' . '/phpspec/prophecy/src',
0 => __DIR__ . '/..' . '/pimple/pimple/src',
),
'PEAR' =>
'PHPMD\\' =>
array (
0 => __DIR__ . '/..' . '/pear/pear_exception',
0 => __DIR__ . '/..' . '/phpmd/phpmd/src/main/php',
),
'PHPCodeBrowser\\' =>
array (
0 => __DIR__ . '/..' . '/mayflower/php-codebrowser/src',
),
),
'N' =>
@@ -322,10 +393,6 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
),
'D' =>
array (
'Doctrine\\Common\\Lexer\\' =>
array (
0 => __DIR__ . '/..' . '/doctrine/lexer/lib',
),
'Dflydev\\DotAccessData' =>
array (
0 => __DIR__ . '/..' . '/dflydev/dot-access-data/src',
@@ -345,11 +412,113 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
);
public static $classMap = array (
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'DivisionByZeroError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
'Error' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/Error.php',
'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php',
'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php',
'Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php',
'Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php',
'Generic_Sniffs_Classes_DuplicateClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php',
'Generic_Sniffs_Classes_OpeningBraceSameLineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php',
'Generic_Sniffs_CodeAnalysis_EmptyStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php',
'Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php',
'Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php',
'Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php',
'Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php',
'Generic_Sniffs_CodeAnalysis_UnnecessaryFinalModifierSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php',
'Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php',
'Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php',
'Generic_Sniffs_Commenting_DocCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php',
'Generic_Sniffs_Commenting_FixmeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php',
'Generic_Sniffs_Commenting_TodoSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php',
'Generic_Sniffs_ControlStructures_InlineControlStructureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php',
'Generic_Sniffs_Debug_CSSLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php',
'Generic_Sniffs_Debug_ClosureLinterSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php',
'Generic_Sniffs_Debug_ESLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ESLintSniff.php',
'Generic_Sniffs_Debug_JSHintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php',
'Generic_Sniffs_Files_ByteOrderMarkSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php',
'Generic_Sniffs_Files_EndFileNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php',
'Generic_Sniffs_Files_EndFileNoNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php',
'Generic_Sniffs_Files_InlineHTMLSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php',
'Generic_Sniffs_Files_LineEndingsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php',
'Generic_Sniffs_Files_LineLengthSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php',
'Generic_Sniffs_Files_LowercasedFilenameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php',
'Generic_Sniffs_Files_OneClassPerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php',
'Generic_Sniffs_Files_OneInterfacePerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php',
'Generic_Sniffs_Files_OneTraitPerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php',
'Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php',
'Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php',
'Generic_Sniffs_Formatting_NoSpaceAfterCastSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php',
'Generic_Sniffs_Formatting_SpaceAfterCastSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php',
'Generic_Sniffs_Formatting_SpaceAfterNotSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php',
'Generic_Sniffs_Functions_CallTimePassByReferenceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php',
'Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php',
'Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php',
'Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php',
'Generic_Sniffs_Metrics_CyclomaticComplexitySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php',
'Generic_Sniffs_Metrics_NestingLevelSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php',
'Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php',
'Generic_Sniffs_NamingConventions_ConstructorNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php',
'Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php',
'Generic_Sniffs_PHP_BacktickOperatorSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php',
'Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php',
'Generic_Sniffs_PHP_ClosingPHPTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php',
'Generic_Sniffs_PHP_DeprecatedFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php',
'Generic_Sniffs_PHP_DisallowAlternativePHPTagsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php',
'Generic_Sniffs_PHP_DisallowShortOpenTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php',
'Generic_Sniffs_PHP_ForbiddenFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php',
'Generic_Sniffs_PHP_LowerCaseConstantSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php',
'Generic_Sniffs_PHP_LowerCaseKeywordSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php',
'Generic_Sniffs_PHP_NoSilencedErrorsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php',
'Generic_Sniffs_PHP_SAPIUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php',
'Generic_Sniffs_PHP_SyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php',
'Generic_Sniffs_PHP_UpperCaseConstantSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php',
'Generic_Sniffs_Strings_UnnecessaryStringConcatSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php',
'Generic_Sniffs_VersionControl_SubversionPropertiesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php',
'Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php',
'Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php',
'Generic_Sniffs_WhiteSpace_ScopeIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php',
'Google_Service_Exception' => __DIR__ . '/..' . '/google/apiclient/src/Google/Service/Exception.php',
'Google_Service_Resource' => __DIR__ . '/..' . '/google/apiclient/src/Google/Service/Resource.php',
'MySource_Sniffs_CSS_BrowserSpecificStylesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php',
'MySource_Sniffs_Channels_DisallowSelfActionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php',
'MySource_Sniffs_Channels_IncludeOwnSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php',
'MySource_Sniffs_Channels_IncludeSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php',
'MySource_Sniffs_Channels_UnusedSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php',
'MySource_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php',
'MySource_Sniffs_Debug_DebugCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php',
'MySource_Sniffs_Debug_FirebugConsoleSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php',
'MySource_Sniffs_Objects_AssignThisSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php',
'MySource_Sniffs_Objects_CreateWidgetTypeCallbackSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php',
'MySource_Sniffs_Objects_DisallowNewWidgetSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php',
'MySource_Sniffs_PHP_AjaxNullComparisonSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php',
'MySource_Sniffs_PHP_EvalObjectFactorySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php',
'MySource_Sniffs_PHP_GetRequestDataSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php',
'MySource_Sniffs_PHP_ReturnFunctionValueSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php',
'MySource_Sniffs_Strings_JoinStringsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php',
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PEAR_Exception' => __DIR__ . '/..' . '/pear/pear_exception/PEAR/Exception.php',
'PEAR_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php',
'PEAR_Sniffs_Commenting_ClassCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php',
'PEAR_Sniffs_Commenting_FileCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php',
'PEAR_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php',
'PEAR_Sniffs_Commenting_InlineCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php',
'PEAR_Sniffs_ControlStructures_ControlSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php',
'PEAR_Sniffs_ControlStructures_MultiLineConditionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php',
'PEAR_Sniffs_Files_IncludingFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php',
'PEAR_Sniffs_Formatting_MultiLineAssignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php',
'PEAR_Sniffs_Functions_FunctionCallSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php',
'PEAR_Sniffs_Functions_FunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php',
'PEAR_Sniffs_Functions_ValidDefaultValueSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php',
'PEAR_Sniffs_NamingConventions_ValidClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php',
'PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
'PEAR_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php',
'PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php',
'PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
'PEAR_Sniffs_WhiteSpace_ScopeIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php',
'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php',
@@ -522,6 +691,44 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
'PHPUnit\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml.php',
'PHPUnit\\Util\\XmlTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/MockObject.php',
'PHP_CodeSniffer' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer.php',
'PHP_CodeSniffer_CLI' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/CLI.php',
'PHP_CodeSniffer_DocGenerators_Generator' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php',
'PHP_CodeSniffer_DocGenerators_HTML' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php',
'PHP_CodeSniffer_DocGenerators_Markdown' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php',
'PHP_CodeSniffer_DocGenerators_Text' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php',
'PHP_CodeSniffer_Exception' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Exception.php',
'PHP_CodeSniffer_File' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/File.php',
'PHP_CodeSniffer_Fixer' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Fixer.php',
'PHP_CodeSniffer_Report' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Report.php',
'PHP_CodeSniffer_Reporting' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reporting.php',
'PHP_CodeSniffer_Reports_Cbf' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php',
'PHP_CodeSniffer_Reports_Checkstyle' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php',
'PHP_CodeSniffer_Reports_Csv' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php',
'PHP_CodeSniffer_Reports_Diff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php',
'PHP_CodeSniffer_Reports_Emacs' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php',
'PHP_CodeSniffer_Reports_Full' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php',
'PHP_CodeSniffer_Reports_Gitblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php',
'PHP_CodeSniffer_Reports_Hgblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php',
'PHP_CodeSniffer_Reports_Info' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php',
'PHP_CodeSniffer_Reports_Json' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php',
'PHP_CodeSniffer_Reports_Junit' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php',
'PHP_CodeSniffer_Reports_Notifysend' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php',
'PHP_CodeSniffer_Reports_Source' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php',
'PHP_CodeSniffer_Reports_Summary' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php',
'PHP_CodeSniffer_Reports_Svnblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php',
'PHP_CodeSniffer_Reports_VersionControl' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php',
'PHP_CodeSniffer_Reports_Xml' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php',
'PHP_CodeSniffer_Sniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Sniff.php',
'PHP_CodeSniffer_Standards_AbstractPatternSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php',
'PHP_CodeSniffer_Standards_AbstractScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php',
'PHP_CodeSniffer_Standards_AbstractVariableSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php',
'PHP_CodeSniffer_Standards_IncorrectPatternException' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php',
'PHP_CodeSniffer_Tokenizers_CSS' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php',
'PHP_CodeSniffer_Tokenizers_Comment' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php',
'PHP_CodeSniffer_Tokenizers_JS' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php',
'PHP_CodeSniffer_Tokenizers_PHP' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php',
'PHP_CodeSniffer_Tokens' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokens.php',
'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php',
'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
@@ -722,6 +929,22 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PSR1_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php',
'PSR1_Sniffs_Files_SideEffectsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php',
'PSR1_Sniffs_Methods_CamelCapsMethodNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php',
'PSR2_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php',
'PSR2_Sniffs_Classes_PropertyDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php',
'PSR2_Sniffs_ControlStructures_ControlStructureSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php',
'PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
'PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
'PSR2_Sniffs_Files_ClosingTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php',
'PSR2_Sniffs_Files_EndFileNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php',
'PSR2_Sniffs_Methods_FunctionCallSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php',
'PSR2_Sniffs_Methods_FunctionClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php',
'PSR2_Sniffs_Methods_MethodDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php',
'PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php',
'PSR2_Sniffs_Namespaces_UseDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php',
'ParseError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ParseError.php',
'PharIo\\Manifest\\Application' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Application.php',
'PharIo\\Manifest\\ApplicationName' => __DIR__ . '/..' . '/phar-io/manifest/src/values/ApplicationName.php',
'PharIo\\Manifest\\Author' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Author.php',
@@ -863,6 +1086,8 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
'SebastianBergmann\\Environment\\OperatingSystem' => __DIR__ . '/..' . '/sebastian/environment/src/OperatingSystem.php',
'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php',
'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php',
'SebastianBergmann\\FinderFacade\\Configuration' => __DIR__ . '/..' . '/sebastian/finder-facade/src/Configuration.php',
'SebastianBergmann\\FinderFacade\\FinderFacade' => __DIR__ . '/..' . '/sebastian/finder-facade/src/FinderFacade.php',
'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php',
'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php',
'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/Exception.php',
@@ -875,11 +1100,131 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
'SebastianBergmann\\ObjectReflector\\Exception' => __DIR__ . '/..' . '/sebastian/object-reflector/src/Exception.php',
'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-reflector/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php',
'SebastianBergmann\\PHPCPD\\CodeClone' => __DIR__ . '/..' . '/sebastian/phpcpd/src/CodeClone.php',
'SebastianBergmann\\PHPCPD\\CodeCloneMap' => __DIR__ . '/..' . '/sebastian/phpcpd/src/CodeCloneMap.php',
'SebastianBergmann\\PHPCPD\\Detector\\Detector' => __DIR__ . '/..' . '/sebastian/phpcpd/src/Detector/Detector.php',
'SebastianBergmann\\PHPCPD\\Detector\\Strategy\\AbstractStrategy' => __DIR__ . '/..' . '/sebastian/phpcpd/src/Detector/Strategy/Abstract.php',
'SebastianBergmann\\PHPCPD\\Detector\\Strategy\\DefaultStrategy' => __DIR__ . '/..' . '/sebastian/phpcpd/src/Detector/Strategy/Default.php',
'SebastianBergmann\\PHPCPD\\Log\\AbstractXmlLogger' => __DIR__ . '/..' . '/sebastian/phpcpd/src/Log/AbstractXmlLogger.php',
'SebastianBergmann\\PHPCPD\\Log\\PMD' => __DIR__ . '/..' . '/sebastian/phpcpd/src/Log/PMD.php',
'SebastianBergmann\\PHPCPD\\TextUI\\Command' => __DIR__ . '/..' . '/sebastian/phpcpd/src/TextUI/Command.php',
'SebastianBergmann\\PHPCPD\\TextUI\\ResultPrinter' => __DIR__ . '/..' . '/sebastian/phpcpd/src/TextUI/ResultPrinter.php',
'SebastianBergmann\\PHPLOC\\Analyser' => __DIR__ . '/..' . '/phploc/phploc/src/Analyser.php',
'SebastianBergmann\\PHPLOC\\CLI\\Application' => __DIR__ . '/..' . '/phploc/phploc/src/CLI/Application.php',
'SebastianBergmann\\PHPLOC\\CLI\\Command' => __DIR__ . '/..' . '/phploc/phploc/src/CLI/Command.php',
'SebastianBergmann\\PHPLOC\\Collector' => __DIR__ . '/..' . '/phploc/phploc/src/Collector.php',
'SebastianBergmann\\PHPLOC\\Exception' => __DIR__ . '/..' . '/phploc/phploc/src/Exception/Exception.php',
'SebastianBergmann\\PHPLOC\\Log\\Csv' => __DIR__ . '/..' . '/phploc/phploc/src/Log/Csv.php',
'SebastianBergmann\\PHPLOC\\Log\\Text' => __DIR__ . '/..' . '/phploc/phploc/src/Log/Text.php',
'SebastianBergmann\\PHPLOC\\Log\\Xml' => __DIR__ . '/..' . '/phploc/phploc/src/Log/Xml.php',
'SebastianBergmann\\PHPLOC\\Publisher' => __DIR__ . '/..' . '/phploc/phploc/src/Publisher.php',
'SebastianBergmann\\PHPLOC\\RuntimeException' => __DIR__ . '/..' . '/phploc/phploc/src/Exception/RuntimeException.php',
'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php',
'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php',
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php',
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php',
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
'SessionUpdateTimestampHandlerInterface' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
'Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php',
'Squiz_Sniffs_Arrays_ArrayDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php',
'Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php',
'Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php',
'Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php',
'Squiz_Sniffs_CSS_ColonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php',
'Squiz_Sniffs_CSS_ColourDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php',
'Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php',
'Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php',
'Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php',
'Squiz_Sniffs_CSS_EmptyClassDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php',
'Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php',
'Squiz_Sniffs_CSS_ForbiddenStylesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php',
'Squiz_Sniffs_CSS_IndentationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php',
'Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php',
'Squiz_Sniffs_CSS_MissingColonSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php',
'Squiz_Sniffs_CSS_NamedColoursSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php',
'Squiz_Sniffs_CSS_OpacitySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php',
'Squiz_Sniffs_CSS_SemicolonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php',
'Squiz_Sniffs_CSS_ShorthandSizeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php',
'Squiz_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php',
'Squiz_Sniffs_Classes_ClassFileNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php',
'Squiz_Sniffs_Classes_DuplicatePropertySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php',
'Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php',
'Squiz_Sniffs_Classes_SelfMemberReferenceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php',
'Squiz_Sniffs_Classes_ValidClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php',
'Squiz_Sniffs_Commenting_BlockCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php',
'Squiz_Sniffs_Commenting_ClassCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php',
'Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php',
'Squiz_Sniffs_Commenting_DocCommentAlignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php',
'Squiz_Sniffs_Commenting_EmptyCatchCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php',
'Squiz_Sniffs_Commenting_FileCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php',
'Squiz_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php',
'Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php',
'Squiz_Sniffs_Commenting_InlineCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php',
'Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php',
'Squiz_Sniffs_Commenting_PostStatementCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php',
'Squiz_Sniffs_Commenting_VariableCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php',
'Squiz_Sniffs_ControlStructures_ControlSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php',
'Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php',
'Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
'Squiz_Sniffs_Debug_JSLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php',
'Squiz_Sniffs_Debug_JavaScriptLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php',
'Squiz_Sniffs_Files_FileExtensionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php',
'Squiz_Sniffs_Formatting_OperatorBracketSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php',
'Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php',
'Squiz_Sniffs_Functions_FunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php',
'Squiz_Sniffs_Functions_FunctionDuplicateArgumentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php',
'Squiz_Sniffs_Functions_GlobalFunctionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php',
'Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php',
'Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php',
'Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
'Squiz_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php',
'Squiz_Sniffs_Objects_DisallowObjectStringIndexSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php',
'Squiz_Sniffs_Objects_ObjectInstantiationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php',
'Squiz_Sniffs_Objects_ObjectMemberCommaSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php',
'Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php',
'Squiz_Sniffs_Operators_IncrementDecrementUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php',
'Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php',
'Squiz_Sniffs_PHP_CommentedOutCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php',
'Squiz_Sniffs_PHP_DisallowBooleanStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php',
'Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php',
'Squiz_Sniffs_PHP_DisallowInlineIfSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php',
'Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php',
'Squiz_Sniffs_PHP_DisallowObEndFlushSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php',
'Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php',
'Squiz_Sniffs_PHP_DiscouragedFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php',
'Squiz_Sniffs_PHP_EmbeddedPhpSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php',
'Squiz_Sniffs_PHP_EvalSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php',
'Squiz_Sniffs_PHP_ForbiddenFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php',
'Squiz_Sniffs_PHP_GlobalKeywordSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php',
'Squiz_Sniffs_PHP_HeredocSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php',
'Squiz_Sniffs_PHP_InnerFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php',
'Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php',
'Squiz_Sniffs_PHP_NonExecutableCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php',
'Squiz_Sniffs_Scope_MemberVarScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php',
'Squiz_Sniffs_Scope_MethodScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php',
'Squiz_Sniffs_Scope_StaticThisUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php',
'Squiz_Sniffs_Strings_ConcatenationSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php',
'Squiz_Sniffs_Strings_DoubleQuoteUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php',
'Squiz_Sniffs_Strings_EchoedStringsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php',
'Squiz_Sniffs_WhiteSpace_CastSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php',
'Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php',
'Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_LogicalOperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
'Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php',
'Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php',
'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
@@ -889,17 +1234,130 @@ class ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9
'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php',
'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php',
'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php',
'TheSeer\\fDOM\\CSS\\DollarEqualRule' => __DIR__ . '/..' . '/theseer/fdomdocument/src/css/DollarEqualRule.php',
'TheSeer\\fDOM\\CSS\\NotRule' => __DIR__ . '/..' . '/theseer/fdomdocument/src/css/NotRule.php',
'TheSeer\\fDOM\\CSS\\NthChildRule' => __DIR__ . '/..' . '/theseer/fdomdocument/src/css/NthChildRule.php',
'TheSeer\\fDOM\\CSS\\RegexRule' => __DIR__ . '/..' . '/theseer/fdomdocument/src/css/RegexRule.php',
'TheSeer\\fDOM\\CSS\\RuleInterface' => __DIR__ . '/..' . '/theseer/fdomdocument/src/css/RuleInterface.php',
'TheSeer\\fDOM\\CSS\\Translator' => __DIR__ . '/..' . '/theseer/fdomdocument/src/css/Translator.php',
'TheSeer\\fDOM\\XPathQuery' => __DIR__ . '/..' . '/theseer/fdomdocument/src/XPathQuery.php',
'TheSeer\\fDOM\\XPathQueryException' => __DIR__ . '/..' . '/theseer/fdomdocument/src/XPathQueryException.php',
'TheSeer\\fDOM\\fDOMDocument' => __DIR__ . '/..' . '/theseer/fdomdocument/src/fDOMDocument.php',
'TheSeer\\fDOM\\fDOMDocumentFragment' => __DIR__ . '/..' . '/theseer/fdomdocument/src/fDOMDocumentFragment.php',
'TheSeer\\fDOM\\fDOMElement' => __DIR__ . '/..' . '/theseer/fdomdocument/src/fDOMElement.php',
'TheSeer\\fDOM\\fDOMException' => __DIR__ . '/..' . '/theseer/fdomdocument/src/fDOMException.php',
'TheSeer\\fDOM\\fDOMNode' => __DIR__ . '/..' . '/theseer/fdomdocument/src/fDOMNode.php',
'TheSeer\\fDOM\\fDOMXPath' => __DIR__ . '/..' . '/theseer/fdomdocument/src/fDOMXPath.php',
'TypeError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
'Zend_Sniffs_Debug_CodeAnalyzerSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php',
'Zend_Sniffs_Files_ClosingTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php',
'Zend_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php',
'ezcBase' => __DIR__ . '/..' . '/zetacomponents/base/src/base.php',
'ezcBaseAutoloadException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/autoload.php',
'ezcBaseAutoloadOptions' => __DIR__ . '/..' . '/zetacomponents/base/src/options/autoload.php',
'ezcBaseConfigurationInitializer' => __DIR__ . '/..' . '/zetacomponents/base/src/interfaces/configuration_initializer.php',
'ezcBaseDoubleClassRepositoryPrefixException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/double_class_repository_prefix.php',
'ezcBaseException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/exception.php',
'ezcBaseExportable' => __DIR__ . '/..' . '/zetacomponents/base/src/interfaces/exportable.php',
'ezcBaseExtensionNotFoundException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/extension_not_found.php',
'ezcBaseFeatures' => __DIR__ . '/..' . '/zetacomponents/base/src/features.php',
'ezcBaseFile' => __DIR__ . '/..' . '/zetacomponents/base/src/file.php',
'ezcBaseFileException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/file_exception.php',
'ezcBaseFileFindContext' => __DIR__ . '/..' . '/zetacomponents/base/src/structs/file_find_context.php',
'ezcBaseFileIoException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/file_io.php',
'ezcBaseFileNotFoundException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/file_not_found.php',
'ezcBaseFilePermissionException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/file_permission.php',
'ezcBaseFunctionalityNotSupportedException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/functionality_not_supported.php',
'ezcBaseInit' => __DIR__ . '/..' . '/zetacomponents/base/src/init.php',
'ezcBaseInitCallbackConfiguredException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/init_callback_configured.php',
'ezcBaseInitInvalidCallbackClassException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/invalid_callback_class.php',
'ezcBaseInvalidParentClassException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/invalid_parent_class.php',
'ezcBaseMetaData' => __DIR__ . '/..' . '/zetacomponents/base/src/metadata.php',
'ezcBaseMetaDataPearReader' => __DIR__ . '/..' . '/zetacomponents/base/src/metadata/pear.php',
'ezcBaseMetaDataTarballReader' => __DIR__ . '/..' . '/zetacomponents/base/src/metadata/tarball.php',
'ezcBaseOptions' => __DIR__ . '/..' . '/zetacomponents/base/src/options.php',
'ezcBasePersistable' => __DIR__ . '/..' . '/zetacomponents/base/src/interfaces/persistable.php',
'ezcBasePropertyNotFoundException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/property_not_found.php',
'ezcBasePropertyPermissionException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/property_permission.php',
'ezcBaseRepositoryDirectory' => __DIR__ . '/..' . '/zetacomponents/base/src/structs/repository_directory.php',
'ezcBaseSettingNotFoundException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/setting_not_found.php',
'ezcBaseSettingValueException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/setting_value.php',
'ezcBaseStruct' => __DIR__ . '/..' . '/zetacomponents/base/src/struct.php',
'ezcBaseValueException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/value.php',
'ezcBaseWhateverException' => __DIR__ . '/..' . '/zetacomponents/base/src/exceptions/whatever.php',
'ezcConsoleArgument' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/input/argument.php',
'ezcConsoleArgumentAlreadyRegisteredException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/argument_already_registered.php',
'ezcConsoleArgumentException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/argument.php',
'ezcConsoleArgumentMandatoryViolationException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/argument_mandatory_violation.php',
'ezcConsoleArgumentTypeViolationException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/argument_type_violation.php',
'ezcConsoleArguments' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/input/arguments.php',
'ezcConsoleDialog' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/interfaces/dialog.php',
'ezcConsoleDialogAbortException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/dialog_abort.php',
'ezcConsoleDialogOptions' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/options/dialog.php',
'ezcConsoleDialogValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/interfaces/dialog_validator.php',
'ezcConsoleDialogViewer' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/dialog_viewer.php',
'ezcConsoleException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/exception.php',
'ezcConsoleInput' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/input.php',
'ezcConsoleInputHelpGenerator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/interfaces/input_help_generator.php',
'ezcConsoleInputStandardHelpGenerator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/input/help_generators/standard.php',
'ezcConsoleInputValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/interfaces/input_validator.php',
'ezcConsoleInvalidOptionNameException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/invalid_option_name.php',
'ezcConsoleInvalidOutputTargetException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/invalid_output_target.php',
'ezcConsoleMenuDialog' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/dialog/menu_dialog.php',
'ezcConsoleMenuDialogDefaultValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/dialog/validators/menu_dialog_default.php',
'ezcConsoleMenuDialogOptions' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/options/menu_dialog.php',
'ezcConsoleMenuDialogValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/interfaces/menu_dialog_validator.php',
'ezcConsoleNoPositionStoredException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/no_position_stored.php',
'ezcConsoleNoValidDialogResultException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/no_valid_dialog_result.php',
'ezcConsoleOption' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/input/option.php',
'ezcConsoleOptionAlreadyRegisteredException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_already_registered.php',
'ezcConsoleOptionArgumentsViolationException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_arguments_violation.php',
'ezcConsoleOptionDependencyViolationException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_dependency_violation.php',
'ezcConsoleOptionException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option.php',
'ezcConsoleOptionExclusionViolationException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_exclusion_violation.php',
'ezcConsoleOptionMandatoryViolationException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_mandatory_violation.php',
'ezcConsoleOptionMissingValueException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_missing_value.php',
'ezcConsoleOptionNoAliasException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_no_alias.php',
'ezcConsoleOptionNotExistsException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_not_exists.php',
'ezcConsoleOptionRule' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/structs/option_rule.php',
'ezcConsoleOptionStringNotWellformedException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_string_not_wellformed.php',
'ezcConsoleOptionTooManyValuesException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_too_many_values.php',
'ezcConsoleOptionTypeViolationException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/option_type_violation.php',
'ezcConsoleOutput' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/output.php',
'ezcConsoleOutputFormat' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/structs/output_format.php',
'ezcConsoleOutputFormats' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/structs/output_formats.php',
'ezcConsoleOutputOptions' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/options/output.php',
'ezcConsoleProgressMonitor' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/progressmonitor.php',
'ezcConsoleProgressMonitorOptions' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/options/progressmonitor.php',
'ezcConsoleProgressbar' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/progressbar.php',
'ezcConsoleProgressbarOptions' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/options/progressbar.php',
'ezcConsoleQuestionDialog' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/dialog/question_dialog.php',
'ezcConsoleQuestionDialogCollectionValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/dialog/validators/question_dialog_collection.php',
'ezcConsoleQuestionDialogMappingValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/dialog/validators/question_dialog_mapping.php',
'ezcConsoleQuestionDialogOptions' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/options/question_dialog.php',
'ezcConsoleQuestionDialogRegexValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/dialog/validators/question_dialog_regex.php',
'ezcConsoleQuestionDialogTypeValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/dialog/validators/question_dialog_type.php',
'ezcConsoleQuestionDialogValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/interfaces/question_dialog_validator.php',
'ezcConsoleStandardInputValidator' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/input/validators/standard.php',
'ezcConsoleStatusbar' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/statusbar.php',
'ezcConsoleStatusbarOptions' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/options/statusbar.php',
'ezcConsoleStringTool' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/tools/string.php',
'ezcConsoleTable' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/table.php',
'ezcConsoleTableCell' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/table/cell.php',
'ezcConsoleTableOptions' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/options/table.php',
'ezcConsoleTableRow' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/table/row.php',
'ezcConsoleTooManyArgumentsException' => __DIR__ . '/..' . '/zetacomponents/console-tools/src/exceptions/argument_too_many.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9::$prefixDirsPsr4;
$loader->fallbackDirsPsr4 = ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9::$fallbackDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9::$prefixesPsr0;
$loader->fallbackDirsPsr0 = ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9::$fallbackDirsPsr0;
$loader->classMap = ComposerStaticInit6d4a28cd96a5bc5d5b97781c062572d9::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit5bce11e11de2274869867527dbd4b40e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit5bce11e11de2274869867527dbd4b40e::$prefixDirsPsr4;
$loader->fallbackDirsPsr4 = ComposerStaticInit5bce11e11de2274869867527dbd4b40e::$fallbackDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit5bce11e11de2274869867527dbd4b40e::$prefixesPsr0;
$loader->fallbackDirsPsr0 = ComposerStaticInit5bce11e11de2274869867527dbd4b40e::$fallbackDirsPsr0;
$loader->classMap = ComposerStaticInit5bce11e11de2274869867527dbd4b40e::$classMap;
}, null, ClassLoader::class);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +0,0 @@
### Steps to reproduce
What did you do?
### Expected behavior
Tell us what should happen
### Actual behavior
Tell us what happens instead
### System Configuration
Which O.S. and PHP version are you using?

View File

@@ -1,13 +0,0 @@
### Disposition
This pull request:
- [ ] Fixes a bug
- [ ] Adds a feature
- [ ] Breaks backwards compatibility
- [ ] Has tests that cover changes
### Summary
Short overview of what changed.
### Description
Any additional information.

View File

@@ -1,5 +0,0 @@
.DS_Store
phpunit.xml
vendor
build
.idea

View File

@@ -0,0 +1,62 @@
{
"name": "consolidation/annotated-command",
"description": "Initialize Symfony Console commands from annotated command class methods.",
"license": "MIT",
"authors": [
{
"name": "Greg Anderson",
"email": "greg.1.anderson@greenknowe.org"
}
],
"autoload": {
"psr-4": {
"Consolidation\\AnnotatedCommand\\": "../../src"
}
},
"autoload-dev": {
"psr-4": {
"Consolidation\\TestUtils\\": "../../tests/src"
}
},
"require": {
"symfony/finder": "^5",
"php": ">=5.4.5",
"consolidation/output-formatters": "^3.5.1",
"psr/log": "^1",
"symfony/console": "^2.8|^3|^4",
"symfony/event-dispatcher": "^2.5|^3|^4"
},
"require-dev": {
"phpunit/phpunit": "^6",
"php-coveralls/php-coveralls": "^1",
"g1a/composer-test-scenarios": "^3",
"squizlabs/php_codesniffer": "^2.7"
},
"config": {
"platform": {
"php": "7.2.5"
},
"optimize-autoloader": true,
"sort-packages": true,
"vendor-dir": "../../vendor"
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "SHELL_INTERACTIVE=true phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
]
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,61 @@
#!/bin/bash
SCENARIO=$1
DEPENDENCIES=${2-install}
# Convert the aliases 'highest', 'lowest' and 'lock' to
# the corresponding composer update command to run.
case $DEPENDENCIES in
highest)
UPDATE_COMMAND=update
;;
lowest)
UPDATE_COMMAND='update --prefer-lowest'
;;
lock|default|"")
UPDATE_COMMAND=''
;;
esac
original_name=scenarios
recommended_name=".scenarios.lock"
base="$original_name"
if [ -d "$recommended_name" ] ; then
base="$recommended_name"
fi
# If scenario is not specified, install the lockfile at
# the root of the project.
dir="$base/${SCENARIO}"
if [ -z "$SCENARIO" ] || [ "$SCENARIO" == "default" ] ; then
SCENARIO=default
dir=.
fi
# Test to make sure that the selected scenario exists.
if [ ! -d "$dir" ] ; then
echo "Requested scenario '${SCENARIO}' does not exist."
exit 1
fi
echo
echo "::"
echo ":: Switch to ${SCENARIO} scenario"
echo "::"
echo
set -ex
composer -n validate --working-dir=$dir --no-check-all --ansi
if [ ! -z "$UPDATE_COMMAND" ] ; then
composer -n --working-dir=$dir ${UPDATE_COMMAND} --prefer-dist --no-scripts
fi
composer -n --working-dir=$dir install --prefer-dist
# If called from a CI context, print out some extra information about
# what we just installed.
if [[ -n "$CI" ]] ; then
composer -n --working-dir=$dir info
fi

View File

@@ -0,0 +1,61 @@
{
"name": "consolidation/annotated-command",
"description": "Initialize Symfony Console commands from annotated command class methods.",
"license": "MIT",
"authors": [
{
"name": "Greg Anderson",
"email": "greg.1.anderson@greenknowe.org"
}
],
"autoload": {
"psr-4": {
"Consolidation\\AnnotatedCommand\\": "../../src"
}
},
"autoload-dev": {
"psr-4": {
"Consolidation\\TestUtils\\": "../../tests/src"
}
},
"require": {
"php": ">=5.4.5",
"consolidation/output-formatters": "^3.5.1",
"psr/log": "^1",
"symfony/console": "^2.8|^3|^4",
"symfony/event-dispatcher": "^2.5|^3|^4",
"symfony/finder": "^2.5|^3|^4|^5"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36",
"g1a/composer-test-scenarios": "^3",
"squizlabs/php_codesniffer": "^2.7"
},
"config": {
"platform": {
"php": "5.4.8"
},
"optimize-autoloader": true,
"sort-packages": true,
"vendor-dir": "../../vendor"
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "SHELL_INTERACTIVE=true phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
]
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
vendor
composer.lock

View File

@@ -0,0 +1,61 @@
{
"name": "consolidation/annotated-command",
"description": "Initialize Symfony Console commands from annotated command class methods.",
"license": "MIT",
"authors": [
{
"name": "Greg Anderson",
"email": "greg.1.anderson@greenknowe.org"
}
],
"autoload": {
"psr-4": {
"Consolidation\\AnnotatedCommand\\": "../../src"
}
},
"autoload-dev": {
"psr-4": {
"Consolidation\\TestUtils\\": "../../tests/src"
}
},
"require": {
"symfony/console": "^2.8",
"php": ">=5.4.5",
"consolidation/output-formatters": "^3.5.1",
"psr/log": "^1",
"symfony/event-dispatcher": "^2.5|^3|^4",
"symfony/finder": "^2.5|^3|^4|^5"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36",
"g1a/composer-test-scenarios": "^3",
"squizlabs/php_codesniffer": "^2.7"
},
"config": {
"platform": {
"php": "5.4.8"
},
"optimize-autoloader": true,
"sort-packages": true,
"vendor-dir": "../../vendor"
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "SHELL_INTERACTIVE=true phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
]
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
}
}

View File

@@ -0,0 +1,62 @@
{
"name": "consolidation/annotated-command",
"description": "Initialize Symfony Console commands from annotated command class methods.",
"license": "MIT",
"authors": [
{
"name": "Greg Anderson",
"email": "greg.1.anderson@greenknowe.org"
}
],
"autoload": {
"psr-4": {
"Consolidation\\AnnotatedCommand\\": "../../src"
}
},
"autoload-dev": {
"psr-4": {
"Consolidation\\TestUtils\\": "../../tests/src"
}
},
"require": {
"symfony/console": "^4.0",
"php": ">=5.4.5",
"consolidation/output-formatters": "^3.5.1",
"psr/log": "^1",
"symfony/event-dispatcher": "^2.5|^3|^4",
"symfony/finder": "^2.5|^3|^4|^5"
},
"require-dev": {
"phpunit/phpunit": "^6",
"php-coveralls/php-coveralls": "^1",
"g1a/composer-test-scenarios": "^3",
"squizlabs/php_codesniffer": "^2.7"
},
"config": {
"platform": {
"php": "7.1.3"
},
"optimize-autoloader": true,
"sort-packages": true,
"vendor-dir": "../../vendor"
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "SHELL_INTERACTIVE=true phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
]
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,99 +0,0 @@
language: php
branches:
# Only test the master branch and SemVer tags.
only:
- master
- '/^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/'
matrix:
include:
-
php: 7.1
env: 'HIGHEST_LOWEST="update" STABILITY="RC"'
-
php: 7.0.11
env: DO_POST_BUILD_ACTIONS=1
-
php: 5.6
-
php: 5.5
-
php: 5.4
env: 'HIGHEST_LOWEST="update --prefer-lowest"'
sudo: false
cache:
directories:
- $HOME/.composer/cache
before_script:
# If running a highest/lowest dependencies test, get rid of composer.lock
- |
if [ -n "$HIGHEST_LOWEST" ] ; then
rm composer.lock
composer config --unset platform.php
composer config minimum-stability ${STABILITY-stable}
fi
- 'composer -n ${HIGHEST_LOWEST-install} --prefer-dist'
- composer why symfony/console
# Print out all of the installed packages in alphabetical order, with versions
- composer licenses
script:
- vendor/bin/phpunit
- 'vendor/bin/phpcs --standard=PSR2 -n src'
after_success:
- 'travis_retry php vendor/bin/coveralls -v'
- |
# Only do post-build actions in one environment, and only if there is a GITHUB token.
if [ -z "$DO_POST_BUILD_ACTIONS" ] ; then
return
fi
if [ -z "$GITHUB_TOKEN" ]; then
echo "No GITHUB_TOKEN defined; exiting."
return
fi
###
# Run composer lock update on cron jobs.
# See: https://github.com/danielbachhuber/composer-lock-updater
###
if [ "$TRAVIS_EVENT_TYPE" != "cron" ] ; then
echo "Not a cron job; exiting."
return
fi
###
# Only run on one job of a master branch build
###
if [ "master" != "$TRAVIS_BRANCH" ] ; then
echo "composer.lock update only runs on the master branch."
return
fi
###
# Install composer-lock-updater
###
export PATH="$HOME/.composer/vendor/bin:$PATH"
composer global require danielbachhuber/composer-lock-updater
###
# Optional: install Sensio Labs security checker to include security advisories in PR comments
###
mkdir -p $HOME/bin
wget -O $HOME/bin/security-checker.phar http://get.sensiolabs.org/security-checker.phar
chmod +x $HOME/bin/security-checker.phar
export PATH="$HOME/bin:$PATH"
###
# Install hub for creating GitHub pull requests
###
wget -O hub.tgz https://github.com/github/hub/releases/download/v2.2.9/hub-linux-amd64-2.2.9.tgz
tar -zxvf hub.tgz
export PATH=$PATH:$PWD/hub-linux-amd64-2.2.9/bin/
###
# Run composer-lock-updater
###
clu

View File

@@ -1,5 +1,57 @@
# Change Log
### 2.12.1 - 10 Oct 2020
- Allow symfony/finder 5 (#213)
### 2.12.0 - 8 Mar 2019
- Allow annotated args and options to specify their default values in their descriptions. (#186)
### 2.11.2 - 1 Feb 2019
- Fix handling of old caches from 2.11.1 that introduced upgrade errors.
### 2.11.1 - 31 Jan 2019
- Cache injected classes (#182)
### 2.11.0 - 27 Jan 2019
- Make injection of InputInterface / OutputInterface general-purpose (#179)
### 2.10.2 - 20 Dec 2018
- Fix commands that have a @param annotation for their InputInterface/OutputInterface params (#176)
### 2.10.1 - 13 Dec 2018
- Add stdin handler convenience class
- Add setter to AnnotationData to suppliment existing array acces
- Update to Composer Test Scenarios 3
### 2.10.0 - 14 Nov 2018
- Add a new data type, CommandResult (#167)
### 2.9.0 & 2.9.1 - 19 Sept 2018
- Improve commandfile discovery for extensions installed via Composer. (#156)
### 2.8.5 - 18 Aug 2018
- Add dependencies.yml for dependencies.io
- Fix warning in AnnotatedCommandFactory when getCommandInfoListFromCache called with null.
### 2.8.4 - 25 May 2018
- Use g1a/composer-test-scenarios for better PHP version matrix testing.
### 2.8.3 - 23 Feb 2018
- BUGFIX: Do not shift off the command name unless it is there. (#139)
- Use test scenarios to test multiple versions of Symfony. (#136, #137)
### 2.8.2 - 29 Nov 2017
- Allow Symfony 4 components.

View File

@@ -1,4 +1,6 @@
Copyright (c) 2016 Consolidation Org Developers
The MIT License (MIT)
Copyright (c) 2016-2020 Consolidation Org Developers
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -6,3 +8,15 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DEPENDENCY LICENSES:
Name Version License
consolidation/output-formatters 3.5.1 MIT
dflydev/dot-access-data v1.1.0 MIT
psr/log 1.1.3 MIT
symfony/console v2.8.52 MIT
symfony/debug v2.8.52 MIT
symfony/event-dispatcher v2.8.52 MIT
symfony/finder v2.8.52 MIT
symfony/polyfill-mbstring v1.18.1 MIT

View File

@@ -5,7 +5,7 @@ Initialize Symfony Console commands from annotated command class methods.
[![Travis CI](https://travis-ci.org/consolidation/annotated-command.svg?branch=master)](https://travis-ci.org/consolidation/annotated-command)
[![Windows CI](https://ci.appveyor.com/api/projects/status/c2c4lcf43ux4c30p?svg=true)](https://ci.appveyor.com/project/greg-1-anderson/annotated-command)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/consolidation/annotated-command/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/consolidation/annotated-command/?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/consolidation/annotated-command/badge.svg?branch=master)](https://coveralls.io/github/consolidation/annotated-command?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/consolidation/annotated-command/badge.svg?branch=master)](https://coveralls.io/github/consolidation/annotated-command?branch=master)
[![License](https://poser.pugx.org/consolidation/annotated-command/license)](https://packagist.org/packages/consolidation/annotated-command)
## Component Status
@@ -24,14 +24,14 @@ Extant commandline tools that utilize this technique include:
This library provides routines to produce the Symfony\Component\Console\Command\Command from all public methods defined in the provided class.
**Note** If you are looking for a very fast way to write a Symfony Console-base command-line tool, you should consider using [Robo](https://github.com/consolidation/Robo), which is built on top of this library, and adds additional conveniences to get you going quickly. See [Using Robo as a Framework](https://github.com/consolidation/Robo/docs/framework.md). It is possible to use this project without Robo if desired, of course.
**Note** If you are looking for a very fast way to write a Symfony Console-base command-line tool, you should consider using [Robo](https://github.com/consolidation/Robo), which is built on top of this library, and adds additional conveniences to get you going quickly. Use [g1a/starter](https://github.com/g1a/starter) to quickly scaffold a new commandline tool. See [Using Robo as a Framework](http://robo.li/framework/). It is possible to use this project without Robo if desired, of course.
## Library Usage
This is a library intended to be used in some other project. Require from your composer.json file:
```
"require": {
"consolidation/annotated-command": "~2"
"consolidation/annotated-command": "^2"
},
```
@@ -43,12 +43,12 @@ The rest of the parameters are arguments. Parameters with a default value are op
class MyCommandClass
{
/**
* This is the my:cat command
* This is the my:echo command
*
* This command will concatenate two parameters. If the --flip flag
* is provided, then the result is the concatenation of two and one.
*
* @command my:cat
* @command my:echo
* @param integer $one The first parameter.
* @param integer $two The other parameter.
* @option arr An option that takes multiple values.
@@ -57,7 +57,7 @@ class MyCommandClass
* @usage bet alpha --flip
* Concatenate "alpha" and "bet".
*/
public function myCat($one, $two, $options = ['flip' => false])
public function myEcho($one, $two, $options = ['flip' => false])
{
if ($options['flip']) {
return "{$two}{$one}";
@@ -65,7 +65,7 @@ class MyCommandClass
return "{$one}{$two}";
}
}
```
```
## Option Default Values
The `$options` array must be an associative array whose key is the name of the option, and whose value is one of:
@@ -103,6 +103,7 @@ The hook **target** specifies which command or commands the hook will be attache
- The command's primary name (e.g. `my:command`) or the command's method name (e.g. myCommand) will attach the hook to only that command.
- An annotation (e.g. `@foo`) will attach the hook to any command that is annotated with the given label.
- If the target is specified as `*`, then the hook will be attached to all commands.
- If the target is omitted, then the hook will be attached to every command defined in the same class as the hook implementation.
There are ten types of hooks in the command processing request flow:
@@ -130,7 +131,7 @@ There are ten types of hooks in the command processing request flow:
- [Command](#command-hook)
- @pre-command
- @command
- @command-init
- @post-command
- [Process](#process-hook)
- @pre-process
- @process
@@ -143,7 +144,7 @@ There are ten types of hooks in the command processing request flow:
- @status
- [Extract](#extract-hook)
- @extract
In addition to these, there are two more hooks available:
- [On-event](#on-event-hook)
@@ -201,6 +202,42 @@ public function initSomeCommand(InputInterface $input, AnnotationData $annotatio
}
```
You may alter the AnnotationData here by using simple array syntax. Below, we
add an additional display field label for a Property List.
```
use Consolidation\AnnotatedCommand\AnnotationData;
use Symfony\Component\Console\Input\InputInterface;
/**
* @hook init some:command
*/
public function initSomeCommand(InputInterface $input, AnnotationData $annotationData)
{
$annotationData['field-labels'] .= "\n" . "new_field: My new field";
}
```
Alternately, you may use the `set()` or `append()` methods on the AnnotationData
class.
```
use Consolidation\AnnotatedCommand\AnnotationData;
use Symfony\Component\Console\Input\InputInterface;
/**
* @hook init some:command
*/
public function initSomeCommand(InputInterface $input, AnnotationData $annotationData)
{
// Add a line to the field labels.
$annotationData->append('field-labels', "\n" . "new_field: My new field");
// Replace all field labels.
$annotationData->set('field-labels', "one_field: My only field");
}
```
### Interact Hook
The interact hook ([InteractorInterface](src/Hooks/InteractorInterface.php)) runs prior to argument and option validation. Required arguments and options not supplied on the command line may be provided during this phase by prompting the user. Note that the interact hook is not called if the --no-interaction flag is supplied, whereas the command-event hook and the init hook are.
@@ -345,12 +382,20 @@ public function nameSomeCommand($result, CommandData $commandData)
### Status Hook
**DEPRECATED**
Instead of using a Status Determiner hook, commands should simply return their exit code and result data separately using a CommandResult object.
The status hook ([StatusDeterminerInterface](src/Hooks/StatusDeterminerInterface.php)) is responsible for determing whether a command succeeded (status code 0) or failed (status code > 0). The result object returned by a command may be a compound object that contains multiple bits of information about the command result. If the result object implements [ExitCodeInterface](ExitCodeInterface.php), then the `getExitCode()` method of the result object is called to determine what the status result code for the command should be. If ExitCodeInterface is not implemented, then all of the status hooks attached to this command are executed; the first one that successfully returns a result will stop further execution of status hooks, and the result it returned will be used as the status result code for this operation.
If no status hook returns any result, then success is presumed.
### Extract Hook
**DEPRECATED**
See [RowsOfFieldsWithMetadata in output-formatters](https://github.com/consolidation/output-formatters/blob/master/src/StructuredData/RowsOfFieldsWithMetadata.php) for an alternative that is more flexible for most use cases.
The extract hook ([ExtractOutputInterface](src/Hooks/ExtractOutputInterface.php)) is responsible for determining what the actual rendered output for the command should be. The result object returned by a command may be a compound object that contains multiple bits of information about the command result. If the result object implements [OutputDataInterface](OutputDataInterface.php), then the `getOutputData()` method of the result object is called to determine what information should be displayed to the user as a result of the command's execution. If OutputDataInterface is not implemented, then all of the extract hooks attached to this command are executed; the first one that successfully returns output data will stop further execution of extract hooks.
If no extract hook returns any data, then the result object itself is printed if it is a string; otherwise, no output is emitted (other than any produced by the command itself).
@@ -399,8 +444,8 @@ class MyReplaceCommandHook {
/**
* @hook replace-command foo:bar
*
* Parameters must match original command method.
*
* Parameters must match original command method.
*/
public function myFooBarReplacement($value) {
print "Hello $value!";
@@ -424,6 +469,46 @@ If you want to use annotations, but still want access to the Symfony Command, e.
It is also possible to add InputInterface and/or OutputInterface parameters to any annotated method of a command file (the parameters must go before command arguments).
## Parameter Injection
Just as this library will by default inject $input and/or $output at the head of the parameter list of any command function, it is also possible to add a handler to inject other objects as well.
Given an implementation of SymfonyStyleInjector similar to the example below:
```
use Consolidation\AnnotatedCommand\ParameterInjector
class SymfonyStyleInjector implements ParameterInjector
{
public function get(CommandData $commandData, $interfaceName)
{
return new MySymfonyStyle($commandData->input(), $commandData->output());
}
}
```
Then, an instance of 'MySymfonyStyle' will be provided to any command handler method that takes a SymfonyStyle parameter if the SymfonyStyleInjector is registered in your application's initialization code like so:
```
$commandProcessor->parameterInjection()->register('Symfony\Component\Console\Style\SymfonyStyle', new SymfonyStyleInjector);
```
## Handling Standard Input
Any Symfony command may use the provides StdinHandler to imlement commands that read from standard input.
```php
/**
* @command example
* @option string $file
* @default $file -
*/
public function example(InputInterface $input)
{
$data = StdinHandler::selectStream($input, 'file')->contents();
}
```
This example will read all of the data available from the stdin stream into $data, or, alternately, will read the entire contents of the file specified via the `--file=/path` option.
For more details, including examples of using the StdinHandle with a DI container, see the comments in [StdinHandler.php](src/Input/StdinHandler.php).
## API Usage
If you would like to use Annotated Commands to build a commandline tool, it is recommended that you use [Robo as a framework](http://robo.li/framework), as it will set up all of the various command classes for you. If you would like to integrate Annotated Commands into some other framework, see the sections below.
@@ -496,7 +581,7 @@ Listeners can be used to construct command file instances as they are provided t
### Option Providers
An option provider is given an opportunity to add options to a command as it is being constructed.
An option provider is given an opportunity to add options to a command as it is being constructed.
```
public function AnnotatedCommandFactory::addAutomaticOptionProvider(AutomaticOptionsProviderInterface $listener);
```
@@ -508,7 +593,3 @@ CommandInfo alterers can adjust information about a command immediately before i
```
public function alterCommandInfo(CommandInfo $commandInfo, $commandFileInstance);
```
## Comparison to Existing Solutions
The existing solutions used their own hand-rolled regex-based parsers to process the contents of the DocBlock comments. consolidation/annotated-command uses the [phpdocumentor/reflection-docblock](https://github.com/phpDocumentor/ReflectionDocBlock) project (which is itself a regex-based parser) to interpret DocBlock contents.

View File

@@ -1,66 +0,0 @@
build: false
shallow_clone: true
platform: 'x86'
clone_folder: C:\projects\annotated-commands
branches:
only:
- master
## Cache composer bits
cache:
- '%LOCALAPPDATA%\Composer\files -> composer.lock'
init:
#https://github.com/composer/composer/blob/master/appveyor.yml
#- SET ANSICON=121x90 (121x90)
# Inspired by https://github.com/Codeception/base/blob/master/appveyor.yml and https://github.com/phpmd/phpmd/blob/master/appveyor.yml
install:
- cinst -y curl
- SET PATH=C:\Program Files\curl;%PATH%
#which is only needed by the test suite.
- cinst -y which
- SET PATH=C:\Program Files\which;%PATH%
- git clone -q https://github.com/acquia/DevDesktopCommon.git #For tar, cksum, ...
- SET PATH=%APPVEYOR_BUILD_FOLDER%/DevDesktopCommon/bintools-win/msys/bin;%PATH%
- SET PATH=C:\Program Files\MySql\MySQL Server 5.7\bin\;%PATH%
#Install PHP per https://blog.wyrihaximus.net/2016/11/running-php-unit-tests-on-windows-using-appveyor-and-chocolatey/
- ps: appveyor-retry cinst --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $Env:php_ver_target | Select-Object -first 1) -replace '[php|]','')
- cd c:\tools\php70
- copy php.ini-production php.ini
- echo extension_dir=ext >> php.ini
- echo extension=php_openssl.dll >> php.ini
- echo date.timezone="UTC" >> php.ini
- echo variables_order="EGPCS" >> php.ini #May be unneeded.
- echo mbstring.http_input=pass >> php.ini
- echo mbstring.http_output=pass >> php.ini
- echo sendmail_path=nul >> php.ini
- echo extension=php_mbstring.dll >> php.ini
- echo extension=php_curl.dll >> php.ini
- echo extension=php_pdo_mysql.dll >> php.ini
- echo extension=php_pdo_pgsql.dll >> php.ini
- echo extension=php_pdo_sqlite.dll >> php.ini
- echo extension=php_pgsql.dll >> php.ini
- echo extension=php_gd2.dll >> php.ini
- SET PATH=C:\tools\php70;%PATH%
#Install Composer
- cd %APPVEYOR_BUILD_FOLDER%
#- appveyor DownloadFile https://getcomposer.org/composer.phar
- php -r "readfile('http://getcomposer.org/installer');" | php
#Install dependencies via Composer
- php composer.phar -q install --prefer-dist -n
- SET PATH=%APPVEYOR_BUILD_FOLDER%;%APPVEYOR_BUILD_FOLDER%/vendor/bin;%PATH%
#Create a sandbox for testing. Don't think we need this.
- mkdir c:\test_temp
test_script:
- phpunit
- php composer.phar cs
# environment variables
environment:
global:
SHELL_INTERACTIVE: true
php_ver_target: 7.0

View File

@@ -19,36 +19,95 @@
}
},
"require": {
"php": ">=5.4.0",
"consolidation/output-formatters": "^3.1.12",
"php": ">=5.4.5",
"consolidation/output-formatters": "^3.5.1",
"psr/log": "^1",
"symfony/console": "^2.8|^3|^4",
"symfony/event-dispatcher": "^2.5|^3|^4",
"symfony/finder": "^2.5|^3|^4"
"symfony/finder": "^2.5|^3|^4|^5"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"satooshi/php-coveralls": "^1.0.2 | dev-master",
"phpunit/phpunit": "^6",
"php-coveralls/php-coveralls": "^1",
"g1a/composer-test-scenarios": "^3",
"squizlabs/php_codesniffer": "^2.7"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"platform": {
"php": "5.6"
"php": "7.0.8"
}
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "SHELL_INTERACTIVE=true phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
]
},
"extra": {
"scenarios": {
"finder5": {
"require": {
"symfony/finder": "^5"
},
"config": {
"platform": {
"php": "7.2.5"
}
}
},
"symfony4": {
"require": {
"symfony/console": "^4.0"
},
"config": {
"platform": {
"php": "7.1.3"
}
}
},
"symfony2": {
"require": {
"symfony/console": "^2.8"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36"
},
"remove": [
"php-coveralls/php-coveralls"
],
"config": {
"platform": {
"php": "5.4.8"
}
},
"scenario-options": {
"create-lockfile": "false"
}
},
"phpunit4": {
"require-dev": {
"phpunit/phpunit": "^4.8.36"
},
"remove": [
"php-coveralls/php-coveralls"
],
"config": {
"platform": {
"php": "5.4.8"
}
}
}
},
"branch-alias": {
"dev-master": "2.x-dev"
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
version: 2
dependencies:
- type: php
path: /
settings:
composer_options: ""
manifest_updates:
filters:
- name: ".*"
versions: "L.Y.Y"

View File

@@ -1,7 +1,7 @@
<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="annotation-command">
<directory prefix="test" suffix=".php">tests</directory>
<directory prefix="" suffix="Test.php">tests</directory>
</testsuite>
</testsuites>
<logging>

View File

@@ -9,6 +9,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Consolidation\AnnotatedCommand\Help\HelpDocumentBuilder;
/**
* AnnotatedCommands are created automatically by the
@@ -32,9 +33,8 @@ class AnnotatedCommand extends Command implements HelpDocumentAlter
protected $annotationData;
protected $examples = [];
protected $topics = [];
protected $usesInputInterface;
protected $usesOutputInterface;
protected $returnType;
protected $injectedClasses = [];
public function __construct($name = null)
{
@@ -153,118 +153,16 @@ class AnnotatedCommand extends Command implements HelpDocumentAlter
public function helpAlter(\DomDocument $originalDom)
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($commandXML = $dom->createElement('command'));
$commandXML->setAttribute('id', $this->getName());
$commandXML->setAttribute('name', $this->getName());
// Get the original <command> element and its top-level elements.
$originalCommandXML = $this->getSingleElementByTagName($dom, $originalDom, 'command');
$originalUsagesXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'usages');
$originalDescriptionXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'description');
$originalHelpXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'help');
$originalArgumentsXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'arguments');
$originalOptionsXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'options');
// Keep only the first of the <usage> elements
$newUsagesXML = $dom->createElement('usages');
$firstUsageXML = $this->getSingleElementByTagName($dom, $originalUsagesXML, 'usage');
$newUsagesXML->appendChild($firstUsageXML);
// Create our own <example> elements
$newExamplesXML = $dom->createElement('examples');
foreach ($this->examples as $usage => $description) {
$newExamplesXML->appendChild($exampleXML = $dom->createElement('example'));
$exampleXML->appendChild($usageXML = $dom->createElement('usage', $usage));
$exampleXML->appendChild($descriptionXML = $dom->createElement('description', $description));
}
// Create our own <alias> elements
$newAliasesXML = $dom->createElement('aliases');
foreach ($this->getAliases() as $alias) {
$newAliasesXML->appendChild($dom->createElement('alias', $alias));
}
// Create our own <topic> elements
$newTopicsXML = $dom->createElement('topics');
foreach ($this->getTopics() as $topic) {
$newTopicsXML->appendChild($topicXML = $dom->createElement('topic', $topic));
}
// Place the different elements into the <command> element in the desired order
$commandXML->appendChild($newUsagesXML);
$commandXML->appendChild($newExamplesXML);
$commandXML->appendChild($originalDescriptionXML);
$commandXML->appendChild($originalArgumentsXML);
$commandXML->appendChild($originalOptionsXML);
$commandXML->appendChild($originalHelpXML);
$commandXML->appendChild($newAliasesXML);
$commandXML->appendChild($newTopicsXML);
return $dom;
}
protected function getSingleElementByTagName($dom, $parent, $tagName)
{
// There should always be exactly one '<command>' element.
$elements = $parent->getElementsByTagName($tagName);
$result = $elements->item(0);
$result = $dom->importNode($result, true);
return $result;
return HelpDocumentBuilder::alter($originalDom, $this);
}
protected function setCommandArguments($commandInfo)
{
$this->setUsesInputInterface($commandInfo);
$this->setUsesOutputInterface($commandInfo);
$this->injectedClasses = $commandInfo->getInjectedClasses();
$this->setCommandArgumentsFromParameters($commandInfo);
return $this;
}
/**
* Check whether the first parameter is an InputInterface.
*/
protected function checkUsesInputInterface($params)
{
/** @var \ReflectionParameter $firstParam */
$firstParam = reset($params);
return $firstParam && $firstParam->getClass() && $firstParam->getClass()->implementsInterface(
'\\Symfony\\Component\\Console\\Input\\InputInterface'
);
}
/**
* Determine whether this command wants to get its inputs
* via an InputInterface or via its command parameters
*/
protected function setUsesInputInterface($commandInfo)
{
$params = $commandInfo->getParameters();
$this->usesInputInterface = $this->checkUsesInputInterface($params);
return $this;
}
/**
* Determine whether this command wants to send its output directly
* to the provided OutputInterface, or whether it will returned
* structured output to be processed by the command processor.
*/
protected function setUsesOutputInterface($commandInfo)
{
$params = $commandInfo->getParameters();
$index = $this->checkUsesInputInterface($params) ? 1 : 0;
$this->usesOutputInterface =
(count($params) > $index) &&
$params[$index]->getClass() &&
$params[$index]->getClass()->implementsInterface(
'\\Symfony\\Component\\Console\\Output\\OutputInterface'
)
;
return $this;
}
protected function setCommandArgumentsFromParameters($commandInfo)
{
$args = $commandInfo->arguments()->getValues();
@@ -437,10 +335,10 @@ class AnnotatedCommand extends Command implements HelpDocumentAlter
$output
);
$commandData->setUseIOInterfaces(
$this->usesInputInterface,
$this->usesOutputInterface
);
// Fetch any classes (e.g. InputInterface / OutputInterface) that
// this command's callback wants passed as a parameter and inject
// it into the command data.
$this->commandProcessor()->injectIntoCommandData($commandData, $this->injectedClasses);
// Allow the commandData to cache the list of options with
// special default values ('null' and 'true'), as these will

View File

@@ -184,6 +184,9 @@ class AnnotatedCommandFactory implements AutomaticOptionsProviderInterface
protected function getCommandInfoListFromCache($commandFileInstance)
{
$commandInfoList = [];
if (!is_object($commandFileInstance)) {
return [];
}
$className = get_class($commandFileInstance);
if (!$this->getDataStore()->has($className)) {
return [];

View File

@@ -24,4 +24,21 @@ class AnnotationData extends \ArrayObject
{
return array_keys($this->getArrayCopy());
}
public function set($key, $value = '')
{
$this->offsetSet($key, $value);
return $this;
}
public function append($key, $value = '')
{
$data = $this->offsetGet($key);
if (is_array($data)) {
$this->offsetSet($key, array_merge($data, $value));
} elseif (is_scalar($data)) {
$this->offsetSet($key, $data . $value);
}
return $this;
}
}

View File

@@ -1,6 +1,7 @@
<?php
namespace Consolidation\AnnotatedCommand;
use Consolidation\OutputFormatters\Options\FormatterOptions;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -14,43 +15,44 @@ class CommandData
/** var OutputInterface */
protected $output;
/** var boolean */
protected $usesInputInterface;
/** var boolean */
protected $usesOutputInterface;
/** var boolean */
protected $includeOptionsInArgs;
/** var array */
protected $specialDefaults = [];
/** @var string[] */
protected $injectedInstances = [];
/** @var FormatterOptions */
protected $formatterOptions;
public function __construct(
AnnotationData $annotationData,
InputInterface $input,
OutputInterface $output,
$usesInputInterface = false,
$usesOutputInterface = false
OutputInterface $output
) {
$this->annotationData = $annotationData;
$this->input = $input;
$this->output = $output;
$this->usesInputInterface = false;
$this->usesOutputInterface = false;
$this->includeOptionsInArgs = true;
}
/**
* For internal use only; indicates that the function to be called
* should be passed an InputInterface &/or an OutputInterface.
* @param booean $usesInputInterface
* @param boolean $usesOutputInterface
* @return self
* For internal use only; inject an instance to be passed back
* to the command callback as a parameter.
*/
public function setUseIOInterfaces($usesInputInterface, $usesOutputInterface)
public function injectInstance($injectedInstance)
{
$this->usesInputInterface = $usesInputInterface;
$this->usesOutputInterface = $usesOutputInterface;
array_unshift($this->injectedInstances, $injectedInstance);
return $this;
}
/**
* Provide a reference to the instances that will be added to the
* beginning of the parameter list when the command callback is invoked.
*/
public function injectedInstances()
{
return $this->injectedInstances;
}
/**
* For backwards-compatibility mode only: disable addition of
* options on the end of the arguments list.
@@ -66,6 +68,16 @@ class CommandData
return $this->annotationData;
}
public function formatterOptions()
{
return $this->formatterOptions;
}
public function setFormatterOptions($formatterOptions)
{
$this->formatterOptions = $formatterOptions;
}
public function input()
{
return $this->input;
@@ -170,14 +182,8 @@ class CommandData
// will be the command name. The Application alters the
// input definition to match, adding a 'command' argument
// to the beginning.
array_shift($args);
if ($this->usesOutputInterface) {
array_unshift($args, $this->output());
}
if ($this->usesInputInterface) {
array_unshift($args, $this->input());
if ($this->input->hasArgument('command')) {
array_shift($args);
}
return $args;

View File

@@ -27,6 +27,15 @@ use Symfony\Component\Finder\Finder;
* To discover global commands:
*
* $commandFiles = $discovery->discover($drupalRoot, '\Drupal');
*
* WARNING:
*
* This class is deprecated. Commandfile discovery is complicated, and does
* not work from within phar files. It is recommended to instead use a static
* list of command classes as shown in https://github.com/g1a/starter/blob/master/example
*
* For a better alternative when implementing a plugin mechanism, see
* https://robo.li/extending/#register-command-files-via-psr-4-autoloading
*/
class CommandFileDiscovery
{
@@ -42,6 +51,8 @@ class CommandFileDiscovery
protected $searchDepth = 2;
/** @var bool */
protected $followLinks = false;
/** @var string[] */
protected $strippedNamespaces;
public function __construct()
{
@@ -125,6 +136,32 @@ class CommandFileDiscovery
return $this;
}
/**
* Set a particular namespace part to ignore. This is useful in plugin
* mechanisms where the plugin is placed by Composer.
*
* For example, Drush extensions are placed in `./drush/Commands`.
* If the Composer installer path is `"drush/Commands/contrib/{$name}": ["type:drupal-drush"]`,
* then Composer will place the command files in `drush/Commands/contrib`.
* The namespace should not be any different in this instance than if
* the extension were placed in `drush/Commands`, though, so Drush therefore
* calls `ignoreNamespacePart('contrib', 'Commands')`. This causes the
* `contrib` component to be removed from the namespace if it follows
* the namespace `Commands`. If the '$base' parameter is not specified, then
* the ignored portion of the namespace may appear anywhere in the path.
*/
public function ignoreNamespacePart($ignore, $base = '')
{
$replacementPart = '\\';
if (!empty($base)) {
$replacementPart .= $base . '\\';
}
$ignoredPart = $replacementPart . $ignore . '\\';
$this->strippedNamespaces[$ignoredPart] = $replacementPart;
return $this;
}
/**
* Add one more location to the search location list.
*
@@ -205,7 +242,32 @@ class CommandFileDiscovery
$this->discoverCommandFiles("$directory/src", $itemsNamespace)
);
}
return $commandFiles;
return $this->fixNamespaces($commandFiles);
}
/**
* fixNamespaces will alter the namespaces in the commandFiles
* result to remove the Composer placement directory, if any.
*/
protected function fixNamespaces($commandFiles)
{
// Do nothing unless the client told us to remove some namespace components.
if (empty($this->strippedNamespaces)) {
return $commandFiles;
}
// Strip out any part of the namespace the client did not want.
// @see CommandFileDiscovery::ignoreNamespacePart
return array_map(
function ($fqcn) {
return str_replace(
array_keys($this->strippedNamespaces),
array_values($this->strippedNamespaces),
$fqcn
);
},
$commandFiles
);
}
/**
@@ -304,8 +366,8 @@ class CommandFileDiscovery
foreach ($finder as $file) {
$relativePathName = $file->getRelativePathname();
$relativeNamespaceAndClassname = str_replace(
['/', '.php'],
['\\', ''],
['/', '-', '.php'],
['\\', '_', ''],
$relativePathName
);
$classname = $this->joinNamespace([$baseNamespace, $relativeNamespaceAndClassname]);

View File

@@ -31,16 +31,18 @@ class CommandProcessor implements LoggerAwareInterface
{
use LoggerAwareTrait;
/** var HookManager */
/** @var HookManager */
protected $hookManager;
/** var FormatterManager */
/** @var FormatterManager */
protected $formatterManager;
/** var callable */
protected $displayErrorFunction;
/** var PrepareFormatterOptions[] */
/** @var PrepareFormatterOptions[] */
protected $prepareOptionsList = [];
/** var boolean */
/** @var boolean */
protected $passExceptions;
/** @var ResultWriter */
protected $resultWriter;
/** @var ParameterInjection */
protected $parameterInjection;
public function __construct(HookManager $hookManager)
{
@@ -56,6 +58,32 @@ class CommandProcessor implements LoggerAwareInterface
return $this->hookManager;
}
public function resultWriter()
{
if (!$this->resultWriter) {
$this->setResultWriter(new ResultWriter());
}
return $this->resultWriter;
}
public function setResultWriter($resultWriter)
{
$this->resultWriter = $resultWriter;
}
public function parameterInjection()
{
if (!$this->parameterInjection) {
$this->setParameterInjection(new ParameterInjection());
}
return $this->parameterInjection;
}
public function setParameterInjection($parameterInjection)
{
$this->parameterInjection = $parameterInjection;
}
public function addPrepareFormatter(PrepareFormatter $preparer)
{
$this->prepareOptionsList[] = $preparer;
@@ -64,13 +92,13 @@ class CommandProcessor implements LoggerAwareInterface
public function setFormatterManager(FormatterManager $formatterManager)
{
$this->formatterManager = $formatterManager;
$this->resultWriter()->setFormatterManager($formatterManager);
return $this;
}
public function setDisplayErrorFunction(callable $fn)
{
$this->displayErrorFunction = $fn;
return $this;
$this->resultWriter()->setDisplayErrorFunction($fn);
}
/**
@@ -169,6 +197,9 @@ class CommandProcessor implements LoggerAwareInterface
return $validated;
}
// Once we have validated the optins, create the formatter options.
$this->createFormatterOptions($commandData);
$replaceDispatcher = new ReplaceCommandHookDispatcher($this->hookManager(), $names);
if ($this->logger) {
$replaceDispatcher->setLogger($this->logger);
@@ -188,119 +219,6 @@ class CommandProcessor implements LoggerAwareInterface
return $processDispatcher->process($result, $commandData);
}
/**
* Handle the result output and status code calculation.
*/
public function handleResults(OutputInterface $output, $names, $result, CommandData $commandData)
{
$statusCodeDispatcher = new StatusDeterminerHookDispatcher($this->hookManager(), $names);
$status = $statusCodeDispatcher->determineStatusCode($result);
// If the result is an integer and no separate status code was provided, then use the result as the status and do no output.
if (is_integer($result) && !isset($status)) {
return $result;
}
$status = $this->interpretStatusCode($status);
// Get the structured output, the output stream and the formatter
$extractDispatcher = new ExtracterHookDispatcher($this->hookManager(), $names);
$structuredOutput = $extractDispatcher->extractOutput($result);
$output = $this->chooseOutputStream($output, $status);
if ($status != 0) {
return $this->writeErrorMessage($output, $status, $structuredOutput, $result);
}
if ($this->dataCanBeFormatted($structuredOutput) && isset($this->formatterManager)) {
return $this->writeUsingFormatter($output, $structuredOutput, $commandData);
}
return $this->writeCommandOutput($output, $structuredOutput);
}
protected function dataCanBeFormatted($structuredOutput)
{
if (!isset($this->formatterManager)) {
return false;
}
return
is_object($structuredOutput) ||
is_array($structuredOutput);
}
/**
* Run the main command callback
*/
protected function runCommandCallback($commandCallback, CommandData $commandData)
{
$result = false;
try {
$args = $commandData->getArgsAndOptions();
$result = call_user_func_array($commandCallback, $args);
} catch (\Exception $e) {
$result = $this->commandErrorForException($e);
}
return $result;
}
/**
* Determine the formatter that should be used to render
* output.
*
* If the user specified a format via the --format option,
* then always return that. Otherwise, return the default
* format, unless --pipe was specified, in which case
* return the default pipe format, format-pipe.
*
* n.b. --pipe is a handy option introduced in Drush 2
* (or perhaps even Drush 1) that indicates that the command
* should select the output format that is most appropriate
* for use in scripts (e.g. to pipe to another command).
*
* @return string
*/
protected function getFormat(FormatterOptions $options)
{
// In Symfony Console, there is no way for us to differentiate
// between the user specifying '--format=table', and the user
// not specifying --format when the default value is 'table'.
// Therefore, we must make --field always override --format; it
// cannot become the default value for --format.
if ($options->get('field')) {
return 'string';
}
$defaults = [];
if ($options->get('pipe')) {
return $options->get('pipe-format', [], 'tsv');
}
return $options->getFormat($defaults);
}
/**
* Determine whether we should use stdout or stderr.
*/
protected function chooseOutputStream(OutputInterface $output, $status)
{
// If the status code indicates an error, then print the
// result to stderr rather than stdout
if ($status && ($output instanceof ConsoleOutputInterface)) {
return $output->getErrorOutput();
}
return $output;
}
/**
* Call the formatter to output the provided data.
*/
protected function writeUsingFormatter(OutputInterface $output, $structuredOutput, CommandData $commandData)
{
$formatterOptions = $this->createFormatterOptions($commandData);
$format = $this->getFormat($formatterOptions);
$this->formatterManager->write(
$output,
$format,
$structuredOutput,
$formatterOptions
);
return 0;
}
/**
* Create a FormatterOptions object for use in writing the formatted output.
* @param CommandData $commandData
@@ -313,51 +231,38 @@ class CommandProcessor implements LoggerAwareInterface
foreach ($this->prepareOptionsList as $preparer) {
$preparer->prepare($commandData, $formatterOptions);
}
$commandData->setFormatterOptions($formatterOptions);
return $formatterOptions;
}
/**
* Description
* @param OutputInterface $output
* @param int $status
* @param string $structuredOutput
* @param mixed $originalResult
* @return type
* Handle the result output and status code calculation.
*/
protected function writeErrorMessage($output, $status, $structuredOutput, $originalResult)
public function handleResults(OutputInterface $output, $names, $result, CommandData $commandData)
{
if (isset($this->displayErrorFunction)) {
call_user_func($this->displayErrorFunction, $output, $structuredOutput, $status, $originalResult);
} else {
$this->writeCommandOutput($output, $structuredOutput);
}
return $status;
$statusCodeDispatcher = new StatusDeterminerHookDispatcher($this->hookManager(), $names);
$extractDispatcher = new ExtracterHookDispatcher($this->hookManager(), $names);
return $this->resultWriter()->handle($output, $result, $commandData, $statusCodeDispatcher, $extractDispatcher);
}
/**
* If the result object is a string, then print it.
* Run the main command callback
*/
protected function writeCommandOutput(
OutputInterface $output,
$structuredOutput
) {
// If there is no formatter, we will print strings,
// but can do no more than that.
if (is_string($structuredOutput)) {
$output->writeln($structuredOutput);
protected function runCommandCallback($commandCallback, CommandData $commandData)
{
$result = false;
try {
$args = $this->parameterInjection()->args($commandData);
$result = call_user_func_array($commandCallback, $args);
} catch (\Exception $e) {
$result = $this->commandErrorForException($e);
}
return 0;
return $result;
}
/**
* If a status code was set, then return it; otherwise,
* presume success.
*/
protected function interpretStatusCode($status)
public function injectIntoCommandData($commandData, $injectedClasses)
{
if (isset($status)) {
return $status;
}
return 0;
$this->parameterInjection()->injectIntoCommandData($commandData, $injectedClasses);
}
}

View File

@@ -0,0 +1,71 @@
<?php
namespace Consolidation\AnnotatedCommand;
/**
* Return a CommandResult as the result of a command to pass both an exit
* code and result data from a command.
*
* Usage:
*
* return CommandResult::dataWithExitCode(new RowsOfFields($rows), 1);
*
* The CommandResult can also be used to unambiguously return just
* an exit code or just output data.
*
* Exit code only:
*
* return CommandResult::dataWithExitCode(1);
*
* Data only:
*
* return CommandResult::data(new RowsOfFields($rows));
*
* Historically, it has always been possible to return an integer to indicate
* that the result is an exit code, and other return types (typically array
* / ArrayObjects) indicating actual data with an implicit exit code of 0.
* Using a CommandResult is preferred, though, as it allows the result of the
* function to be unambiguously specified without type-based interpretation.
*
* @package Consolidation\AnnotatedCommand
*/
class CommandResult implements ExitCodeInterface, OutputDataInterface
{
protected $data;
protected $exitCode;
protected function __construct($data = null, $exitCode = 0)
{
$this->data = $data;
$this->exitCode = $exitCode;
}
public static function exitCode($exitCode)
{
return new self(null, $exitCode);
}
public static function data($data)
{
return new self($data);
}
public static function dataWithExitCode($data, $exitCode)
{
return new self($data, $exitCode);
}
public function getExitCode()
{
return $this->exitCode;
}
public function getOutputData()
{
return $this->data;
}
public function setOutputData($data)
{
$this->data = $data;
}
}

View File

@@ -0,0 +1,76 @@
<?php
namespace Consolidation\AnnotatedCommand\Help;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Descriptor\XmlDescriptor;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Consolidation\AnnotatedCommand\AnnotatedCommand;
class HelpDocumentBuilder
{
public static function alter(\DomDocument $originalDom, AnnotatedCommand $command)
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($commandXML = $dom->createElement('command'));
$commandXML->setAttribute('id', $command->getName());
$commandXML->setAttribute('name', $command->getName());
// Get the original <command> element and its top-level elements.
$originalCommandXML = static::getSingleElementByTagName($dom, $originalDom, 'command');
$originalUsagesXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'usages');
$originalDescriptionXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'description');
$originalHelpXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'help');
$originalArgumentsXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'arguments');
$originalOptionsXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'options');
// Keep only the first of the <usage> elements
$newUsagesXML = $dom->createElement('usages');
$firstUsageXML = static::getSingleElementByTagName($dom, $originalUsagesXML, 'usage');
$newUsagesXML->appendChild($firstUsageXML);
// Create our own <example> elements
$newExamplesXML = $dom->createElement('examples');
foreach ($command->getExampleUsages() as $usage => $description) {
$newExamplesXML->appendChild($exampleXML = $dom->createElement('example'));
$exampleXML->appendChild($usageXML = $dom->createElement('usage', $usage));
$exampleXML->appendChild($descriptionXML = $dom->createElement('description', $description));
}
// Create our own <alias> elements
$newAliasesXML = $dom->createElement('aliases');
foreach ($command->getAliases() as $alias) {
$newAliasesXML->appendChild($dom->createElement('alias', $alias));
}
// Create our own <topic> elements
$newTopicsXML = $dom->createElement('topics');
foreach ($command->getTopics() as $topic) {
$newTopicsXML->appendChild($topicXML = $dom->createElement('topic', $topic));
}
// Place the different elements into the <command> element in the desired order
$commandXML->appendChild($newUsagesXML);
$commandXML->appendChild($newExamplesXML);
$commandXML->appendChild($originalDescriptionXML);
$commandXML->appendChild($originalArgumentsXML);
$commandXML->appendChild($originalOptionsXML);
$commandXML->appendChild($originalHelpXML);
$commandXML->appendChild($newAliasesXML);
$commandXML->appendChild($newTopicsXML);
return $dom;
}
protected static function getSingleElementByTagName($dom, $parent, $tagName)
{
// There should always be exactly one '<command>' element.
$elements = $parent->getElementsByTagName($tagName);
$result = $elements->item(0);
$result = $dom->importNode($result, true);
return $result;
}
}

View File

@@ -4,6 +4,10 @@ namespace Consolidation\AnnotatedCommand\Hooks;
/**
* A StatusDeterminer maps from a result to a status exit code.
*
* @deprecated. Instead of using a Status Determiner hook, commands
* should simply return their exit code and result data separately
* using a CommandResult object.
*
* @see HookManager::addStatusDeterminer()
*/
interface StatusDeterminerInterface

View File

@@ -0,0 +1,34 @@
<?php
namespace Consolidation\AnnotatedCommand\Input;
/**
* StdinAwareInterface should be implemented by classes that read from
* standard input. This class contains facilities to redirect stdin to
* instead read from a file, e.g. in response to an option or argument
* value.
*
* Using StdinAwareInterface is preferable to reading from php://stdin
* directly, as it provides a mechanism to instead inject an instance
* of StdinHandler that reads from a file, e.g. in tests.
*
* n.b. If the standard input handler is fetched prior to any code
* injecting an stdin handler, you will get an object that is configured
* to read from php://stdin.
*/
interface StdinAwareInterface
{
/**
* Sets the standard input handler.
*
* @param StdinHandler
*/
public function setStdinHandler(StdinHandler $stdin);
/**
* Returns the standard input handler.
*
* @return StdinHandler
*/
public function stdin();
}

View File

@@ -0,0 +1,30 @@
<?php
namespace Consolidation\AnnotatedCommand\Input;
/**
* StdinAwareTrait provides the implementation for StdinAwareInterface.
*/
trait StdinAwareTrait
{
protected $stdinHandler;
/**
* @inheritdoc
*/
public function setStdinHandler(StdinHandler $stdin)
{
$this->stdinHandler = $stdin;
}
/**
* @inheritdoc
*/
public function stdin()
{
if (!$this->stdinHandler) {
$this->stdinHandler = new StdinHandler();
}
return $this->stdinHandler;
}
}

View File

@@ -0,0 +1,247 @@
<?php
namespace Consolidation\AnnotatedCommand\Input;
use Symfony\Component\Console\Input\StreamableInputInterface;
use Symfony\Component\Console\Input\InputInterface;
/**
* StdinHandler is a thin wrapper around php://stdin. It provides
* methods for redirecting input from a file, possibly conditionally
* under the control of an Input object.
*
* Example trivial usage (always reads from stdin):
*
* class Example implements StdinAwareInterface
* {
* /**
* * @command cat
* * @param string $file
* * @default $file -
* * /
* public function cat()
* {
* print($this->stdin()->contents());
* }
* }
*
* Command that reads from stdin or file via an option:
*
* /**
* * @command cat
* * @param string $file
* * @default $file -
* * /
* public function cat(InputInterface $input)
* {
* $data = $this->stdin()->select($input, 'file')->contents();
* }
*
* Command that reads from stdin or file via an option:
*
* /**
* * @command cat
* * @option string $file
* * @default $file -
* * /
* public function cat(InputInterface $input)
* {
* $data = $this->stdin()->select($input, 'file')->contents();
* }
*
* It is also possible to inject the selected stream into the input object,
* e.g. if you want the contents of the source file to be fed to any Question
* helper et. al. that the $input object is used with.
*
* /**
* * @command example
* * @option string $file
* * @default $file -
* * /
* public function example(InputInterface $input)
* {
* $this->stdin()->setStream($input, 'file');
* }
*
*
* Inject an alternate source for standard input in tests. Presumes that
* the object under test gets a reference to the StdinHandler via dependency
* injection from the container.
*
* $container->get('stdinHandler')->redirect($pathToTestStdinFileFixture);
*
* You may also inject your stdin file fixture stream into the $input object
* as usual, and then use it with 'select()' or 'setStream()' as shown above.
*
* Finally, this class may also be used in absence of a dependency injection
* container by using the static 'selectStream()' method:
*
* /**
* * @command example
* * @option string $file
* * @default $file -
* * /
* public function example(InputInterface $input)
* {
* $data = StdinHandler::selectStream($input, 'file')->contents();
* }
*
* To test a method that uses this technique, simply inject your stdin
* fixture into the $input object in your test:
*
* $input->setStream(fopen($pathToFixture, 'r'));
*/
class StdinHandler
{
protected $path;
protected $stream;
public static function selectStream(InputInterface $input, $optionOrArg)
{
$handler = new Self();
return $handler->setStream($input, $optionOrArg);
}
/**
* hasPath returns 'true' if the stdin handler has a path to a file.
*
* @return bool
*/
public function hasPath()
{
// Once the stream has been opened, we mask the existence of the path.
return !$this->hasStream() && !empty($this->path);
}
/**
* hasStream returns 'true' if the stdin handler has opened a stream.
*
* @return bool
*/
public function hasStream()
{
return !empty($this->stream);
}
/**
* path returns the path to any file that was set as a redirection
* source, or `php://stdin` if none have been.
*
* @return string
*/
public function path()
{
return $this->path ?: 'php://stdin';
}
/**
* close closes the input stream if it was opened.
*/
public function close()
{
if ($this->hasStream()) {
fclose($this->stream);
$this->stream = null;
}
return $this;
}
/**
* redirect specifies a path to a file that should serve as the
* source to read from. If the input path is '-' or empty,
* then output will be taken from php://stdin (or whichever source
* was provided via the 'redirect' method).
*
* @return $this
*/
public function redirect($path)
{
if ($this->pathProvided($path)) {
$this->path = $path;
}
return $this;
}
/**
* select chooses the source of the input stream based on whether or
* not the user provided the specified option or argument on the commandline.
* Stdin is selected if there is no user selection.
*
* @param InputInterface $input
* @param string $optionOrArg
* @return $this
*/
public function select(InputInterface $input, $optionOrArg)
{
$this->redirect($this->getOptionOrArg($input, $optionOrArg));
if (!$this->hasPath() && ($input instanceof StreamableInputInterface)) {
$this->stream = $input->getStream();
}
return $this;
}
/**
* getStream opens and returns the stdin stream (or redirect file).
*/
public function getStream()
{
if (!$this->hasStream()) {
$this->stream = fopen($this->path(), 'r');
}
return $this->stream;
}
/**
* setStream functions like 'select', and also sets up the $input
* object to read from the selected input stream e.g. when used
* with a question helper.
*/
public function setStream(InputInterface $input, $optionOrArg)
{
$this->select($input, $optionOrArg);
if ($input instanceof StreamableInputInterface) {
$stream = $this->getStream();
$input->setStream($stream);
}
return $this;
}
/**
* contents reads the entire contents of the standard input stream.
*
* @return string
*/
public function contents()
{
// Optimization: use file_get_contents if we have a path to a file
// and the stream has not been opened yet.
if (!$this->hasStream()) {
return file_get_contents($this->path());
}
$stream = $this->getStream();
stream_set_blocking($stream, false); // TODO: We did this in backend invoke. Necessary here?
$contents = stream_get_contents($stream);
$this->close();
return $contents;
}
/**
* Returns 'true' if a path was specfied, and that path was not '-'.
*/
protected function pathProvided($path)
{
return !empty($path) && ($path != '-');
}
protected function getOptionOrArg(InputInterface $input, $optionOrArg)
{
if ($input->hasOption($optionOrArg)) {
return $input->getOption($optionOrArg);
}
return $input->getArgument($optionOrArg);
}
}

View File

@@ -0,0 +1,57 @@
<?php
namespace Consolidation\AnnotatedCommand;
/**
* Prepare parameter list for execurion. Handle injection of any
* special values (e.g. $input and $output) into the parameter list.
*/
class ParameterInjection implements ParameterInjector
{
public function __construct()
{
$this->register('Symfony\Component\Console\Input\InputInterface', $this);
$this->register('Symfony\Component\Console\Output\OutputInterface', $this);
}
public function register($interfaceName, ParameterInjector $injector)
{
$this->injectors[$interfaceName] = $injector;
}
public function args($commandData)
{
return array_merge(
$commandData->injectedInstances(),
$commandData->getArgsAndOptions()
);
}
public function injectIntoCommandData($commandData, $injectedClasses)
{
foreach ($injectedClasses as $injectedClass) {
$injectedInstance = $this->getInstanceToInject($commandData, $injectedClass);
$commandData->injectInstance($injectedInstance);
}
}
protected function getInstanceToInject(CommandData $commandData, $interfaceName)
{
if (!isset($this->injectors[$interfaceName])) {
return null;
}
return $this->injectors[$interfaceName]->get($commandData, $interfaceName);
}
public function get(CommandData $commandData, $interfaceName)
{
switch ($interfaceName) {
case 'Symfony\Component\Console\Input\InputInterface':
return $commandData->input();
case 'Symfony\Component\Console\Output\OutputInterface':
return $commandData->output();
}
return null;
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Consolidation\AnnotatedCommand;
/**
* Provide an object for the specified interface or class name.
*/
interface ParameterInjector
{
public function get(CommandData $commandData, $interfaceName);
}

View File

@@ -20,7 +20,7 @@ class CommandInfo
/**
* Serialization schema version. Incremented every time the serialization schema changes.
*/
const SERIALIZATION_SCHEMA_VERSION = 3;
const SERIALIZATION_SCHEMA_VERSION = 4;
/**
* @var \ReflectionMethod
@@ -88,6 +88,11 @@ class CommandInfo
*/
protected $returnType;
/**
* @var string[]
*/
protected $injectedClasses = [];
/**
* Create a new CommandInfo class for a particular method of a class.
*
@@ -203,6 +208,18 @@ class CommandInfo
return $this->returnType;
}
public function getInjectedClasses()
{
$this->parseDocBlock();
return $this->injectedClasses;
}
public function setInjectedClasses($injectedClasses)
{
$this->injectedClasses = $injectedClasses;
return $this;
}
public function setReturnType($returnType)
{
$this->returnType = $returnType;
@@ -634,6 +651,11 @@ class CommandInfo
if ($this->lastParameterIsOptionsArray()) {
array_pop($params);
}
while (!empty($params) && ($params[0]->getClass() != null)) {
$param = array_shift($params);
$injectedClass = $param->getClass()->getName();
array_unshift($this->injectedClasses, $injectedClass);
}
foreach ($params as $param) {
$this->addParameterToResult($result, $param);
}

View File

@@ -29,7 +29,7 @@ class CommandInfoDeserializer
isset($cache['method_name']) &&
isset($cache['mtime']) &&
($cache['schema'] > 0) &&
($cache['schema'] <= CommandInfo::SERIALIZATION_SCHEMA_VERSION) &&
($cache['schema'] == CommandInfo::SERIALIZATION_SCHEMA_VERSION) &&
self::cachedMethodExists($cache);
}
@@ -45,6 +45,7 @@ class CommandInfoDeserializer
->setDescription($info_array['description'])
->replaceExampleUsages($info_array['example_usages'])
->setReturnType($info_array['return_type'])
->setInjectedClasses($info_array['injected_classes'])
;
$this->constructDefaultsWithDescriptions($commandInfo->arguments(), (array)$info_array['arguments']);
@@ -81,6 +82,7 @@ class CommandInfoDeserializer
'parameters' => [],
'arguments' => [],
'options' => [],
'injected_classes' => [],
'mtime' => 0,
];
}

View File

@@ -23,6 +23,7 @@ class CommandInfoSerializer
'class' => $className,
'method_name' => $commandInfo->getMethodName(),
'mtime' => filemtime($path),
'injected_classes' => [],
];
// If this is a valid method / hook, then add more information.
@@ -38,6 +39,7 @@ class CommandInfoSerializer
];
$info['arguments'] = $this->serializeDefaultsWithDescriptions($commandInfo->arguments());
$info['options'] = $this->serializeDefaultsWithDescriptions($commandInfo->options());
$info['injected_classes'] = $commandInfo->getInjectedClasses();
}
return $info;

View File

@@ -20,7 +20,7 @@ class BespokeDocBlockParser
'command' => 'processCommandTag',
'name' => 'processCommandTag',
'arg' => 'processArgumentTag',
'param' => 'processArgumentTag',
'param' => 'processParamTag',
'return' => 'processReturnTag',
'option' => 'processOptionTag',
'default' => 'processDefaultTag',
@@ -83,6 +83,31 @@ class BespokeDocBlockParser
$this->commandInfo->setDescription($tag->getContent());
}
/**
* Store the data from a @param annotation in our argument descriptions.
*/
protected function processParamTag($tag)
{
if ($tag->hasTypeVariableAndDescription($matches)) {
if ($this->ignoredParamType($matches['type'])) {
return;
}
}
return $this->processArgumentTag($tag);
}
protected function ignoredParamType($paramType)
{
// TODO: We should really only allow a couple of types here,
// e.g. 'string', 'array', 'bool'. Blacklist things we do not
// want for now to avoid breaking commands with weird types.
// Fix in the next major version.
//
// This works:
// return !in_array($paramType, ['string', 'array', 'integer', 'bool']);
return preg_match('#(InputInterface|OutputInterface)$#', $paramType);
}
/**
* Store the data from a @arg annotation in our argument descriptions.
*/
@@ -112,7 +137,20 @@ class BespokeDocBlockParser
{
$variableName = $this->commandInfo->findMatchingOption($name);
$description = static::removeLineBreaks($description);
list($description, $defaultValue) = $this->splitOutDefault($description);
$set->add($variableName, $description);
if ($defaultValue !== null) {
$set->setDefaultValue($variableName, $defaultValue);
}
}
protected function splitOutDefault($description)
{
if (!preg_match('#(.*)(Default: *)(.*)#', trim($description), $matches)) {
return [$description, null];
}
return [trim($matches[1]), $this->interpretDefaultValue(trim($matches[3]))];
}
/**

View File

@@ -88,7 +88,7 @@ class FullyQualifiedClassCache
// If this is an aliased class, 'use \Foo\Bar as Baz', then adjust
if (strpos($usedClass, ' as ')) {
$unqualifiedClass = preg_replace('#.*\sas\s+#', '', $usedClass);
$usedClass = preg_replace('#\s+as\s+#', '', $usedClass);
$usedClass = preg_replace('#[a-zA-Z0-9]+\s+as\s+#', '', $usedClass);
}
$result[$unqualifiedClass] = $usedClass;
}

View File

@@ -0,0 +1,210 @@
<?php
namespace Consolidation\AnnotatedCommand;
use Consolidation\AnnotatedCommand\Hooks\Dispatchers\ReplaceCommandHookDispatcher;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Consolidation\OutputFormatters\FormatterManager;
use Consolidation\OutputFormatters\Options\FormatterOptions;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Options\PrepareFormatter;
use Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher;
use Consolidation\AnnotatedCommand\Hooks\Dispatchers\OptionsHookDispatcher;
use Consolidation\AnnotatedCommand\Hooks\Dispatchers\InteractHookDispatcher;
use Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher;
use Consolidation\AnnotatedCommand\Hooks\Dispatchers\ProcessResultHookDispatcher;
use Consolidation\AnnotatedCommand\Hooks\Dispatchers\StatusDeterminerHookDispatcher;
use Consolidation\AnnotatedCommand\Hooks\Dispatchers\ExtracterHookDispatcher;
/**
* Write the results of a command. Inject your ResultWriter
* into the CommandProcessor.
*/
class ResultWriter
{
/** var FormatterManager */
protected $formatterManager;
/** @var callable */
protected $displayErrorFunction;
public function setFormatterManager(FormatterManager $formatterManager)
{
$this->formatterManager = $formatterManager;
return $this;
}
/**
* Return the formatter manager
* @return FormatterManager
*/
public function formatterManager()
{
return $this->formatterManager;
}
public function setDisplayErrorFunction(callable $fn)
{
$this->displayErrorFunction = $fn;
return $this;
}
/**
* Handle the result output and status code calculation.
*/
public function handle(OutputInterface $output, $result, CommandData $commandData, $statusCodeDispatcher = null, $extractDispatcher = null)
{
// A little messy, for backwards compatibility: if the result implements
// ExitCodeInterface, then use that as the exit code. If a status code
// dispatcher returns a non-zero result, then we will never print a
// result.
$status = null;
if ($result instanceof ExitCodeInterface) {
$status = $result->getExitCode();
} elseif (isset($statusCodeDispatcher)) {
$status = $statusCodeDispatcher->determineStatusCode($result);
if (isset($status) && ($status != 0)) {
return $status;
}
}
// If the result is an integer and no separate status code was provided, then use the result as the status and do no output.
if (is_integer($result) && !isset($status)) {
return $result;
}
$status = $this->interpretStatusCode($status);
// Get the structured output, the output stream and the formatter
$structuredOutput = $result;
if (isset($extractDispatcher)) {
$structuredOutput = $extractDispatcher->extractOutput($result);
}
if (($status != 0) && is_string($structuredOutput)) {
$output = $this->chooseOutputStream($output, $status);
return $this->writeErrorMessage($output, $status, $structuredOutput, $result);
}
if ($this->dataCanBeFormatted($structuredOutput) && isset($this->formatterManager)) {
return $this->writeUsingFormatter($output, $structuredOutput, $commandData, $status);
}
return $this->writeCommandOutput($output, $structuredOutput, $status);
}
protected function dataCanBeFormatted($structuredOutput)
{
if (!isset($this->formatterManager)) {
return false;
}
return
is_object($structuredOutput) ||
is_array($structuredOutput);
}
/**
* Determine the formatter that should be used to render
* output.
*
* If the user specified a format via the --format option,
* then always return that. Otherwise, return the default
* format, unless --pipe was specified, in which case
* return the default pipe format, format-pipe.
*
* n.b. --pipe is a handy option introduced in Drush 2
* (or perhaps even Drush 1) that indicates that the command
* should select the output format that is most appropriate
* for use in scripts (e.g. to pipe to another command).
*
* @return string
*/
protected function getFormat(FormatterOptions $options)
{
// In Symfony Console, there is no way for us to differentiate
// between the user specifying '--format=table', and the user
// not specifying --format when the default value is 'table'.
// Therefore, we must make --field always override --format; it
// cannot become the default value for --format.
if ($options->get('field')) {
return 'string';
}
$defaults = [];
if ($options->get('pipe')) {
return $options->get('pipe-format', [], 'tsv');
}
return $options->getFormat($defaults);
}
/**
* Determine whether we should use stdout or stderr.
*/
protected function chooseOutputStream(OutputInterface $output, $status)
{
// If the status code indicates an error, then print the
// result to stderr rather than stdout
if ($status && ($output instanceof ConsoleOutputInterface)) {
return $output->getErrorOutput();
}
return $output;
}
/**
* Call the formatter to output the provided data.
*/
protected function writeUsingFormatter(OutputInterface $output, $structuredOutput, CommandData $commandData, $status = 0)
{
$formatterOptions = $commandData->formatterOptions();
$format = $this->getFormat($formatterOptions);
$this->formatterManager->write(
$output,
$format,
$structuredOutput,
$formatterOptions
);
return $status;
}
/**
* Description
* @param OutputInterface $output
* @param int $status
* @param string $structuredOutput
* @param mixed $originalResult
* @return type
*/
protected function writeErrorMessage($output, $status, $structuredOutput, $originalResult)
{
if (isset($this->displayErrorFunction)) {
call_user_func($this->displayErrorFunction, $output, $structuredOutput, $status, $originalResult);
} else {
$this->writeCommandOutput($output, $structuredOutput);
}
return $status;
}
/**
* If the result object is a string, then print it.
*/
protected function writeCommandOutput(
OutputInterface $output,
$structuredOutput,
$status = 0
) {
// If there is no formatter, we will print strings,
// but can do no more than that.
if (is_string($structuredOutput)) {
$output->writeln($structuredOutput);
}
return $status;
}
/**
* If a status code was set, then return it; otherwise,
* presume success.
*/
protected function interpretStatusCode($status)
{
if (isset($status)) {
return $status;
}
return 0;
}
}

View File

@@ -1,59 +0,0 @@
<?php
namespace Consolidation\AnnotatedCommand;
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\CommandData;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Options\AlterOptionsCommandEvent;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use Consolidation\TestUtils\ExampleCommandInfoAlterer;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
use \Consolidation\AnnotatedCommand\Parser\Internal\FullyQualifiedClassCache;
class FullyQualifiedClassCacheTests extends \PHPUnit_Framework_TestCase
{
function testFqcn()
{
$reflectionMethod = new \ReflectionMethod('\Consolidation\TestUtils\alpha\AlphaCommandFile', 'exampleTableTwo');
$filename = $reflectionMethod->getFileName();
$fqcnCache = new FullyQualifiedClassCache();
$handle = fopen($filename, "r");
$this->assertTrue($handle !== false);
$namespaceName = $this->callProtected($fqcnCache, 'readNamespace', [$handle]);
$this->assertEquals('Consolidation\TestUtils\alpha', $namespaceName);
$usedClasses = $this->callProtected($fqcnCache, 'readUseStatements', [$handle]);
$this->assertTrue(isset($usedClasses['RowsOfFields']));
$this->assertEquals('Consolidation\OutputFormatters\StructuredData\RowsOfFields', $usedClasses['RowsOfFields']);
fclose($handle);
$fqcn = $fqcnCache->qualify($filename, 'RowsOfFields');
$this->assertEquals('Consolidation\OutputFormatters\StructuredData\RowsOfFields', $fqcn);
$fqcn = $fqcnCache->qualify($filename, 'ClassWithoutUse');
$this->assertEquals('Consolidation\TestUtils\alpha\ClassWithoutUse', $fqcn);
$fqcn = $fqcnCache->qualify($filename, 'ExampleAliasedClass');
$this->assertEquals('Consolidation\TestUtils\ExampleCommandFile', $fqcn);
}
function callProtected($object, $method, $args = [])
{
$r = new \ReflectionMethod($object, $method);
$r->setAccessible(true);
return $r->invokeArgs($object, $args);
}
}

View File

@@ -1,26 +0,0 @@
<?php
namespace Consolidation\TestUtils;
use Symfony\Component\Console\Application;
class ApplicationWithTerminalWidth extends Application
{
protected $width = 0;
protected $height = 0;
public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
{
parent::__construct($name, $version);
}
public function setWidthAndHeight($width, $height)
{
$this->width = $width;
$this->height = $height;
}
public function getTerminalDimensions()
{
return [ $this->width, $this->height ];
}
}

View File

@@ -1,63 +0,0 @@
<?php
namespace Consolidation\TestUtils;
use Consolidation\AnnotatedCommand\AnnotatedCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Test file used in the Annotation Factory tests. It is also
* discovered in the testCommandDiscovery() test.
*
* The testCommandDiscovery test search base is the 'src' directory;
* any command files located immediately inside the search base are
* eligible for discovery, and will be included in the search results.
*/
class ExampleAnnotatedCommand extends AnnotatedCommand
{
/**
* Do the main function of the my:cat command.
*/
public function myCat($one, $two = '', $multiple = [], $flip = false)
{
if ($flip) {
return "{$two}{$one}" . implode('', array_reverse($multiple));
}
return "{$one}{$two}" . implode('', $multiple);
}
/**
* This is the my:cat command implemented as an AnnotatedCommand subclass.
*
* This command will concatenate two parameters. If the --flip flag
* is provided, then the result is the concatenation of two and one.
*
* @command my:cat
* @arg string $one The first parameter.
* @arg string $two The other parameter.
* @default $two ''
* @option array $multiple An array of values
* @default $multiple []
* @option boolean $flip Whether or not the second parameter should come first in the result.
* @aliases c
* @usage bet alpha --flip
* Concatenate "alpha" and "bet".
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$one = $input->getArgument('one');
$two = $input->getArgument('two');
$multiple = $input->getOption('multiple');
$flip = $input->getOption('flip');
$result = $this->myCat($one, $two, $multiple, $flip);
// We could also just use $output->writeln($result) here,
// but calling processResults enables the use of output
// formatters. Note also that if you use processResults, you
// should correctly inject the command processor into your
// annotated command via AnnotatedCommand::setCommandProcessor().
return $this->processResults($input, $output, $result);
}
}

View File

@@ -1,521 +0,0 @@
<?php
namespace Consolidation\TestUtils;
use Consolidation\AnnotatedCommand\CommandData;
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\CommandError;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Test file used in the Annotation Factory tests. It is also
* discovered in the testCommandDiscovery() test.
*
* The testCommandDiscovery test search base is the 'src' directory;
* any command files located immediately inside the search base are
* eligible for discovery, and will be included in the search results.
*/
class ExampleCommandFile
{
protected $state;
protected $output;
public function __construct($state = '')
{
$this->state = $state;
}
public function setOutput($output)
{
$this->output = $output;
}
/**
* Import config from a config directory.
*
* @command config:import
* @param $label A config directory label (i.e. a key in \$config_directories array in settings.php).
* @interact-config-label
* @option preview Format for displaying proposed changes. Recognized values: list, diff.
* @option source An arbitrary directory that holds the configuration files. An alternative to label argument
* @option partial Allows for partial config imports from the source directory. Only updates and new configs will be processed with this flag (missing configs will not be deleted).
* @aliases cim,config-import
*/
public function import($label = null, $options = ['preview' => 'list', 'source' => InputOption::VALUE_REQUIRED, 'partial' => false])
{
}
/**
* Calculate the fibonacci sequence between two numbers.
*
* Graphic output will look like
* +----+---+-------------+
* | | | |
* | |-+-| |
* |----+-+-+ |
* | | |
* | | |
* | | |
* +--------+-------------+
*
* @param int $start Number to start from
* @param int $steps Number of steps to perform
* @param array $opts
* @option $graphic Display the sequence graphically using cube
* representation
*/
public function fibonacci($start, $steps, $opts = ['graphic' => false])
{
}
/**
* Code sniffer.
*
* Run the PHP Codesniffer on a file or directory.
*
* @param string $file
* A file or directory to analyze.
* @option $autofix Whether to run the automatic fixer or not.
* @option $strict Show warnings as well as errors.
* Default is to show only errors.
*/
public function sniff(
$file = 'src',
array $options = [
'autofix' => false,
'strict' => false,
]
) {
return var_export($options, true);
}
/**
* This is the my:cat command
*
* This command will concatenate two parameters. If the --flip flag
* is provided, then the result is the concatenation of two and one.
*
* @param string $one The first parameter.
* @param string $two The other parameter.
* @option boolean $flip Whether or not the second parameter should come first in the result.
* @aliases c
* @usage bet alpha --flip
* Concatenate "alpha" and "bet".
* @arbitrary This annotation is here merely as a marker used in testing.
*/
public function myCat($one, $two = '', array $options = ['flip' => false])
{
if ($options['flip']) {
return "{$two}{$one}";
}
return "{$one}{$two}";
}
/**
* @command my:repeat
*/
public function myRepeat($one, $two = '', array $options = ['repeat' => 1])
{
return str_repeat("{$one}{$two}", $options['repeat']);
}
/**
* This is the my:join command
*
* This command will join its parameters together. It can also reverse and repeat its arguments.
*
* @command my:join
* @usage a b
* Join a and b to produce "a,b"
* @usage
* Example with no parameters or options
*/
public function myJoin(array $args, array $options = ['flip' => false, 'repeat' => 1])
{
if ($options['flip']) {
$args = array_reverse($args);
}
$result = implode('', $args);
return str_repeat($result, $options['repeat']);
}
/**
* This is a command with no options
*
* This command will concatenate two parameters.
*
* @param $one The first parameter.
* @param $two The other parameter.
* @aliases nope
* @usage alpha bet
* Concatenate "alpha" and "bet".
*/
public function commandWithNoOptions($one, $two = 'default')
{
return "{$one}{$two}";
}
/**
* This command work with app's input and output
*
* @command command:with-io-parameters
*/
public function commandWithIOParameters(InputInterface $input, OutputInterface $output)
{
return $input->getFirstArgument();
}
/**
* This command has no arguments--only options
*
* Return a result only if not silent.
*
* @option silent Supress output.
*/
public function commandWithNoArguments(array $opts = ['silent|s' => false])
{
if (!$opts['silent']) {
return "Hello, world";
}
}
/**
* Shortcut on annotation
*
* This command defines the option shortcut on the annotation instead of in the options array.
*
* @param $opts The options
* @option silent|s Supress output.
*/
public function shortcutOnAnnotation(array $opts = ['silent' => false])
{
if (!$opts['silent']) {
return "Hello, world";
}
}
/**
* This is the test:arithmatic command
*
* This command will add one and two. If the --negate flag
* is provided, then the result is negated.
*
* @command test:arithmatic
* @param integer $one The first number to add.
* @param integer $two The other number to add.
* @option negate Whether or not the result should be negated.
* @aliases arithmatic
* @usage 2 2 --negate
* Add two plus two and then negate.
* @custom
* @dup one
* @dup two
*/
public function testArithmatic($one, $two = 2, array $options = ['negate' => false, 'unused' => 'bob'])
{
$result = $one + $two;
if ($options['negate']) {
$result = -$result;
}
// Integer return codes are exit codes (errors), so
// return a the result as a string so that it will be printed.
return "$result";
}
/**
* This is the test:state command
*
* This command tests to see if the state of the Commandfile instance
*/
public function testState()
{
return $this->state;
}
/**
* This is the test:passthrough command
*
* This command takes a variable number of parameters as
* an array and returns them as a csv.
*/
public function testPassthrough(array $params)
{
return implode(',', $params);
}
/**
* This command wraps its parameter in []; its alter hook
* then wraps the result in <>.
*/
public function testHook($parameter)
{
return "[$parameter]";
}
/**
* Wrap the results of test:hook in <>.
*
* @hook alter test:hook
*/
public function hookTestHook($result)
{
return "<$result>";
}
/**
* This test is very similar to the preceding test, except
* it uses an annotation hook instead of a named-function hook.
*
* @hookme
* @before >
* @after <
*/
public function testAnnotationHook($parameter)
{
return "($parameter)";
}
/**
* Wrap the results of test:hook in whatever the @before and @after
* annotations contain.
*
* @hook alter @hookme
*/
public function hookTestAnnotatedHook($result, CommandData $commandData)
{
$before = $commandData->annotationData()->get('before', '-');
$after = $commandData->annotationData()->get('after', '-');
return "$before$result$after";
}
/**
* Alter the results of the hook with its command name.
*
* @hook alter @addmycommandname
*/
public function hookAddCommandName($result, CommandData $commandData)
{
$annotationData = $commandData->annotationData();
return "$result from " . $annotationData['command'];
}
/**
* Here is a hook with an explicit command annotation that we will alter
* with the preceeding hook
*
* @command alter-me
* @addmycommandname
*/
public function alterMe()
{
return "splendiferous";
}
/**
* Here is another hook that has no command annotation that should be
* altered with the default value for the command name
*
* @addmycommandname
*/
public function alterMeToo()
{
return "fantabulous";
}
/**
* @command test:replace-command
*/
public function testReplaceCommand($value)
{
$this->output->writeln($value);
}
/**
* @hook replace-command test:replace-command
*/
public function hookTestReplaceCommandHook($value)
{
$this->output->writeln("bar");
}
/**
* @hook pre-command test:post-command
*/
public function hookTestPreCommandHook(CommandData $commandData)
{
// Use 'writeln' to detect order that hooks are called
$this->output->writeln("foo");
}
/**
* @command test:post-command
*/
public function testPostCommand($value)
{
$this->output->writeln($value);
}
/**
* @hook post-command test:post-command
*/
public function hookTestPostCommandHook($result, CommandData $commandData)
{
// Use 'writeln' to detect order that hooks are called
$this->output->writeln("baz");
}
public function testHello($who)
{
return "Hello, $who.";
}
public function testException($what)
{
throw new \Exception($what);
}
/**
* @hook init test:hello
*/
public function initializeTestHello($input, AnnotationData $annotationData)
{
$who = $input->getArgument('who');
if (!$who) {
$input->setArgument('who', 'Huey');
}
}
/**
* @hook command-event test:hello
*/
public function commandEventTestHello(ConsoleCommandEvent $event)
{
// Note that Symfony Console will not allow us to alter the
// input from this hook, so we'll just print something to
// show that this hook was executed.
$input = $event->getInput();
$who = $input->getArgument('who');
$this->output->writeln("Here comes $who!");
}
/**
* @hook interact test:hello
*/
public function interactTestHello($input, $output)
{
$who = $input->getArgument('who');
if (!$who) {
$input->setArgument('who', 'Goofey');
}
}
/**
* @hook validate test:hello
*/
public function validateTestHello($commandData)
{
$args = $commandData->arguments();
if ($args['who'] == 'Donald Duck') {
return new CommandError("I won't say hello to Donald Duck.");
}
if ($args['who'] == 'Drumph') {
throw new \Exception('Irrational value error.');
}
}
/**
* Test default values in arguments
*
* @param string|null $one
* @param string|null $two
* @return string
*/
public function defaults($one = null, $two = null)
{
if ($one && $two) {
return "$one and $two";
}
if ($one) {
return "only $one";
}
return "nothing provided";
}
/**
* @return string
*/
public function defaultOptionOne(array $options = ['foo' => '1'])
{
return "Foo is " . $options['foo'];
}
/**
* @return string
*/
public function defaultOptionTwo(array $options = ['foo' => '2'])
{
return "Foo is " . $options['foo'];
}
/**
* @return string
*/
public function defaultOptionNone(array $options = ['foo' => InputOption::VALUE_REQUIRED])
{
return "Foo is " . $options['foo'];
}
/**
* @return string
*/
public function defaultOptionalValue(array $options = ['foo' => InputOption::VALUE_OPTIONAL])
{
return "Foo is " . var_export($options['foo'], true);
}
/**
* @return string
*/
public function defaultOptionDefaultsToTrue(array $options = ['foo' => true])
{
return "Foo is " . var_export($options['foo'], true);
}
/**
* This is the test:required-array-option command
*
* This command will print all the valused of passed option
*
* @param array $opts
* @return string
*/
public function testRequiredArrayOption(array $opts = ['arr|a' => []])
{
return implode(' ', $opts['arr']);
}
/**
* This is the test:array-option command
*
* This command will print all the valused of passed option
*
* @param array $opts
* @return string
*/
public function testArrayOption(array $opts = ['arr|a' => ['1', '2', '3']])
{
return implode(' ', $opts['arr']);
}
/**
* @command global-options-only
*/
public function globalOptionsOnly($arg, array $options = [])
{
return "Arg is $arg, options[help] is " . var_export($options['help'], true) . "\n";
}
}

View File

@@ -1,15 +0,0 @@
<?php
namespace Consolidation\TestUtils;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use Consolidation\AnnotatedCommand\CommandInfoAltererInterface;
class ExampleCommandInfoAlterer implements CommandInfoAltererInterface
{
public function alterCommandInfo(CommandInfo $commandInfo, $commandFileInstance)
{
if ($commandInfo->hasAnnotation('arbitrary')) {
$commandInfo->addAnnotation('dynamic', "This annotation was dynamically added by ExampleCommandInfoAlterer");
}
}
}

View File

@@ -1,41 +0,0 @@
<?php
namespace Consolidation\TestUtils;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Consolidation\AnnotatedCommand\CommandError;
use Consolidation\AnnotatedCommand\AnnotationData;
/**
*
*/
class ExampleHookAllCommandFile
{
public function doCat($one, $two = '', $options = ['flip' => false])
{
if ($options['flip']) {
return "{$two}{$one}";
}
return "{$one}{$two}";
}
public function doRepeat($one, $two = '', $options = ['repeat' => 1])
{
return str_repeat("{$one}{$two}", $options['repeat']);
}
/**
* This hook function does not specify which command or annotation
* it is hooking; that makes it apply to every command in the same class.
*
* @hook alter
*/
public function alterAllCommands($result)
{
if (is_string($result)) {
$result = "*** $result ***";
}
return $result;
}
}

View File

@@ -1,50 +0,0 @@
<?php
namespace Consolidation\TestUtils;
use Consolidation\AnnotatedCommand\Cache\SimpleCacheInterface;
/**
* A simple in-memory cache for testing
*/
class InMemoryCacheStore implements SimpleCacheInterface
{
protected $cache;
public function __construct()
{
$this->cache = [];
}
/**
* Test for an entry from the cache
* @param string $key
* @return boolean
*/
public function has($key)
{
return array_key_exists($key, $this->cache);
}
/**
* Get an entry from the cache
* @param string $key
* @return array
*/
public function get($key)
{
if (!$this->has($key)) {
return [];
}
return $this->cache[$key];
}
/**
* Store an entry in the cache
* @param string $key
* @param array $data
*/
public function set($key, $data)
{
$this->cache[$key] = $data;
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace Consolidation\TestUtils;
class TestTerminal
{
protected $width = 0;
public function __construct($width)
{
$this->width = $width;
}
public function getWidth()
{
return $this->width;
}
public function setWidth($width)
{
$this->width = $width;
}
}

View File

@@ -1,325 +0,0 @@
<?php
namespace Consolidation\TestUtils\alpha;
use Consolidation\AnnotatedCommand\CommandError;
use Consolidation\OutputFormatters\StructuredData\RowsOfFields;
use Consolidation\OutputFormatters\StructuredData\AssociativeList;
use Consolidation\AnnotatedCommand\AnnotationData;
use Symfony\Component\Console\Input\InputOption;
use Consolidation\AnnotatedCommand\CommandData;
use Consolidation\AnnotatedCommand\Events\CustomEventAwareInterface;
use Consolidation\AnnotatedCommand\Events\CustomEventAwareTrait;
use Symfony\Component\Console\Command\Command;
use Consolidation\TestUtils\ExampleCommandFile as ExampleAliasedClass;
/**
* Test file used in the testCommandDiscovery() test.
*
* This commandfile is found by the test. The test search base is the
* 'src' directory, and 'alpha' is one of the search directories available
* for searching.
*/
class AlphaCommandFile implements CustomEventAwareInterface
{
use CustomEventAwareTrait;
/**
* @command always:fail
*/
public function alwaysFail()
{
return new CommandError('This command always fails.', 13);
}
public static function ignoredStaticMethod()
{
return 'This method is static; it should not generate a command.';
}
/**
* @command simulated:status
*/
public function simulatedStatus()
{
return ['status-code' => 42];
}
/**
* @command example:output
*/
public function exampleOutput()
{
return 'Hello, World.';
}
/**
* @command example:cat
*/
public function exampleCat($one, $two = '', $options = ['flip' => false])
{
if ($options['flip']) {
return "{$two}{$one}";
}
return "{$one}{$two}";
}
/**
* @command example:echo
*/
public function exampleEcho(array $args)
{
return ['item-list' => $args];
}
/**
* @command example:message
*/
public function exampleMessage()
{
return ['message' => 'Shipwrecked; send bananas.'];
}
/**
* Test command with formatters
*
* @command example:table
* @param $unused An unused argument
* @field-labels
* first: I
* second: II
* third: III
* @usage example:table --format=yml
* Show the example table in yml format.
* @usage example:table --fields=first,third
* Show only the first and third fields in the table.
* @usage example:table --fields=II,III
* Note that either the field ID or the visible field label may be used.
* @aliases extab
* @topics docs-tables
* @return \Consolidation\OutputFormatters\StructuredData\RowsOfFields Fully-qualified class name
*/
public function exampleTable($unused = '', $options = ['format' => 'table', 'fields' => ''])
{
$outputData = [
[ 'first' => 'One', 'second' => 'Two', 'third' => 'Three' ],
[ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei' ],
[ 'first' => 'Ichi', 'second' => 'Ni', 'third' => 'San' ],
[ 'first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres' ],
];
return new RowsOfFields($outputData);
}
/**
* Test command with formatters using a short classname in @return
*
* @command example:table2
* @param $unused An unused argument
* @field-labels
* first: I
* second: II
* third: III
* @usage example:table --format=yml
* Show the example table in yml format.
* @usage example:table --fields=first,third
* Show only the first and third fields in the table.
* @usage example:table --fields=II,III
* Note that either the field ID or the visible field label may be used.
* @aliases extab
* @topics docs-tables
* @return RowsOfFields Short class names are converted to fqcns
*/
public function exampleTableTwo($unused = '', $options = ['format' => 'table', 'fields' => ''])
{
$outputData = [
[ 'first' => 'One', 'second' => 'Two', 'third' => 'Three' ],
[ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei' ],
[ 'first' => 'Ichi', 'second' => 'Ni', 'third' => 'San' ],
[ 'first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres' ],
];
return new RowsOfFields($outputData);
}
/**
* Test word wrapping
*
* @command example:wrap
* @field-labels
* first: First
* second: Second
*
* @return \Consolidation\OutputFormatters\StructuredData\RowsOfFields
*/
public function exampleWrap()
{
$data = [
[
'first' => 'This is a really long cell that contains a lot of data. When it is rendered, it should be wrapped across multiple lines.',
'second' => 'This is the second column of the same table. It is also very long, and should be wrapped across multiple lines, just like the first column.',
]
];
return new RowsOfFields($data);
}
/**
* @hook option example:table
*/
public function additionalOptionForExampleTable(Command $command, AnnotationData $annotationData)
{
$command->addOption(
'dynamic',
'',
InputOption::VALUE_NONE,
'Option added by @hook option example:table'
);
}
/**
* Demonstrate an alter hook with an option
*
* @hook alter example:table
* @option french Add a row with French numbers.
* @usage example:table --french
*/
public function alterFormatters($result, CommandData $commandData)
{
if ($commandData->input()->getOption('french')) {
$result[] = [ 'first' => 'Un', 'second' => 'Deux', 'third' => 'Trois' ];
}
return $result;
}
/**
* Test command with formatters using an associative list
*
* @command example:list
* @field-labels
* sftp_command: SFTP Command
* sftp_username: SFTP Username
* sftp_host: SFTP Host
* sftp_password: SFTP Password
* sftp_url: SFTP URL
* git_command: Git Command
* git_username: Git Username
* git_host: Git Host
* git_port: Git Port
* git_url: Git URL
* mysql_command: MySQL Command
* mysql_username: MySQL Username
* mysql_host: MySQL Host
* mysql_password: MySQL Password
* mysql_url: MySQL URL
* mysql_port: MySQL Port
* mysql_database: MySQL Database
* redis_command: Redis Command
* redis_port: Redis Port
* redis_url: Redis URL
* redis_password: Redis Password
* @default-fields *_command
* @return \Consolidation\OutputFormatters\StructuredData\AssociativeList
*/
public function exampleAssociativeList()
{
$outputData = [
'sftp_command' => 'sftp -o Port=2222 dev@appserver.dev.drush.in',
'sftp_username' => 'dev',
'sftp_host' => 'appserver.dev.drush.in',
'sftp_password' => 'Use your account password',
'sftp_url' => 'sftp://dev@appserver.dev.drush.in:2222',
'git_command' => 'git clone ssh://codeserver.dev@codeserver.dev.drush.in:2222/~/repository.git wp-update',
'git_username' => 'codeserver.dev',
'git_host' => 'codeserver.dev.drush.in',
'git_port' => 2222,
'git_url' => 'ssh://codeserver.dev@codeserver.dev.drush.in:2222/~/repository.git',
'mysql_command' => 'mysql -u pantheon -p4b33cb -h dbserver.dev.drush.in -P 16191 pantheon',
'mysql_username' => 'pantheon',
'mysql_host' => 'dbserver.dev.drush.in',
'mysql_password' => '4b33cb',
'mysql_url' => 'mysql://pantheon:4b33cb@dbserver.dev.drush.in:16191/pantheon',
'mysql_port' => 16191,
'mysql_database' => 'pantheon',
];
return new AssociativeList($outputData);
}
/**
* This command has no annotations; this means that it will not be
* found when createCommandsFromClass() is called with
* '$includeAllPublicMethods' set to false.
*/
public function withoutAnnotations()
{
return 'ok';
}
/**
* @command command:with-one-optional-argument
*
* This command has just one optional argument.
*
* Return a result only if not silent.
*
* @option silent Supress output.
*/
public function commandWithOneOptionalArgument($who = 'world', $opts = ['silent|s' => false])
{
if (!$opts['silent']) {
return "Hello, $who";
}
}
/**
* This should be a command, because it is annotated like one.
*
* @command get:serious
*/
public function getSerious()
{
return 'very serious';
}
/**
* This should not be a command, because it looks like an accessor and
* has no @command annotation.
*/
public function getLost()
{
return 'very lost';
}
/**
* This command uses a custom event 'my-event' to collect data. Note that
* the event handlers will not be found unless the hook manager is
* injected into this command handler object via `setHookManager()`
* (defined in CustomEventAwareTrait).
*
* @command use:event
*/
public function useEvent()
{
$myEventHandlers = $this->getCustomEventHandlers('my-event');
$result = [];
foreach ($myEventHandlers as $handler) {
$result[] = $handler();
}
sort($result);
return implode(',', $result);
}
/**
* @hook on-event my-event
*/
public function hookOne()
{
return 'one';
}
/**
* @hook on-event my-event
*/
public function hookTwo()
{
return 'two';
}
}

View File

@@ -1,14 +0,0 @@
<?php
namespace Consolidation\TestUtils\alpha\Exclude;
/**
* Test file used in the testCommandDiscovery() test.
*
* This commandfile is NOT found by the test. It is in a searched
* location (@see Consolidation\TestUtils\alpha\Exclude\IncludedCommandFile),
* but it is in a folder named 'Exclude', which is excluded form search.
*/
class ExcludedCommandFile
{
}

View File

@@ -1,16 +0,0 @@
<?php
namespace Consolidation\TestUtils\alpha\Inclusive;
/**
* Test file used in the testCommandDiscovery() test.
*
* This commandfile is found by the test. The test search base is the
* 'src' directory, and 'alpha' is one of the search directories available
* for searching. Directories such as this in the search locations list
* are searched deeply (to a depth of two), so command files may be
* organized into sub-namespaces, if desired.
*/
class IncludedCommandFile
{
}

View File

@@ -1,52 +0,0 @@
<?php
namespace Consolidation\TestUtils\beta;
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\CommandData;
/**
* Test file used in the testCommandDiscovery() test.
*
* This commandfile is not found by the test. The test search base is the
* 'src' directory, but 'beta' is NOT one of the search directories available
* for searching, so nothing in this folder will be examined.
*/
class BetaCommandFile
{
public function unavailableCommand()
{
return 'This command is not available, because this commandfile is not in a location that is searched by the tests.';
}
/**
* Demonstrate an alter hook with an option
*
* @hook alter example:table
* @option chinese Add a row with Chinese numbers.
* @usage example:table --chinese
*/
public function alterFormattersChinese($result, CommandData $commandData)
{
if ($commandData->input()->getOption('chinese')) {
$result[] = [ 'first' => '壹', 'second' => '貳', 'third' => '叁' ];
}
return $result;
}
/**
* Demonstrate an alter hook with an option
*
* @hook alter *
* @option kanji Add a row with Kanji numbers.
* @usage example:table --kanji
*/
public function alterFormattersKanji($result, CommandData $commandData)
{
if ($commandData->input()->getOption('kanji')) {
$result[] = [ 'first' => '一', 'second' => '二', 'third' => '三' ];
}
return $result;
}
}

View File

@@ -1,45 +0,0 @@
<?php
namespace Consolidation\AnnotatedCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Application;
class AnnotatedCommandTests extends \PHPUnit_Framework_TestCase
{
function testMyCatCommand()
{
$command = new \Consolidation\TestUtils\ExampleAnnotatedCommand();
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('my:cat', $command->getName());
$this->assertEquals('This is the my:cat command implemented as an AnnotatedCommand subclass.', $command->getDescription());
$this->assertEquals("This command will concatenate two parameters. If the --flip flag\nis provided, then the result is the concatenation of two and one.", $command->getHelp());
$this->assertEquals('c', implode(',', $command->getAliases()));
// Symfony Console composes the synopsis; perhaps we should not test it. Remove if this gives false failures.
$this->assertEquals('my:cat [--multiple MULTIPLE] [--flip] [--] <one> [<two>]', $command->getSynopsis());
$this->assertEquals('my:cat bet alpha --flip', implode(',', $command->getUsages()));
$input = new StringInput('my:cat b alpha --multiple=t --multiple=e --flip');
$this->assertRunCommandViaApplicationEquals($command, $input, 'alphabet');
}
// TODO: Make a base test class to hold this.
function assertRunCommandViaApplicationEquals($command, $input, $expectedOutput, $expectedStatusCode = 0)
{
$output = new BufferedOutput();
$application = new Application('TestApplication', '0.0.0');
$application->setAutoExit(false);
$application->add($command);
$statusCode = $application->run($input, $output);
$commandOutput = trim($output->fetch());
$this->assertEquals($expectedOutput, $commandOutput);
$this->assertEquals($expectedStatusCode, $statusCode);
}
}

View File

@@ -1,986 +0,0 @@
<?php
namespace Consolidation\AnnotatedCommand;
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\CommandData;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Options\AlterOptionsCommandEvent;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use Consolidation\TestUtils\ExampleCommandInfoAlterer;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
class AnnotatedCommandFactoryTests extends \PHPUnit_Framework_TestCase
{
protected $commandFileInstance;
protected $commandFactory;
function testFibonacci()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'fibonacci');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertEquals('fibonacci', $command->getName());
$this->assertEquals('fibonacci [--graphic] [--] <start> <steps>', $command->getSynopsis());
$this->assertEquals('Calculate the fibonacci sequence between two numbers.', $command->getDescription());
$this->assertEquals("Graphic output will look like
+----+---+-------------+
| | | |
| |-+-| |
|----+-+-+ |
| | |
| | |
| | |
+--------+-------------+", $command->getHelp());
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$input = new StringInput('help fibonacci');
$this->assertRunCommandViaApplicationContains($command, $input, ['Display the sequence graphically using cube representation']);
}
function testSniff()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'sniff');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertEquals('sniff', $command->getName());
$this->assertEquals('sniff [--autofix] [--strict] [--] [<file>]', $command->getSynopsis());
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$input = new StringInput('help sniff');
$this->assertRunCommandViaApplicationContains($command, $input, ['A file or directory to analyze.']);
$input = new StringInput('sniff --autofix --strict -- foo');
$this->assertRunCommandViaApplicationContains($command, $input, ["'autofix' => true",
"'strict' => true"]);
}
function testOptionDefaultValue()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'defaultOptionOne');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertEquals('default:option-one', $command->getName());
$this->assertEquals('default:option-one [--foo [FOO]]', $command->getSynopsis());
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$input = new StringInput('default:option-one');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Foo is 1');
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'defaultOptionTwo');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertEquals('default:option-two', $command->getName());
$this->assertEquals('default:option-two [--foo [FOO]]', $command->getSynopsis());
$input = new StringInput('default:option-two');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Foo is 2');
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'defaultOptionNone');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertEquals('default:option-none', $command->getName());
$this->assertEquals('default:option-none [--foo FOO]', $command->getSynopsis());
// Skip failing test until Symfony is fixed.
$this->markTestSkipped('Symfony Console 3.2.5 and 3.2.6 do not handle default options with required values correctly.');
$input = new StringInput('default:option-none --foo');
$this->assertRunCommandViaApplicationContains($command, $input, ['The "--foo" option requires a value.'], 1);
}
function testGlobalOptionsOnly()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'globalOptionsOnly');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$input = new StringInput('global-options-only test');
$this->assertRunCommandViaApplicationEquals($command, $input, "Arg is test, options[help] is false");
}
function testOptionWithOptionalValue()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'defaultOptionalValue');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
// Test to see if we can differentiate between a missing option, and
// an option that has no value at all.
$input = new StringInput('default:optional-value --foo=bar');
$this->assertRunCommandViaApplicationEquals($command, $input, "Foo is 'bar'");
$input = new StringInput('default:optional-value --foo');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Foo is true');
$input = new StringInput('default:optional-value');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Foo is NULL');
}
function testOptionThatDefaultsToTrue()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'defaultOptionDefaultsToTrue');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
// Test to see if we can differentiate between a missing option, and
// an option that has no value at all.
$input = new StringInput('default:option-defaults-to-true --foo=bar');
$this->assertRunCommandViaApplicationEquals($command, $input, "Foo is 'bar'");
$input = new StringInput('default:option-defaults-to-true --foo');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Foo is true');
$input = new StringInput('default:option-defaults-to-true');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Foo is true');
$input = new StringInput('help default:option-defaults-to-true');
$this->assertRunCommandViaApplicationContains(
$command,
$input,
[
'--no-foo',
'Negate --foo option',
]
);
$input = new StringInput('default:option-defaults-to-true --no-foo');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Foo is false');
}
/**
* Test CommandInfo command caching.
*
* Sequence:
* - Create all of the command info objects from one class, caching them.
* - Change the method name of one of the items in the cache to a non-existent method
* - Restore all of the cached commandinfo objects
* - Ensure that the non-existent method cached commandinfo was not created
* - Ensure that the now-missing cached commandinfo was still created
*
* This tests both save/restore, plus adding a new command method to
* a class, and removing a command method from a class.
*/
function testAnnotatedCommandCache()
{
$testCacheStore = new \Consolidation\TestUtils\InMemoryCacheStore();
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$this->commandFactory->setDataStore($testCacheStore);
// Make commandInfo objects for every command in the test commandfile.
// These will also be stored in our cache.
$commandInfoList = $this->commandFactory->getCommandInfoListFromClass($this->commandFileInstance);
$cachedClassName = get_class($this->commandFileInstance);
$this->assertTrue($testCacheStore->has($cachedClassName));
$cachedData = $testCacheStore->get($cachedClassName);
$this->assertFalse(empty($cachedData));
$this->assertTrue(array_key_exists('testArithmatic', $cachedData));
$alterCommandInfoCache = $cachedData['testArithmatic'];
unset($cachedData['testArithmatic']);
$alterCommandInfoCache['method_name'] = 'nonExistentMethod';
$cachedData[$alterCommandInfoCache['method_name']] = $alterCommandInfoCache;
$testCacheStore->set($cachedClassName, $cachedData);
$restoredCommandInfoList = $this->commandFactory->getCommandInfoListFromClass($this->commandFileInstance);
$rebuiltCachedData = $testCacheStore->get($cachedClassName);
$this->assertFalse(empty($rebuiltCachedData));
$this->assertTrue(array_key_exists('testArithmatic', $rebuiltCachedData));
$this->assertFalse(array_key_exists('nonExistentMethod', $rebuiltCachedData));
}
/**
* Test CommandInfo command annotation parsing.
*/
function testAnnotatedCommandCreation()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testArithmatic');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:arithmatic', $command->getName());
$this->assertEquals('This is the test:arithmatic command', $command->getDescription());
$this->assertEquals("This command will add one and two. If the --negate flag\nis provided, then the result is negated.", $command->getHelp());
$this->assertEquals('arithmatic', implode(',', $command->getAliases()));
$this->assertEquals('test:arithmatic [--negate] [--unused [UNUSED]] [--] <one> [<two>]', $command->getSynopsis());
$this->assertEquals('test:arithmatic 2 2 --negate', implode(',', $command->getUsages()));
$input = new StringInput('arithmatic 2 3 --negate');
$this->assertRunCommandViaApplicationEquals($command, $input, '-5');
}
/**
* Test CommandInfo command annotation altering.
*/
function testAnnotatedCommandInfoAlteration()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'myCat');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$annotationData = $command->getAnnotationData();
$this->assertTrue($annotationData->has('arbitrary'));
$this->assertFalse($annotationData->has('dynamic'));
$this->commandFactory->addCommandInfoAlterer(new ExampleCommandInfoAlterer());
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$annotationData = $command->getAnnotationData();
$this->assertTrue($annotationData->has('arbitrary'));
$this->assertTrue($annotationData->has('dynamic'));
}
function testMyCatCommand()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'myCat');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('my:cat', $command->getName());
$this->assertEquals('This is the my:cat command', $command->getDescription());
$this->assertEquals("This command will concatenate two parameters. If the --flip flag\nis provided, then the result is the concatenation of two and one.", $command->getHelp());
$this->assertEquals('c', implode(',', $command->getAliases()));
$this->assertEquals('my:cat [--flip] [--] <one> [<two>]', $command->getSynopsis());
$this->assertEquals('my:cat bet alpha --flip', implode(',', $command->getUsages()));
$input = new StringInput('my:cat bet alpha --flip');
$this->assertRunCommandViaApplicationEquals($command, $input, 'alphabet');
}
function testJoinCommandHelp()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'myJoin');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('my:join', $command->getName());
$this->assertEquals('This is the my:join command', $command->getDescription());
$this->assertEquals("This command will join its parameters together. It can also reverse and repeat its arguments.", $command->getHelp());
$this->assertEquals('my:join [--flip] [--repeat [REPEAT]] [--] [<args>]...', $command->getSynopsis());
// TODO: Extra whitespace character if there are no options et. al. in the
// usage. This is uncommon, and the defect is invisible. Maybe find it someday.
$actualUsages = implode(',', $command->getUsages());
$this->assertEquals('my:join a b,my:join ', $actualUsages);
$input = new StringInput('my:join bet alpha --flip --repeat=2');
$this->assertRunCommandViaApplicationEquals($command, $input, 'alphabetalphabet');
}
function testDefaultsCommand()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'defaults');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('defaults', $command->getName());
$this->assertEquals('Test default values in arguments', $command->getDescription());
$input = new StringInput('defaults');
$this->assertRunCommandViaApplicationEquals($command, $input, 'nothing provided');
$input = new StringInput('defaults ichi');
$this->assertRunCommandViaApplicationEquals($command, $input, 'only ichi');
$input = new StringInput('defaults I II');
$this->assertRunCommandViaApplicationEquals($command, $input, 'I and II');
}
function testCommandWithNoOptions()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'commandWithNoOptions');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('command:with-no-options', $command->getName());
$this->assertEquals('This is a command with no options', $command->getDescription());
$this->assertEquals("This command will concatenate two parameters.", $command->getHelp());
$this->assertEquals('nope', implode(',', $command->getAliases()));
$this->assertEquals('command:with-no-options <one> [<two>]', $command->getSynopsis());
$this->assertEquals('command:with-no-options alpha bet', implode(',', $command->getUsages()));
$input = new StringInput('command:with-no-options something');
$this->assertRunCommandViaApplicationEquals($command, $input, 'somethingdefault');
$input = new StringInput('help command:with-no-options something');
$this->assertRunCommandViaApplicationContains(
$command,
$input,
[
'The first parameter.',
'The other parameter.',
]
);
}
function testCommandWithIOParameters()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'commandWithIOParameters');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('command:with-io-parameters', $command->getName());
$this->assertEquals("This command work with app's input and output", $command->getDescription());
$this->assertEquals('', $command->getHelp());
$this->assertEquals('command:with-io-parameters', $command->getSynopsis());
$input = new StringInput('command:with-io-parameters');
$this->assertRunCommandViaApplicationEquals($command, $input, 'command:with-io-parameters');
}
function testCommandWithNoArguments()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'commandWithNoArguments');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('command:with-no-arguments', $command->getName());
$this->assertEquals('This command has no arguments--only options', $command->getDescription());
$this->assertEquals("Return a result only if not silent.", $command->getHelp());
$this->assertEquals('command:with-no-arguments [-s|--silent]', $command->getSynopsis());
$input = new StringInput('command:with-no-arguments');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Hello, world');
$input = new StringInput('command:with-no-arguments -s');
$this->assertRunCommandViaApplicationEquals($command, $input, '');
$input = new StringInput('command:with-no-arguments --silent');
$this->assertRunCommandViaApplicationEquals($command, $input, '');
}
function testCommandWithShortcutOnAnnotation()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'shortcutOnAnnotation');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('shortcut:on-annotation', $command->getName());
$this->assertEquals('Shortcut on annotation', $command->getDescription());
$this->assertEquals("This command defines the option shortcut on the annotation instead of in the options array.", $command->getHelp());
$this->assertEquals('shortcut:on-annotation [-s|--silent]', $command->getSynopsis());
$input = new StringInput('shortcut:on-annotation');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Hello, world');
$input = new StringInput('shortcut:on-annotation -s');
$this->assertRunCommandViaApplicationEquals($command, $input, '');
$input = new StringInput('shortcut:on-annotation --silent');
$this->assertRunCommandViaApplicationEquals($command, $input, '');
}
function testState()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile('secret secret');
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testState');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:state', $command->getName());
$input = new StringInput('test:state');
$this->assertRunCommandViaApplicationEquals($command, $input, 'secret secret');
}
function testPassthroughArray()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testPassthrough');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:passthrough', $command->getName());
$input = new StringInput('test:passthrough a b c -- x y z');
$this->assertRunCommandViaApplicationEquals($command, $input, 'a,b,c,x,y,z');
}
function testPassThroughNonArray()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'myJoin');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$input = new StringInput('my:join bet --flip -- x y z');
$this->assertRunCommandViaApplicationEquals($command, $input, 'zyxbet');
// Can't look at 'hasOption' until after the command initializes the
// option, because Symfony.
$this->assertTrue($input->hasOption('flip'));
}
function testPassThroughWithInputManipulation()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'myJoin');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$input = new StringInput('my:join bet --repeat=2 -- x y z');
$this->assertRunCommandViaApplicationEquals($command, $input, 'betxyzbetxyz');
// Symfony does not allow us to manipulate the options via setOption until
// the definition from the command object has been set up.
$input->setOption('repeat', 3);
$this->assertEquals(3, $input->getOption('repeat'));
$input->setArgument(0, 'q');
// Manipulating $input does not work -- the changes are not effective.
// The end result here should be 'qx y yqx y yqx y y'
$this->assertRunCommandViaApplicationEquals($command, $input, 'betxyzbetxyz');
}
function testRequiredArrayOption()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testRequiredArrayOption');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertEquals('test:required-array-option [-a|--arr ARR]', $command->getSynopsis());
$input = new StringInput('test:required-array-option --arr=1 --arr=2 --arr=3');
$this->assertRunCommandViaApplicationEquals($command, $input, '1 2 3');
$input = new StringInput('test:required-array-option -a 1 -a 2 -a 3');
$this->assertRunCommandViaApplicationEquals($command, $input, '1 2 3');
}
function testArrayOption()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile;
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testArrayOption');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertEquals('test:array-option [-a|--arr [ARR]]', $command->getSynopsis());
$input = new StringInput('test:array-option');
$this->assertRunCommandViaApplicationEquals($command, $input, '1 2 3');
$input = new StringInput('test:array-option --arr=a --arr=b --arr=c');
$this->assertRunCommandViaApplicationEquals($command, $input, 'a b c');
$input = new StringInput('test:array-option -a a');
$this->assertRunCommandViaApplicationEquals($command, $input, 'a');
}
function testHookedCommand()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'hookTestHook');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals('alter test:hook', $hookInfo->getAnnotation('hook'));
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('test:hook', [HookManager::ALTER_RESULT]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('hookTestHook', $hookCallback[0][1]);
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testHook');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:hook', $command->getName());
$input = new StringInput('test:hook bar');
$this->assertRunCommandViaApplicationEquals($command, $input, '<[bar]>');
$input = new StringInput('list --raw');
$this->assertRunCommandViaApplicationContains($command, $input, ['This command wraps its parameter in []; its alter hook then wraps the result in .']);
}
function testReplaceCommandHook(){
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'hookTestReplaceCommandHook');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals('replace-command test:replace-command', $hookInfo->getAnnotation('hook'));
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('test:replace-command', [HookManager::REPLACE_COMMAND_HOOK]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('hookTestReplaceCommandHook', $hookCallback[0][1]);
$input = new StringInput('test:replace-command foo');
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testReplaceCommand');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertRunCommandViaApplicationEquals($command, $input, "bar", 0);
}
function testPostCommandCalledAfterCommand()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'hookTestPostCommandHook');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals('post-command test:post-command', $hookInfo->getAnnotation('hook'));
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('test:post-command', [HookManager::POST_COMMAND_HOOK]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('hookTestPostCommandHook', $hookCallback[0][1]);
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'hookTestPreCommandHook');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals('pre-command test:post-command', $hookInfo->getAnnotation('hook'));
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('test:post-command', [HookManager::PRE_COMMAND_HOOK]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('hookTestPreCommandHook', $hookCallback[0][1]);
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testPostCommand');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:post-command', $command->getName());
$input = new StringInput('test:post-command bar');
$this->assertRunCommandViaApplicationEquals($command, $input, "foo\nbar\nbaz", 0, $this->commandFileInstance);
}
function testHookAllCommands()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleHookAllCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'alterAllCommands');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals('alter', $hookInfo->getAnnotation('hook'));
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('Consolidation\TestUtils\ExampleHookAllCommandFile', [HookManager::ALTER_RESULT]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('alterAllCommands', $hookCallback[0][1]);
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'doCat');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('do:cat', $command->getName());
$input = new StringInput('do:cat bar');
$this->assertRunCommandViaApplicationEquals($command, $input, '*** bar ***');
}
function testDoubleDashWithVersion()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleHookAllCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'doCat');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$input = new ArgvInput(['placeholder', 'do:cat', 'one', '--', '--version']);
list($statusCode, $commandOutput) = $this->runCommandViaApplication($command, $input);
if ($commandOutput == 'TestApplication version 0.0.0') {
$this->markTestSkipped('Symfony/Console 2.x does not respect -- with --version');
}
$this->assertEquals('one--version', $commandOutput);
}
function testAnnotatedHookedCommand()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'hookTestAnnotatedHook');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals('alter @hookme', $hookInfo->getAnnotation('hook'));
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('@hookme', [HookManager::ALTER_RESULT]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('hookTestAnnotatedHook', $hookCallback[0][1]);
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testAnnotationHook');
$annotationData = $commandInfo->getRawAnnotations();
$this->assertEquals('hookme,before,after', implode(',', $annotationData->keys()));
$this->assertEquals('@hookme,@before,@after', implode(',', array_map(function ($item) { return "@$item"; }, $annotationData->keys())));
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:annotation-hook', $command->getName());
$input = new StringInput('test:annotation-hook baz');
$this->assertRunCommandViaApplicationEquals($command, $input, '>(baz)<');
}
function testHookHasCommandAnnotation()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'hookAddCommandName');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals('alter @addmycommandname', $hookInfo->getAnnotation('hook'));
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('@addmycommandname', [HookManager::ALTER_RESULT]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('hookAddCommandName', $hookCallback[0][1]);
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'alterMe');
$annotationData = $commandInfo->getRawAnnotations();
$this->assertEquals('command,addmycommandname', implode(',', $annotationData->keys()));
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('alter-me', $command->getName());
$input = new StringInput('alter-me');
$this->assertRunCommandViaApplicationEquals($command, $input, 'splendiferous from alter-me');
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'alterMeToo');
$annotationData = $commandInfo->getRawAnnotations();
$this->assertEquals('addmycommandname', implode(',', $annotationData->keys()));
$annotationData = $commandInfo->getAnnotations();
$this->assertEquals('addmycommandname,command,_path,_classname', implode(',', $annotationData->keys()));
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('alter:me-too', $command->getName());
$input = new StringInput('alter:me-too');
$this->assertRunCommandViaApplicationEquals($command, $input, 'fantabulous from alter:me-too');
}
function testHookedCommandWithHookAddedLater()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testHook');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:hook', $command->getName());
// Run the command once without the hook
$input = new StringInput('test:hook foo');
$this->assertRunCommandViaApplicationEquals($command, $input, '[foo]');
// Register the hook and run the command again
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'hookTestHook');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals('alter test:hook', $hookInfo->getAnnotation('hook'));
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('test:hook', [HookManager::ALTER_RESULT]);;
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('hookTestHook', $hookCallback[0][1]);
$input = new StringInput('test:hook bar');
$this->assertRunCommandViaApplicationEquals($command, $input, '<[bar]>');
}
function testInitializeHook()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'initializeTestHello');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals($hookInfo->getAnnotation('hook'), 'init test:hello');
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('test:hello', [HookManager::INITIALIZE]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('initializeTestHello', $hookCallback[0][1]);
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testHello');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:hello', $command->getName());
$commandGetNames = $this->callProtected($command, 'getNames');
$this->assertEquals('test:hello,Consolidation\TestUtils\ExampleCommandFile', implode(',', $commandGetNames));
$hookCallback = $command->commandProcessor()->hookManager()->get('test:hello', 'init');
$this->assertTrue($hookCallback != null);
$this->assertEquals('initializeTestHello', $hookCallback[0][1]);
$input = new StringInput('test:hello');
$this->assertRunCommandViaApplicationEquals($command, $input, "Hello, Huey.");
}
function testCommandEventHook()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'commandEventTestHello');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals($hookInfo->getAnnotation('hook'), 'command-event test:hello');
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('test:hello', [HookManager::COMMAND_EVENT]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('commandEventTestHello', $hookCallback[0][1]);
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testHello');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:hello', $command->getName());
$commandGetNames = $this->callProtected($command, 'getNames');
$this->assertEquals('test:hello,Consolidation\TestUtils\ExampleCommandFile', implode(',', $commandGetNames));
$hookCallback = $command->commandProcessor()->hookManager()->get('test:hello', 'command-event');
$this->assertTrue($hookCallback != null);
$this->assertEquals('commandEventTestHello', $hookCallback[0][1]);
$input = new StringInput('test:hello Pluto');
$this->assertRunCommandViaApplicationEquals($command, $input, "Here comes Pluto!\nHello, Pluto.");
}
function testInteractAndValidate()
{
$this->commandFileInstance = new \Consolidation\TestUtils\ExampleCommandFile();
$this->commandFactory = new AnnotatedCommandFactory();
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'interactTestHello');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals($hookInfo->getAnnotation('hook'), 'interact test:hello');
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'validateTestHello');
$this->assertTrue($hookInfo->hasAnnotation('hook'));
$this->assertEquals($hookInfo->getAnnotation('hook'), 'validate test:hello');
$this->commandFactory->registerCommandHook($hookInfo, $this->commandFileInstance);
$hookCallback = $this->commandFactory->hookManager()->get('test:hello', [HookManager::ARGUMENT_VALIDATOR]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('validateTestHello', $hookCallback[0][1]);
$hookCallback = $this->commandFactory->hookManager()->get('test:hello', [HookManager::INTERACT]);
$this->assertTrue($hookCallback != null);
$this->assertEquals(1, count($hookCallback));
$this->assertEquals(2, count($hookCallback[0]));
$this->assertTrue(is_callable($hookCallback[0]));
$this->assertEquals('interactTestHello', $hookCallback[0][1]);
$commandInfo = $this->commandFactory->createCommandInfo($this->commandFileInstance, 'testHello');
$command = $this->commandFactory->createCommand($commandInfo, $this->commandFileInstance);
$this->assertInstanceOf('\Symfony\Component\Console\Command\Command', $command);
$this->assertEquals('test:hello', $command->getName());
$commandGetNames = $this->callProtected($command, 'getNames');
$this->assertEquals('test:hello,Consolidation\TestUtils\ExampleCommandFile', implode(',', $commandGetNames));
$testInteractInput = new StringInput('test:hello');
$definition = new \Symfony\Component\Console\Input\InputDefinition(
[
new \Symfony\Component\Console\Input\InputArgument('application', \Symfony\Component\Console\Input\InputArgument::REQUIRED),
new \Symfony\Component\Console\Input\InputArgument('who', \Symfony\Component\Console\Input\InputArgument::REQUIRED),
]
);
$testInteractInput->bind($definition);
$testInteractOutput = new BufferedOutput();
$command->commandProcessor()->interact(
$testInteractInput,
$testInteractOutput,
$commandGetNames,
$command->getAnnotationData()
);
$this->assertEquals('Goofey', $testInteractInput->getArgument('who'));
$hookCallback = $command->commandProcessor()->hookManager()->get('test:hello', 'interact');
$this->assertTrue($hookCallback != null);
$this->assertEquals('interactTestHello', $hookCallback[0][1]);
$input = new StringInput('test:hello "Mickey Mouse"');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Hello, Mickey Mouse.');
$input = new StringInput('test:hello');
$this->assertRunCommandViaApplicationEquals($command, $input, 'Hello, Goofey.');
$input = new StringInput('test:hello "Donald Duck"');
$this->assertRunCommandViaApplicationEquals($command, $input, "I won't say hello to Donald Duck.", 1);
$input = new StringInput('test:hello "Drumph"');
$this->assertRunCommandViaApplicationEquals($command, $input, "Irrational value error.", 1);
// Try the last test again with a display error function installed.
$this->commandFactory->commandProcessor()->setDisplayErrorFunction(
function ($output, $message) {
$output->writeln("*** $message ****");
}
);
$input = new StringInput('test:hello "Drumph"');
$this->assertRunCommandViaApplicationEquals($command, $input, "*** Irrational value error. ****", 1);
}
function callProtected($object, $method, $args = [])
{
$r = new \ReflectionMethod($object, $method);
$r->setAccessible(true);
return $r->invokeArgs($object, $args);
}
function assertRunCommandViaApplicationContains($command, $input, $containsList, $expectedStatusCode = 0)
{
list($statusCode, $commandOutput) = $this->runCommandViaApplication($command, $input);
foreach ($containsList as $contains) {
$this->assertContains($contains, $commandOutput);
}
$this->assertEquals($expectedStatusCode, $statusCode);
}
function assertRunCommandViaApplicationEquals($command, $input, $expectedOutput, $expectedStatusCode = 0)
{
list($statusCode, $commandOutput) = $this->runCommandViaApplication($command, $input);
$this->assertEquals($expectedOutput, $commandOutput);
$this->assertEquals($expectedStatusCode, $statusCode);
}
function runCommandViaApplication($command, $input)
{
$output = new BufferedOutput();
if ($this->commandFileInstance && method_exists($this->commandFileInstance, 'setOutput')) {
$this->commandFileInstance->setOutput($output);
}
$application = new Application('TestApplication', '0.0.0');
$alterOptionsEventManager = new AlterOptionsCommandEvent($application);
$eventDispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
$eventDispatcher->addSubscriber($this->commandFactory->commandProcessor()->hookManager());
$this->commandFactory->commandProcessor()->hookManager()->addCommandEvent($alterOptionsEventManager);
$application->setDispatcher($eventDispatcher);
$application->setAutoExit(false);
$application->add($command);
$statusCode = $application->run($input, $output);
$commandOutput = trim(str_replace("\r", '', $output->fetch()));
return [$statusCode, $commandOutput];
}
}

View File

@@ -1,82 +0,0 @@
<?php
namespace Consolidation\AnnotatedCommand;
class CommandFileDiscoveryTests extends \PHPUnit_Framework_TestCase
{
function testCommandDiscovery()
{
$discovery = new CommandFileDiscovery();
$discovery
->setSearchPattern('*CommandFile.php')
->setSearchLocations(['alpha']);
chdir(__DIR__);
$commandFiles = $discovery->discover('.', '\Consolidation\TestUtils');
$commandFilePaths = array_keys($commandFiles);
$commandFileNamespaces = array_values($commandFiles);
// Ensure that the command files that we expected to
// find were all found. We don't find anything in
// 'beta' because only 'alpha' is in the search path.
$this->assertContains('./src/ExampleCommandFile.php', $commandFilePaths);
$this->assertContains('./src/ExampleHookAllCommandFile.php', $commandFilePaths);
$this->assertContains('./src/alpha/AlphaCommandFile.php', $commandFilePaths);
$this->assertContains('./src/alpha/Inclusive/IncludedCommandFile.php', $commandFilePaths);
// Make sure that there are no additional items found.
$this->assertEquals(4, count($commandFilePaths));
// Ensure that the command file namespaces that we expected
// to be generated all match.
$this->assertContains('\Consolidation\TestUtils\ExampleCommandFile', $commandFileNamespaces);
$this->assertContains('\Consolidation\TestUtils\ExampleHookAllCommandFile', $commandFileNamespaces);
$this->assertContains('\Consolidation\TestUtils\alpha\AlphaCommandFile', $commandFileNamespaces);
$this->assertContains('\Consolidation\TestUtils\alpha\Inclusive\IncludedCommandFile', $commandFileNamespaces);
// We do not need to test for additional namespace items, because we
// know that the length of the array_keys must be the same as the
// length of the array_values.
}
function testDeepCommandDiscovery()
{
$discovery = new CommandFileDiscovery();
$discovery
->setSearchPattern('*CommandFile.php')
->setSearchDepth(1)
->setSearchLocations([]);
chdir(__DIR__);
$commandFiles = $discovery->discover('.', '\Consolidation\TestUtils');
$commandFilePaths = array_keys($commandFiles);
$commandFileNamespaces = array_values($commandFiles);
// Ensure that the command files that we expected to
// find were all found. We find both 'alpha' and 'beta'
// items because the search locations is empty, which
// causes the search at the base directory to be deep.
// We do not find alpha/Inclusive, though, as the search
// depth is only 2, which excludes directories that are
// three levels deep.
$this->assertContains('./src/ExampleCommandFile.php', $commandFilePaths);
$this->assertContains('./src/ExampleHookAllCommandFile.php', $commandFilePaths);
$this->assertContains('./src/alpha/AlphaCommandFile.php', $commandFilePaths);
$this->assertContains('./src/beta/BetaCommandFile.php', $commandFilePaths);
// Make sure that there are no additional items found.
$this->assertEquals(4, count($commandFilePaths));
// Ensure that the command file namespaces that we expected
// to be generated all match.
$this->assertContains('\Consolidation\TestUtils\ExampleCommandFile', $commandFileNamespaces);
$this->assertContains('\Consolidation\TestUtils\ExampleHookAllCommandFile', $commandFileNamespaces);
$this->assertContains('\Consolidation\TestUtils\alpha\AlphaCommandFile', $commandFileNamespaces);
$this->assertContains('\Consolidation\TestUtils\beta\BetaCommandFile', $commandFileNamespaces);
// We do not need to test for additional namespace items, because we
// know that the length of the array_keys must be the same as the
// length of the array_values.
}
}

View File

@@ -1,102 +0,0 @@
<?php
namespace Consolidation\AnnotatedCommand;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use Consolidation\AnnotatedCommand\Parser\CommandInfoSerializer;
use Consolidation\AnnotatedCommand\Parser\CommandInfoDeserializer;
class CommandInfoTests extends \PHPUnit_Framework_TestCase
{
function flattenArray($actualValue)
{
$result = [];
foreach ($actualValue as $key => $value) {
if (!is_string($value)) {
$value = var_export($value, true);
}
$result[] = "{$key}=>{$value}";
}
return implode("\n", $result);
}
/**
* Test CommandInfo command annotation parsing.
*/
function testParsing()
{
$commandInfo = CommandInfo::create('\Consolidation\TestUtils\ExampleCommandFile', 'testArithmatic');
$this->assertCommandInfoIsAsExpected($commandInfo);
$serializer = new CommandInfoSerializer();
$serialized = $serializer->serialize($commandInfo);
$deserializer = new CommandInfoDeserializer();
$deserializedCommandInfo = $deserializer->deserialize($serialized);
$this->assertCommandInfoIsAsExpected($deserializedCommandInfo);
}
function testWithConfigImport()
{
$commandInfo = CommandInfo::create('\Consolidation\TestUtils\ExampleCommandFile', 'import');
$this->assertEquals('config:import', $commandInfo->getName());
$this->assertEquals(
'A config directory label (i.e. a key in \$config_directories array in settings.php).',
$commandInfo->arguments()->getDescription('label')
);
}
function assertCommandInfoIsAsExpected($commandInfo)
{
$this->assertEquals('test:arithmatic', $commandInfo->getName());
$this->assertEquals(
'This is the test:arithmatic command',
$commandInfo->getDescription()
);
$this->assertEquals(
"This command will add one and two. If the --negate flag\nis provided, then the result is negated.",
$commandInfo->getHelp()
);
$this->assertEquals('arithmatic', implode(',', $commandInfo->getAliases()));
$this->assertEquals(
'2 2 --negate=>Add two plus two and then negate.',
$this->flattenArray($commandInfo->getExampleUsages())
);
$this->assertEquals(
'The first number to add.',
$commandInfo->arguments()->getDescription('one')
);
$this->assertEquals(
'The other number to add.',
$commandInfo->arguments()->getDescription('two')
);
$this->assertEquals(
'2',
$commandInfo->arguments()->get('two')
);
$this->assertEquals(
'Whether or not the result should be negated.',
$commandInfo->options()->getDescription('negate')
);
$this->assertEquals(
'bob',
$commandInfo->options()->get('unused')
);
$this->assertEquals(
'one,two',
$commandInfo->getAnnotation('dup')
);
$this->assertEquals(
['one','two'],
$commandInfo->getAnnotationList('dup')
);
}
function testReturnValue()
{
$commandInfo = CommandInfo::create('\Consolidation\TestUtils\alpha\AlphaCommandFile', 'exampleTable');
$this->assertEquals('example:table', $commandInfo->getName());
$this->assertEquals('\Consolidation\OutputFormatters\StructuredData\RowsOfFields', $commandInfo->getReturnType());
}
}

View File

@@ -1,530 +0,0 @@
<?php
namespace Consolidation\AnnotatedCommand;
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\CommandData;
use Consolidation\AnnotatedCommand\CommandProcessor;
use Consolidation\AnnotatedCommand\Hooks\AlterResultInterface;
use Consolidation\AnnotatedCommand\Hooks\ExtractOutputInterface;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Hooks\ProcessResultInterface;
use Consolidation\AnnotatedCommand\Hooks\StatusDeterminerInterface;
use Consolidation\AnnotatedCommand\Hooks\ValidatorInterface;
use Consolidation\AnnotatedCommand\Options\AlterOptionsCommandEvent;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use Consolidation\OutputFormatters\FormatterManager;
use Consolidation\TestUtils\TestTerminal;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Consolidation\TestUtils\ApplicationWithTerminalWidth;
use Consolidation\AnnotatedCommand\Options\PrepareTerminalWidthOption;
use Consolidation\AnnotatedCommand\Events\CustomEventAwareInterface;
use Consolidation\AnnotatedCommand\Events\CustomEventAwareTrait;
/**
* Do a test of all of the classes in this project, top-to-bottom.
*/
class FullStackTests extends \PHPUnit_Framework_TestCase
{
protected $application;
protected $commandFactory;
function setup() {
$this->application = new ApplicationWithTerminalWidth('TestApplication', '0.0.0');
$this->commandFactory = new AnnotatedCommandFactory();
$alterOptionsEventManager = new AlterOptionsCommandEvent($this->application);
$eventDispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
$eventDispatcher->addSubscriber($this->commandFactory->commandProcessor()->hookManager());
$this->commandFactory->commandProcessor()->hookManager()->addCommandEvent($alterOptionsEventManager);
$this->application->setDispatcher($eventDispatcher);
$this->application->setAutoExit(false);
}
function testValidFormats()
{
$formatter = new FormatterManager();
$formatter->addDefaultFormatters();
$formatter->addDefaultSimplifiers();
$commandInfo = CommandInfo::create('\Consolidation\TestUtils\alpha\AlphaCommandFile', 'exampleTable');
$this->assertEquals('example:table', $commandInfo->getName());
$this->assertEquals('\Consolidation\OutputFormatters\StructuredData\RowsOfFields', $commandInfo->getReturnType());
}
function testAutomaticOptions()
{
$commandFileInstance = new \Consolidation\TestUtils\alpha\AlphaCommandFile;
$formatter = new FormatterManager();
$formatter->addDefaultFormatters();
$formatter->addDefaultSimplifiers();
$this->commandFactory->commandProcessor()->setFormatterManager($formatter);
$this->assertAutomaticOptionsForCommand($commandFileInstance, 'exampleTable', 'example:table');
$this->assertAutomaticOptionsForCommand($commandFileInstance, 'exampleTableTwo', 'example:table2');
}
function assertAutomaticOptionsForCommand($commandFileInstance, $functionName, $commandName)
{
$commandInfo = $this->commandFactory->createCommandInfo($commandFileInstance, $functionName);
$command = $this->commandFactory->createCommand($commandInfo, $commandFileInstance);
$this->application->add($command);
$containsList =
[
'--format[=FORMAT] Format the result data. Available formats: csv,json,list,php,print-r,sections,string,table,tsv,var_export,xml,yaml [default: "table"]',
'--fields[=FIELDS] Available fields: I (first), II (second), III (third) [default: ""]',
];
$this->assertRunCommandViaApplicationContains('help ' . $commandName, $containsList);
}
function testCommandsAndHooks()
{
// First, search for commandfiles in the 'alpha'
// directory. Note that this same functionality
// is tested more thoroughly in isolation in
// testCommandFileDiscovery.php
$discovery = new CommandFileDiscovery();
$discovery
->setSearchPattern('*CommandFile.php')
->setIncludeFilesAtBase(false)
->setSearchLocations(['alpha']);
chdir(__DIR__);
$commandFiles = $discovery->discover('.', '\Consolidation\TestUtils');
$formatter = new FormatterManager();
$formatter->addDefaultFormatters();
$formatter->addDefaultSimplifiers();
$hookManager = new HookManager();
$terminalWidthOption = new PrepareTerminalWidthOption();
$terminalWidthOption->enableWrap(true);
$terminalWidthOption->setApplication($this->application);
$testTerminal = new TestTerminal(0);
$terminalWidthOption->setTerminal($testTerminal);
$commandProcessor = new CommandProcessor($hookManager);
$commandProcessor->setFormatterManager($formatter);
$commandProcessor->addPrepareFormatter($terminalWidthOption);
// Create a new factory, and load all of the files
// discovered above.
$factory = new AnnotatedCommandFactory();
$factory->setCommandProcessor($commandProcessor);
// Add a listener to configure our command handler object
$factory->addListernerCallback(function($command) use($hookManager) {
if ($command instanceof CustomEventAwareInterface) {
$command->setHookManager($hookManager);
}
} );
$factory->setIncludeAllPublicMethods(false);
$this->addDiscoveredCommands($factory, $commandFiles);
$this->assertRunCommandViaApplicationContains('list', ['example:table'], ['additional:option', 'without:annotations']);
$this->assertTrue($this->application->has('example:table'));
$this->assertFalse($this->application->has('without:annotations'));
// Run the use:event command that defines a custom event, my-event.
$this->assertRunCommandViaApplicationEquals('use:event', 'one,two');
// Watch as we dynamically add a custom event to the hook manager to change the command results:
$hookManager->add(function () { return 'three'; }, HookManager::ON_EVENT, 'my-event');
$this->assertRunCommandViaApplicationEquals('use:event', 'one,three,two');
// Fetch a reference to the 'example:table' command and test its valid format types
$exampleTableCommand = $this->application->find('example:table');
$returnType = $exampleTableCommand->getReturnType();
$this->assertEquals('\Consolidation\OutputFormatters\StructuredData\RowsOfFields', $returnType);
$validFormats = $formatter->validFormats($returnType);
$this->assertEquals('csv,json,list,php,print-r,sections,string,table,tsv,var_export,xml,yaml', implode(',', $validFormats));
// Control: run commands without hooks.
$this->assertRunCommandViaApplicationEquals('always:fail', 'This command always fails.', 13);
$this->assertRunCommandViaApplicationEquals('simulated:status', '42');
$this->assertRunCommandViaApplicationEquals('example:output', 'Hello, World.');
$this->assertRunCommandViaApplicationEquals('example:cat bet alpha --flip', 'alphabet');
$this->assertRunCommandViaApplicationEquals('example:echo a b c', "a\tb\tc");
$this->assertRunCommandViaApplicationEquals('example:message', 'Shipwrecked; send bananas.');
$this->assertRunCommandViaApplicationEquals('command:with-one-optional-argument', 'Hello, world');
$this->assertRunCommandViaApplicationEquals('command:with-one-optional-argument Joe', 'Hello, Joe');
// Add some hooks.
$factory->hookManager()->addValidator(new ExampleValidator());
$factory->hookManager()->addResultProcessor(new ExampleResultProcessor());
$factory->hookManager()->addAlterResult(new ExampleResultAlterer());
$factory->hookManager()->addStatusDeterminer(new ExampleStatusDeterminer());
$factory->hookManager()->addOutputExtractor(new ExampleOutputExtractor());
// Run the same commands as before, and confirm that results
// are different now that the hooks are in place.
$this->assertRunCommandViaApplicationEquals('simulated:status', '', 42);
$this->assertRunCommandViaApplicationEquals('example:output', 'Hello, World!');
$this->assertRunCommandViaApplicationEquals('example:cat bet alpha --flip', 'alphareplaced');
$this->assertRunCommandViaApplicationEquals('example:echo a b c', 'a,b,c');
$this->assertRunCommandViaApplicationEquals('example:message', 'Shipwrecked; send bananas.');
$expected = <<<EOT
------ ------ -------
I II III
------ ------ -------
One Two Three
Eins Zwei Drei
Ichi Ni San
Uno Dos Tres
------ ------ -------
EOT;
$this->assertRunCommandViaApplicationEquals('example:table', $expected);
$expected = <<<EOT
------- ------
III II
------- ------
Three Two
Drei Zwei
San Ni
Tres Dos
------- ------
EOT;
$this->assertRunCommandViaApplicationEquals('example:table --fields=III,II', $expected);
$expectedSingleField = <<<EOT
Two
Zwei
Ni
Dos
EOT;
// When --field is specified (instead of --fields), then the format
// is forced to 'string'.
$this->assertRunCommandViaApplicationEquals('example:table --field=II', $expectedSingleField);
// Check the help for the example table command and see if the options
// from the alter hook were added. We expect that we should not see
// any of the information from the alter hook in the 'beta' folder yet.
$this->assertRunCommandViaApplicationContains('help example:table',
[
'Option added by @hook option example:table',
'example:table --french',
'Add a row with French numbers.'
],
[
'chinese',
'kanji',
]
);
$expectedOutputWithFrench = <<<EOT
------ ------ -------
I II III
------ ------ -------
One Two Three
Eins Zwei Drei
Ichi Ni San
Uno Dos Tres
Un Deux Trois
------ ------ -------
EOT;
$this->assertRunCommandViaApplicationEquals('example:table --french', $expectedOutputWithFrench);
$expectedAssociativeListTable = <<<EOT
--------------- ----------------------------------------------------------------------------------------
SFTP Command sftp -o Port=2222 dev@appserver.dev.drush.in
Git Command git clone ssh://codeserver.dev@codeserver.dev.drush.in:2222/~/repository.git wp-update
MySQL Command mysql -u pantheon -p4b33cb -h dbserver.dev.drush.in -P 16191 pantheon
--------------- ----------------------------------------------------------------------------------------
EOT;
$this->assertRunCommandViaApplicationEquals('example:list', $expectedAssociativeListTable);
$this->assertRunCommandViaApplicationEquals('example:list --field=sftp_command', 'sftp -o Port=2222 dev@appserver.dev.drush.in');
$this->assertRunCommandViaApplicationEquals('get:serious', 'very serious');
$this->assertRunCommandViaApplicationContains('get:lost', 'Command "get:lost" is not defined.', [], 1);
$this->assertRunCommandViaApplicationContains('help example:wrap',
[
'Test word wrapping',
'[default: "table"]',
]
);
$expectedUnwrappedOutput = <<<EOT
-------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------
First Second
-------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------
This is a really long cell that contains a lot of data. When it is rendered, it should be wrapped across multiple lines. This is the second column of the same table. It is also very long, and should be wrapped across multiple lines, just like the first column.
-------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------
EOT;
$this->application->setWidthAndHeight(0, 0);
$this->assertRunCommandViaApplicationEquals('example:wrap', $expectedUnwrappedOutput);
$expectedWrappedOutput = <<<EOT
------------------ --------------------
First Second
------------------ --------------------
This is a really This is the second
long cell that column of the same
contains a lot table. It is also
of data. When it very long, and
is rendered, it should be wrapped
should be across multiple
wrapped across lines, just like
multiple lines. the first column.
------------------ --------------------
EOT;
$this->application->setWidthAndHeight(42, 24);
$testTerminal->setWidth(42);
$this->assertRunCommandViaApplicationEquals('example:wrap', $expectedWrappedOutput);
}
function testCommandsAndHooksIncludeAllPublicMethods()
{
// First, search for commandfiles in the 'alpha'
// directory. Note that this same functionality
// is tested more thoroughly in isolation in
// testCommandFileDiscovery.php
$discovery = new CommandFileDiscovery();
$discovery
->setSearchPattern('*CommandFile.php')
->setIncludeFilesAtBase(false)
->setSearchLocations(['alpha']);
chdir(__DIR__);
$commandFiles = $discovery->discover('.', '\Consolidation\TestUtils');
$formatter = new FormatterManager();
$formatter->addDefaultFormatters();
$formatter->addDefaultSimplifiers();
$hookManager = new HookManager();
$commandProcessor = new CommandProcessor($hookManager);
$commandProcessor->setFormatterManager($formatter);
// Create a new factory, and load all of the files
// discovered above. The command factory class is
// tested in isolation in testAnnotatedCommandFactory.php,
// but this is the only place where
$factory = new AnnotatedCommandFactory();
$factory->setCommandProcessor($commandProcessor);
// $factory->addListener(...);
// Now we will once again add all commands, this time including all
// public methods. The command 'withoutAnnotations' should now be found.
$factory->setIncludeAllPublicMethods(true);
$this->addDiscoveredCommands($factory, $commandFiles);
$this->assertTrue($this->application->has('without:annotations'));
$this->assertRunCommandViaApplicationContains('list', ['example:table', 'without:annotations'], ['alter:formatters']);
$this->assertRunCommandViaApplicationEquals('get:serious', 'very serious');
$this->assertRunCommandViaApplicationContains('get:lost', 'Command "get:lost" is not defined.', [], 1);
}
function testCommandsAndHooksWithBetaFolder()
{
// First, search for commandfiles in the 'alpha'
// directory. Note that this same functionality
// is tested more thoroughly in isolation in
// testCommandFileDiscovery.php
$discovery = new CommandFileDiscovery();
$discovery
->setSearchPattern('*CommandFile.php')
->setIncludeFilesAtBase(false)
->setSearchLocations(['alpha', 'beta']);
chdir(__DIR__);
$commandFiles = $discovery->discover('.', '\Consolidation\TestUtils');
$formatter = new FormatterManager();
$formatter->addDefaultFormatters();
$formatter->addDefaultSimplifiers();
$hookManager = new HookManager();
$commandProcessor = new CommandProcessor($hookManager);
$commandProcessor->setFormatterManager($formatter);
// Create a new factory, and load all of the files
// discovered above. The command factory class is
// tested in isolation in testAnnotatedCommandFactory.php,
// but this is the only place where
$factory = new AnnotatedCommandFactory();
$factory->setCommandProcessor($commandProcessor);
// $factory->addListener(...);
$factory->setIncludeAllPublicMethods(true);
$this->addDiscoveredCommands($factory, $commandFiles);
// A few asserts, to make sure that our hooks all get registered.
$allRegisteredHooks = $hookManager->getAllHooks();
$registeredHookNames = array_keys($allRegisteredHooks);
sort($registeredHookNames);
$this->assertEquals('*,example:table,my-event', implode(',', $registeredHookNames));
$allHooksForExampleTable = $allRegisteredHooks['example:table'];
$allHookPhasesForExampleTable = array_keys($allHooksForExampleTable);
sort($allHookPhasesForExampleTable);
$this->assertEquals('alter,option', implode(',', $allHookPhasesForExampleTable));
$this->assertContains('alterFormattersChinese', var_export($allHooksForExampleTable, true));
$alterHooksForExampleTable = $this->callProtected($hookManager, 'getHooks', [['example:table'], 'alter']);
$this->assertContains('alterFormattersKanji', var_export($alterHooksForExampleTable, true));
$allHooksForAnyCommand = $allRegisteredHooks['*'];
$allHookPhasesForAnyCommand = array_keys($allHooksForAnyCommand);
sort($allHookPhasesForAnyCommand);
$this->assertEquals('alter', implode(',', $allHookPhasesForAnyCommand));
$this->assertContains('alterFormattersKanji', var_export($allHooksForAnyCommand, true));
// Help should have the information from the hooks in the 'beta' folder
$this->assertRunCommandViaApplicationContains('help example:table',
[
'Option added by @hook option example:table',
'example:table --french',
'Add a row with French numbers.',
'chinese',
'kanji',
]
);
// Confirm that the "unavailable" command is now available
$this->assertTrue($this->application->has('unavailable:command'));
$expectedOutputWithChinese = <<<EOT
------ ------ -------
I II III
------ ------ -------
One Two Three
Eins Zwei Drei
Ichi Ni San
Uno Dos Tres
壹 貳 叁
------ ------ -------
EOT;
$this->assertRunCommandViaApplicationEquals('example:table --chinese', $expectedOutputWithChinese);
$expectedOutputWithKanji = <<<EOT
------ ------ -------
I II III
------ ------ -------
One Two Three
Eins Zwei Drei
Ichi Ni San
Uno Dos Tres
一 二 三
------ ------ -------
EOT;
$this->assertRunCommandViaApplicationEquals('example:table --kanji', $expectedOutputWithKanji);
}
public function addDiscoveredCommands($factory, $commandFiles) {
foreach ($commandFiles as $path => $commandClass) {
$this->assertFileExists($path);
if (!class_exists($commandClass)) {
include $path;
}
$commandInstance = new $commandClass();
$commandList = $factory->createCommandsFromClass($commandInstance);
foreach ($commandList as $command) {
$this->application->add($command);
}
}
}
function assertRunCommandViaApplicationEquals($cmd, $expectedOutput, $expectedStatusCode = 0)
{
$input = new StringInput($cmd);
$output = new BufferedOutput();
$statusCode = $this->application->run($input, $output);
$commandOutput = trim($output->fetch());
$expectedOutput = $this->simplifyWhitespace($expectedOutput);
$commandOutput = $this->simplifyWhitespace($commandOutput);
$this->assertEquals($expectedOutput, $commandOutput);
$this->assertEquals($expectedStatusCode, $statusCode);
}
function assertRunCommandViaApplicationContains($cmd, $containsList, $doesNotContainList = [], $expectedStatusCode = 0)
{
$input = new StringInput($cmd);
$output = new BufferedOutput();
$containsList = (array) $containsList;
$statusCode = $this->application->run($input, $output);
$commandOutput = trim($output->fetch());
$commandOutput = $this->simplifyWhitespace($commandOutput);
foreach ($containsList as $expectedToContain) {
$this->assertContains($this->simplifyWhitespace($expectedToContain), $commandOutput);
}
foreach ($doesNotContainList as $expectedToNotContain) {
$this->assertNotContains($this->simplifyWhitespace($expectedToNotContain), $commandOutput);
}
$this->assertEquals($expectedStatusCode, $statusCode);
}
function simplifyWhitespace($data)
{
return trim(preg_replace('#\s+$#m', '', $data));
}
function callProtected($object, $method, $args = [])
{
$r = new \ReflectionMethod($object, $method);
$r->setAccessible(true);
return $r->invokeArgs($object, $args);
}
}
class ExampleValidator implements ValidatorInterface
{
public function validate(CommandData $commandData)
{
$args = $commandData->arguments();
if (isset($args['one']) && ($args['one'] == 'bet')) {
$commandData->input()->setArgument('one', 'replaced');
return $args;
}
}
}
class ExampleResultProcessor implements ProcessResultInterface
{
public function process($result, CommandData $commandData)
{
if (is_array($result) && array_key_exists('item-list', $result)) {
return implode(',', $result['item-list']);
}
}
}
class ExampleResultAlterer implements AlterResultInterface
{
public function process($result, CommandData $commandData)
{
if (is_string($result) && ($result == 'Hello, World.')) {
return 'Hello, World!';
}
}
}
class ExampleStatusDeterminer implements StatusDeterminerInterface
{
public function determineStatusCode($result)
{
if (is_array($result) && array_key_exists('status-code', $result)) {
return $result['status-code'];
}
}
}
class ExampleOutputExtractor implements ExtractOutputInterface
{
public function extractOutput($result)
{
if (is_array($result) && array_key_exists('message', $result)) {
return $result['message'];
}
}
}

View File

@@ -1,313 +0,0 @@
<?php
namespace Consolidation\AnnotatedCommand;
use Consolidation\AnnotatedCommand\Help\HelpCommand;
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\CommandData;
use Consolidation\AnnotatedCommand\CommandProcessor;
use Consolidation\AnnotatedCommand\Hooks\AlterResultInterface;
use Consolidation\AnnotatedCommand\Hooks\ExtractOutputInterface;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Hooks\ProcessResultInterface;
use Consolidation\AnnotatedCommand\Hooks\StatusDeterminerInterface;
use Consolidation\AnnotatedCommand\Hooks\ValidatorInterface;
use Consolidation\AnnotatedCommand\Options\AlterOptionsCommandEvent;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use Consolidation\OutputFormatters\FormatterManager;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Consolidation\TestUtils\ApplicationWithTerminalWidth;
use Consolidation\AnnotatedCommand\Options\PrepareTerminalWidthOption;
/**
* Test our 'help' command.
*/
class HelpTests extends \PHPUnit_Framework_TestCase
{
protected $application;
protected $commandFactory;
function setup()
{
$this->application = new ApplicationWithTerminalWidth('TestApplication', '0.0.0');
$this->commandFactory = new AnnotatedCommandFactory();
// $factory->addListener(...);
$alterOptionsEventManager = new AlterOptionsCommandEvent($this->application);
$eventDispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
$eventDispatcher->addSubscriber($this->commandFactory->commandProcessor()->hookManager());
$this->commandFactory->commandProcessor()->hookManager()->addCommandEvent($alterOptionsEventManager);
$this->application->setDispatcher($eventDispatcher);
$this->application->setAutoExit(false);
$discovery = new CommandFileDiscovery();
$discovery
->setSearchPattern('*CommandFile.php')
->setIncludeFilesAtBase(false)
->setSearchLocations(['alpha']);
chdir(__DIR__);
$commandFiles = $discovery->discover('.', '\Consolidation\TestUtils');
$formatter = new FormatterManager();
$formatter->addDefaultFormatters();
$formatter->addDefaultSimplifiers();
$terminalWidthOption = new PrepareTerminalWidthOption();
$terminalWidthOption->setApplication($this->application);
$this->commandFactory->commandProcessor()->setFormatterManager($formatter);
$this->commandFactory->commandProcessor()->addPrepareFormatter($terminalWidthOption);
$this->commandFactory->setIncludeAllPublicMethods(false);
$this->addDiscoveredCommands($this->commandFactory, $commandFiles);
$helpCommandfile = new HelpCommand($this->application);
$commandList = $this->commandFactory->createCommandsFromClass($helpCommandfile);
foreach ($commandList as $command) {
$this->application->add($command);
}
}
public function addDiscoveredCommands($factory, $commandFiles) {
foreach ($commandFiles as $path => $commandClass) {
$this->assertFileExists($path);
if (!class_exists($commandClass)) {
include $path;
}
$commandInstance = new $commandClass();
$commandList = $factory->createCommandsFromClass($commandInstance);
foreach ($commandList as $command) {
$this->application->add($command);
}
}
}
function assertRunCommandViaApplicationEquals($cmd, $expectedOutput, $expectedStatusCode = 0)
{
$input = new StringInput($cmd);
$output = new BufferedOutput();
$statusCode = $this->application->run($input, $output);
$commandOutput = trim($output->fetch());
$expectedOutput = $this->simplifyWhitespace($expectedOutput);
$commandOutput = $this->simplifyWhitespace($commandOutput);
$this->assertEquals($expectedOutput, $commandOutput);
$this->assertEquals($expectedStatusCode, $statusCode);
}
function simplifyWhitespace($data)
{
return trim(preg_replace('#\s+$#m', '', $data));
}
function testHelp()
{
$expectedXML = <<<EOT
<?xml version="1.0" encoding="UTF-8"?>
<command id="example:table" name="example:table">
<usages>
<usage>example:table [--format [FORMAT]] [--fields [FIELDS]] [--field FIELD] [--] [&lt;unused&gt;]</usage>
</usages>
<examples>
<example>
<usage>example:table --format=yml</usage>
<description>Show the example table in yml format.</description>
</example>
<example>
<usage>example:table --fields=first,third</usage>
<description>Show only the first and third fields in the table.</description>
</example>
<example>
<usage>example:table --fields=II,III</usage>
<description>Note that either the field ID or the visible field label may be used.</description>
</example>
</examples>
<description>Test command with formatters</description>
<arguments>
<argument name="unused" is_required="0" is_array="0">
<description>An unused argument</description>
<defaults/>
</argument>
</arguments>
<options>
<option name="--format" shortcut="" accept_value="1" is_value_required="0" is_multiple="0">
<description>Format the result data. Available formats: csv,json,list,php,print-r,sections,string,table,tsv,var_export,xml,yaml</description>
<defaults>
<default>table</default>
</defaults>
</option>
<option name="--fields" shortcut="" accept_value="1" is_value_required="0" is_multiple="0">
<description>Available fields: I (first), II (second), III (third)</description>
<defaults/>
</option>
<option name="--field" shortcut="" accept_value="1" is_value_required="1" is_multiple="0">
<description>Select just one field, and force format to 'string'.</description>
<defaults/>
</option>
<option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0">
<description>Display this help message</description>
</option>
<option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0">
<description>Do not output any message</description>
</option>
<option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0">
<description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description>
</option>
<option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0">
<description>Display this application version</description>
</option>
<option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0">
<description>Force ANSI output</description>
</option>
<option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0">
<description>Disable ANSI output</description>
</option>
<option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0">
<description>Do not ask any interactive question</description>
</option>
</options>
<help>Test command with formatters</help>
<aliases>
<alias>extab</alias>
</aliases>
<topics>
<topic>docs-tables</topic>
</topics>
</command>
EOT;
$this->assertRunCommandViaApplicationEquals('my-help --format=xml example:table', $expectedXML);
$expectedJSON = <<<EOT
{
"id": "example:table",
"name": "example:table",
"usages": [
"example:table [--format [FORMAT]] [--fields [FIELDS]] [--field FIELD] [--] [<unused>]"
],
"examples": [
{
"usage": "example:table --format=yml",
"description": "Show the example table in yml format."
},
{
"usage": "example:table --fields=first,third",
"description": "Show only the first and third fields in the table."
},
{
"usage": "example:table --fields=II,III",
"description": "Note that either the field ID or the visible field label may be used."
}
],
"description": "Test command with formatters",
"arguments": {
"unused": {
"name": "unused",
"is_required": "0",
"is_array": "0",
"description": "An unused argument"
}
},
"options": {
"format": {
"name": "--format",
"shortcut": "",
"accept_value": "1",
"is_value_required": "0",
"is_multiple": "0",
"description": "Format the result data. Available formats: csv,json,list,php,print-r,sections,string,table,tsv,var_export,xml,yaml",
"defaults": [
"table"
]
},
"fields": {
"name": "--fields",
"shortcut": "",
"accept_value": "1",
"is_value_required": "0",
"is_multiple": "0",
"description": "Available fields: I (first), II (second), III (third)"
},
"field": {
"name": "--field",
"shortcut": "",
"accept_value": "1",
"is_value_required": "1",
"is_multiple": "0",
"description": "Select just one field, and force format to 'string'."
},
"help": {
"name": "--help",
"shortcut": "-h",
"accept_value": "0",
"is_value_required": "0",
"is_multiple": "0",
"description": "Display this help message"
},
"quiet": {
"name": "--quiet",
"shortcut": "-q",
"accept_value": "0",
"is_value_required": "0",
"is_multiple": "0",
"description": "Do not output any message"
},
"verbose": {
"name": "--verbose",
"shortcut": "-v",
"shortcuts": "-v|-vv|-vvv",
"accept_value": "0",
"is_value_required": "0",
"is_multiple": "0",
"description": "Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug"
},
"version": {
"name": "--version",
"shortcut": "-V",
"accept_value": "0",
"is_value_required": "0",
"is_multiple": "0",
"description": "Display this application version"
},
"ansi": {
"name": "--ansi",
"shortcut": "",
"accept_value": "0",
"is_value_required": "0",
"is_multiple": "0",
"description": "Force ANSI output"
},
"no-ansi": {
"name": "--no-ansi",
"shortcut": "",
"accept_value": "0",
"is_value_required": "0",
"is_multiple": "0",
"description": "Disable ANSI output"
},
"no-interaction": {
"name": "--no-interaction",
"shortcut": "-n",
"accept_value": "0",
"is_value_required": "0",
"is_multiple": "0",
"description": "Do not ask any interactive question"
}
},
"help": "Test command with formatters",
"aliases": [
"extab"
],
"topics": [
"docs-tables"
]
}
EOT;
$this->assertRunCommandViaApplicationEquals('my-help --format=json example:table', $expectedJSON);
}
}

View File

@@ -1,3 +0,0 @@
.DS_Store
vendor
build

View File

@@ -0,0 +1,57 @@
#!/bin/bash
SCENARIO=$1
DEPENDENCIES=${2-install}
# Convert the aliases 'highest', 'lowest' and 'lock' to
# the corresponding composer command to run.
case $DEPENDENCIES in
highest)
DEPENDENCIES=update
;;
lowest)
DEPENDENCIES='update --prefer-lowest'
;;
lock|default|"")
DEPENDENCIES=install
;;
esac
original_name=scenarios
recommended_name=".scenarios.lock"
base="$original_name"
if [ -d "$recommended_name" ] ; then
base="$recommended_name"
fi
# If scenario is not specified, install the lockfile at
# the root of the project.
dir="$base/${SCENARIO}"
if [ -z "$SCENARIO" ] || [ "$SCENARIO" == "default" ] ; then
SCENARIO=default
dir=.
fi
# Test to make sure that the selected scenario exists.
if [ ! -d "$dir" ] ; then
echo "Requested scenario '${SCENARIO}' does not exist."
exit 1
fi
echo
echo "::"
echo ":: Switch to ${SCENARIO} scenario"
echo "::"
echo
set -ex
composer -n validate --working-dir=$dir --no-check-all --ansi
composer -n --working-dir=$dir ${DEPENDENCIES} --prefer-dist --no-scripts
# If called from a CI context, print out some extra information about
# what we just installed.
if [[ -n "$CI" ]] ; then
composer -n --working-dir=$dir info
fi

View File

@@ -0,0 +1 @@
vendor

View File

@@ -0,0 +1,64 @@
{
"name": "consolidation/config",
"description": "Provide configuration services for a commandline tool.",
"license": "MIT",
"authors": [
{
"name": "Greg Anderson",
"email": "greg.1.anderson@greenknowe.org"
}
],
"autoload": {
"psr-4": {
"Consolidation\\Config\\": "../../src"
}
},
"autoload-dev": {
"psr-4": {
"Consolidation\\TestUtils\\": "../../tests/src"
}
},
"require": {
"php": ">=5.4.0",
"dflydev/dot-access-data": "^1.1.0",
"grasmash/expander": "^1"
},
"require-dev": {
"symfony/console": "^2.8",
"symfony/event-dispatcher": "^2.8",
"phpunit/phpunit": "^4.8.36",
"g1a/composer-test-scenarios": "^3",
"symfony/yaml": "^2.8.11|^3|^4",
"squizlabs/php_codesniffer": "2.*"
},
"suggest": {
"symfony/yaml": "Required to use Consolidation\\Config\\Loader\\YamlConfigLoader"
},
"config": {
"platform": {
"php": "5.4.8"
},
"optimize-autoloader": true,
"sort-packages": true,
"vendor-dir": "../../vendor"
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "SHELL_INTERACTIVE=true phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
]
},
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
vendor

View File

@@ -0,0 +1,64 @@
{
"name": "consolidation/config",
"description": "Provide configuration services for a commandline tool.",
"license": "MIT",
"authors": [
{
"name": "Greg Anderson",
"email": "greg.1.anderson@greenknowe.org"
}
],
"autoload": {
"psr-4": {
"Consolidation\\Config\\": "../../src"
}
},
"autoload-dev": {
"psr-4": {
"Consolidation\\TestUtils\\": "../../tests/src"
}
},
"require": {
"php": ">=5.4.0",
"dflydev/dot-access-data": "^1.1.0",
"grasmash/expander": "^1"
},
"require-dev": {
"symfony/console": "^4.0",
"phpunit/phpunit": "^5",
"g1a/composer-test-scenarios": "^3",
"symfony/yaml": "^2.8.11|^3|^4",
"php-coveralls/php-coveralls": "^1",
"squizlabs/php_codesniffer": "2.*"
},
"suggest": {
"symfony/yaml": "Required to use Consolidation\\Config\\Loader\\YamlConfigLoader"
},
"config": {
"platform": {
"php": "7.1.3"
},
"optimize-autoloader": true,
"sort-packages": true,
"vendor-dir": "../../vendor"
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "SHELL_INTERACTIVE=true phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
]
},
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +0,0 @@
language: php
branches:
# Only test the master branch and SemVer tags.
only:
- master
- /^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/
matrix:
fast_finish: true
include:
- php: 7.2
env: 'SCENARIO=symfony4 HIGHEST_LOWEST="update"'
- php: 7.1
env: 'SCENARIO=symfony4'
- php: 7.0.11
env: 'HIGHEST_LOWEST="update"'
- php: 7.0.11
- php: 5.6
- php: 5.5
- php: 5.4
env: 'SCENARIO=symfony2 HIGHEST_LOWEST="update --prefer-lowest'
sudo: false
cache:
directories:
- vendor
- $HOME/.composer/cache
install:
- 'composer scenario "${SCENARIO}" "${HIGHEST_LOWEST-install}"'
script:
- composer test
after_success:
- travis_retry php vendor/bin/coveralls -v

View File

@@ -1,5 +1,43 @@
# Changelog
### 1.2.1 2019-03-03
* Add ConfigRuntimeInterface, and implement it in ConfigOverlay (#27)
* Add ConfigOverlay::exportAll()
### 1.2.0 2019-02-15
* Add ConfigAwareInterface / ConfigAwareTrait
### 1.1.1 2018-10-24
* Add interpolation to Config objects (#23)
### 1.1.0 2018-08-07
* Selective distinct/combine merge strategy. (#22)
### 1.0.11 2018-05-26
* BUGFIX: Ensure that duplicate keys added to different contexts in a config overlay only appear once in the final export. (#21)
### 1.0.10 2018-05-25
* Rename g-1-a/composer-test-scenarios to g1a/composer-test-scenarios (#20)
### 1.0.9 2017-12-22
* Make yaml component optional. (#17)
### 1.0.8 2017-12-16
* Use test scenarios to test multiple versions of Symfony. (#14) & (#15)
* Fix defaults to work with DotAccessData by thomscode (#13)
### 1.0.7 2017-10-24
* Deprecate Config::import(); recommand Config::replace() instead.
### 1.0.6 10/17/2017
* Add a 'Config::combine()' method for importing without overwriting.

View File

@@ -1,4 +1,4 @@
Copyright (c) 2017 Consolidation Developers
Copyright (c) 2017-2018 Consolidation Developers
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -6,3 +6,9 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DEPENDENCY LICENSES:
Name Version License
dflydev/dot-access-data v1.1.0 MIT
grasmash/expander 1.0.0 MIT

View File

@@ -131,6 +131,7 @@ $application->setDispatcher($eventDispatcher);
### Get Configuration Values
If you have a configuration file that looks like this:
```
a:
@@ -143,6 +144,19 @@ $value = $config->get('a.b.c');
```
[dflydev/dot-access-data](https://github.com/dflydev/dot-access-data) is leveraged to provide this capability.
### Interpolation
Interpolation allows configuration values to be injected into a string with tokens. The tokens are used as keys that are looked up in the config object; the resulting configuration values will be used to replace the tokens in the provided string.
For example, using the same configuration file shown above:
```
$result = $config->interpolate('The value is: {{a.b.c}}')
```
In this example, the `$result` string would be:
```
The value is: foo
```
### Configuration Overlays
Optionally, you may use the ConfigOverlay class to combine multiple configuration objects implamenting ConfigInterface into a single, prioritized configuration object. It is not necessary to use a configuration overlay; if your only goal is to merge configuration from multiple files, you may follow the example above to extend a processor with multiple configuration files, and then import the result into a single configuration object. This will cause newer configuration items to overwrite any existing values stored under the same key.

View File

@@ -24,11 +24,11 @@
"grasmash/expander": "^1"
},
"require-dev": {
"phpunit/phpunit": "^4",
"greg-1-anderson/composer-test-scenarios": "^1",
"phpunit/phpunit": "^5",
"g1a/composer-test-scenarios": "^3",
"symfony/console": "^2.5|^3|^4",
"symfony/yaml": "^2.8.11|^3|^4",
"satooshi/php-coveralls": "^1.0",
"php-coveralls/php-coveralls": "^1",
"squizlabs/php_codesniffer": "2.*"
},
"suggest": {
@@ -53,14 +53,36 @@
"@lint",
"@unit",
"@cs"
],
"scenario": "scenarios/install",
"post-update-cmd": [
"create-scenario symfony4 'symfony/console:^4.0'",
"create-scenario symfony2 'symfony/console:^2.8' --platform-php '5.4' --no-lockfile"
]
},
"extra": {
"scenarios": {
"symfony4": {
"require-dev": {
"symfony/console": "^4.0"
},
"config": {
"platform": {
"php": "7.1.3"
}
}
},
"symfony2": {
"require-dev": {
"symfony/console": "^2.8",
"symfony/event-dispatcher": "^2.8",
"phpunit/phpunit": "^4.8.36"
},
"remove": [
"php-coveralls/php-coveralls"
],
"config": {
"platform": {
"php": "5.4.8"
}
}
}
},
"branch-alias": {
"dev-master": "1.x-dev"
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,28 +0,0 @@
#!/bin/bash
SCENARIO=$1
ACTION=${2-install}
dir=scenarios/${SCENARIO}
if [ -z "$SCENARIO" ] ; then
SCENARIO=default
dir=.
fi
if [ ! -d "$dir" ] ; then
echo "Requested scenario '${SCENARIO}' does not exist."
exit 1
fi
echo
echo "::"
echo ":: Switch to ${SCENARIO} scenario"
echo "::"
echo
set -ex
composer -n validate --working-dir=$dir --no-check-all --ansi
composer -n --working-dir=$dir ${ACTION} --prefer-dist --no-scripts
composer -n --working-dir=$dir info

View File

@@ -1,70 +0,0 @@
{
"name": "consolidation/config",
"description": "Provide configuration services for a commandline tool.",
"license": "MIT",
"authors": [
{
"name": "Greg Anderson",
"email": "greg.1.anderson@greenknowe.org"
}
],
"autoload":{
"psr-4":{
"Consolidation\\Config\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Consolidation\\TestUtils\\": "tests/src"
}
},
"require": {
"php": ">=5.4.0",
"dflydev/dot-access-data": "^1.1.0",
"grasmash/expander": "^1"
},
"require-dev": {
"greg-1-anderson/composer-test-scenarios": "^1",
"phpunit/phpunit": "^4",
"satooshi/php-coveralls": "^1.0",
"squizlabs/php_codesniffer": "2.*",
"symfony/console": "^2.8",
"symfony/yaml": "^2.8.11|^3|^4"
},
"suggest": {
"symfony/yaml": "Required to use Consolidation\\Config\\Loader\\YamlConfigLoader"
},
"config": {
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "5.4"
},
"vendor-dir": "../../vendor"
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "SHELL_INTERACTIVE=true phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
],
"scenario": "scenarios/install",
"post-update-cmd": [
"create-scenario symfony4 'symfony/console:^4.0'",
"create-scenario symfony2 'symfony/console:^2.8' --platform-php '5.4' --no-lockfile"
]
},
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"minimum-stability": "stable"
}

View File

@@ -1,157 +0,0 @@
<?php
namespace Consolidation\Config;
use Dflydev\DotAccessData\Data;
class Config implements ConfigInterface
{
/**
* @var Data
*/
protected $config;
/**
* TODO: make this private in 2.0 to prevent being saved as an array
* Making private now breaks backward compatibility
*
* @var Data
*/
protected $defaults;
/**
* Create a new configuration object, and initialize it with
* the provided nested array containing configuration data.
*
* @param array $data - Config data to store
*/
public function __construct(array $data = null)
{
$this->config = new Data($data);
$this->setDefaults(new Data());
}
/**
* {@inheritdoc}
*/
public function has($key)
{
return ($this->config->has($key));
}
/**
* {@inheritdoc}
*/
public function get($key, $defaultFallback = null)
{
if ($this->has($key)) {
return $this->config->get($key);
}
return $this->getDefault($key, $defaultFallback);
}
/**
* {@inheritdoc}
*/
public function set($key, $value)
{
$this->config->set($key, $value);
return $this;
}
/**
* {@inheritdoc}
*/
public function import($data)
{
return $this->replace($data);
}
/**
* {@inheritdoc}
*/
public function replace($data)
{
$this->config = new Data($data);
return $this;
}
/**
* {@inheritdoc}
*/
public function combine($data)
{
if (!empty($data)) {
$this->config->import($data, true);
}
return $this;
}
/**
* {@inheritdoc}
*/
public function export()
{
return $this->config->export();
}
/**
* {@inheritdoc}
*/
public function hasDefault($key)
{
return $this->getDefaults()->has($key);
}
/**
* {@inheritdoc}
*/
public function getDefault($key, $defaultFallback = null)
{
return $this->hasDefault($key) ? $this->getDefaults()->get($key) : $defaultFallback;
}
/**
* {@inheritdoc}
*/
public function setDefault($key, $value)
{
$this->getDefaults()->set($key, $value);
return $this;
}
/**
* Return the class $defaults property and ensure it's a Data object
* TODO: remove Data object validation in 2.0
*
* @return Data
*/
protected function getDefaults()
{
// Ensure $this->defaults is a Data object (not an array)
if (!$this->defaults instanceof Data) {
$this->setDefaults($this->defaults);
}
return $this->defaults;
}
/**
* Sets the $defaults class parameter
* TODO: remove support for array in 2.0 as this would currently break backward compatibility
*
* @param Data|array $defaults
*
* @throws \Exception
*/
protected function setDefaults($defaults)
{
if (is_array($defaults)) {
$this->defaults = new Data($defaults);
} elseif ($defaults instanceof Data) {
$this->defaults = $defaults;
} else {
throw new \Exception("Unknown type provided for \$defaults");
}
}
}

View File

@@ -1,105 +0,0 @@
<?php
namespace Consolidation\Config;
interface ConfigInterface
{
/**
* Determine if a non-default config value exists.
*/
public function has($key);
/**
* Fetch a configuration value
*
* @param string $key Which config item to look up
* @param string|null $defaultFallback Fallback default value to use when
* configuration object has neither a value nor a default. Use is
* discouraged; use default context in ConfigOverlay, or provide defaults
* using a config processor.
*
* @return mixed
*/
public function get($key, $defaultFallback = null);
/**
* Set a config value
*
* @param string $key
* @param mixed $value
*
* @return $this
*/
public function set($key, $value);
/**
* Import configuration from the provided nexted array, replacing whatever
* was here previously. No processing is done on the provided data.
*
* @deprecated Use 'replace'. Dflydev\DotAccessData\Data::import() merges, which is confusing, since this method replaces.
*
* @param array $data
* @return Config
*/
public function import($data);
/**
* Load configuration from the provided nexted array, replacing whatever
* was here previously. No processing is done on the provided data.
*
* TODO: This will become a required method in version 2.0. Adding now
* would break clients that implement ConfigInterface.
*
* @param array $data
* @return Config
*/
// public function replace($data);
/**
* Import configuration from the provided nexted array, merging with whatever
* was here previously. No processing is done on the provided data.
* Any data provided to the combine() method will overwrite existing data
* with the same key.
*
* TODO: This will become a required method in version 2.0. Adding now
* would break clients that implement ConfigInterface.
*
* @param array $data
* @return Config
*/
// public function combine($data);
/**
* Export all configuration as a nested array.
*/
public function export();
/**
* Return the default value for a given configuration item.
*
* @param string $key
*
* @return mixed
*/
public function hasDefault($key);
/**
* Return the default value for a given configuration item.
*
* @param string $key
* @param mixed $defaultFallback
*
* @return mixed
*/
public function getDefault($key, $defaultFallback = null);
/**
* Set the default value for a configuration setting. This allows us to
* set defaults either before or after more specific configuration values
* are loaded. Keeping defaults separate from current settings also
* allows us to determine when a setting has been overridden.
*
* @param string $key
* @param string $value
*/
public function setDefault($key, $value);
}

View File

@@ -1,10 +0,0 @@
<?php
namespace Consolidation\Config;
interface GlobalOptionDefaultValuesInterface
{
/**
* Return an associative array of option-key => default-value
*/
public function getGlobalOptionDefaultValues();
}

View File

@@ -1,127 +0,0 @@
<?php
namespace Consolidation\Config\Inject;
use Consolidation\Config\ConfigInterface;
use Consolidation\Config\Util\ConfigFallback;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputOption;
class ConfigForCommand implements EventSubscriberInterface
{
protected $config;
protected $application;
public function __construct(ConfigInterface $config)
{
$this->config = $config;
}
public function setApplication(Application $application)
{
$this->application = $application;
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents()
{
return [ConsoleEvents::COMMAND => 'injectConfiguration'];
}
/**
* Before a Console command runs, inject configuration settings
* for this command into the default value of the options of
* this command.
*
* @param \Symfony\Component\Console\Event\ConsoleCommandEvent $event
*/
public function injectConfiguration(ConsoleCommandEvent $event)
{
$command = $event->getCommand();
$this->injectConfigurationForGlobalOptions($event->getInput());
$this->injectConfigurationForCommand($command, $event->getInput());
$targetOfHelpCommand = $this->getHelpCommandTarget($command, $event->getInput());
if ($targetOfHelpCommand) {
$this->injectConfigurationForCommand($targetOfHelpCommand, $event->getInput());
}
}
protected function injectConfigurationForGlobalOptions($input)
{
if (!$this->application) {
return;
}
$configGroup = new ConfigFallback($this->config, 'options');
$definition = $this->application->getDefinition();
$options = $definition->getOptions();
return $this->injectConfigGroupIntoOptions($configGroup, $options, $input);
}
protected function injectConfigurationForCommand($command, $input)
{
$commandName = $command->getName();
$commandName = str_replace(':', '.', $commandName);
$configGroup = new ConfigFallback($this->config, $commandName, 'command.', '.options.');
$definition = $command->getDefinition();
$options = $definition->getOptions();
return $this->injectConfigGroupIntoOptions($configGroup, $options, $input);
}
protected function injectConfigGroupIntoOptions($configGroup, $options, $input)
{
foreach ($options as $option => $inputOption) {
$key = str_replace('.', '-', $option);
$value = $configGroup->get($key);
if ($value !== null) {
if (is_bool($value) && ($value == true)) {
$input->setOption($key, $value);
} elseif ($inputOption->acceptValue()) {
$inputOption->setDefault($value);
}
}
}
}
protected function getHelpCommandTarget($command, $input)
{
if (($command->getName() != 'help') || (!isset($this->application))) {
return false;
}
$this->fixInputForSymfony2($command, $input);
// Symfony Console helpfully swaps 'command_name' and 'command'
// depending on whether the user entered `help foo` or `--help foo`.
// One of these is always `help`, and the other is the command we
// are actually interested in.
$nameOfCommandToDescribe = $input->getArgument('command_name');
if ($nameOfCommandToDescribe == 'help') {
$nameOfCommandToDescribe = $input->getArgument('command');
}
return $this->application->find($nameOfCommandToDescribe);
}
protected function fixInputForSymfony2($command, $input)
{
// Symfony 3.x prepares $input for us; Symfony 2.x, on the other
// hand, passes it in prior to binding with the command definition,
// so we have to go to a little extra work. It may be inadvisable
// to do these steps for commands other than 'help'.
if (!$input->hasArgument('command_name')) {
$command->ignoreValidationErrors();
$command->mergeApplicationDefinition();
$input->bind($command->getDefinition());
}
}
}

View File

@@ -1,47 +0,0 @@
<?php
namespace Consolidation\Config\Inject;
use Consolidation\Config\Util\ConfigMerge;
/**
* Given an object that contains configuration methods, inject any
* configuration found in the configuration file.
*
* The proper use for this method is to call setter methods of the
* provided object. Using configuration to call methods that do work
* is an abuse of this mechanism.
*/
class ConfigForSetters
{
protected $config;
public function __construct($config, $group, $prefix = '', $postfix = '')
{
if (!empty($group) && empty($postfix)) {
$postfix = '.';
}
$this->config = new ConfigMerge($config, $group, $prefix, $postfix);
}
public function apply($object, $configurationKey)
{
$settings = $this->config->get($configurationKey);
foreach ($settings as $setterMethod => $args) {
$fn = [$object, $setterMethod];
if (is_callable($fn)) {
$result = call_user_func_array($fn, (array)$args);
// We require that $fn must only be used with setter methods.
// Setter methods are required to always return $this so that
// they may be chained. We will therefore throw an exception
// for any setter that returns something else.
if ($result != $object) {
$methodDescription = get_class($object) . "::$setterMethod";
$propertyDescription = $this->config->describe($configurationKey);
throw new \Exception("$methodDescription did not return '\$this' when processing $propertyDescription.");
}
}
}
}
}

View File

@@ -1,35 +0,0 @@
<?php
namespace Consolidation\Config\Loader;
/**
* Load configuration files.
*/
abstract class ConfigLoader implements ConfigLoaderInterface
{
protected $config = [];
protected $source = '';
public function getSourceName()
{
return $this->source;
}
protected function setSourceName($source)
{
$this->source = $source;
return $this;
}
public function export()
{
return $this->config;
}
public function keys()
{
return array_keys($this->config);
}
abstract public function load($path);
}

View File

@@ -1,29 +0,0 @@
<?php
namespace Consolidation\Config\Loader;
/**
* Load configuration files, and fill in any property values that
* need to be expanded.
*/
interface ConfigLoaderInterface
{
/**
* Convert loaded configuration into a simple php nested array.
*
* @return array
*/
public function export();
/**
* Return the top-level keys in the exported data.
*
* @return array
*/
public function keys();
/**
* Return a symbolic name for this configuration loader instance.
*/
public function getSourceName();
}

Some files were not shown because too many files have changed in this diff Show More