├── .gitignore
├── Tests
├── Functions
│ ├── ArgumentsNumberLimitUnitTest.inc
│ ├── CyclomaticComplexityUnitTest.inc
│ ├── FunctionSizeUnitTest.inc
│ ├── FunctionSizeUnitTest.php
│ ├── ArgumentsNumberLimitUnitTest.php
│ └── CyclomaticComplexityUnitTest.php
└── Classes
│ ├── ClassSizeUnitTest.inc
│ └── ClassSizeUnitTest.php
├── phpunit.xml.dist
├── ruleset.xml
├── composer.json
├── LICENSE
├── Sniffs
├── Classes
│ ├── AbstractClassSniff.php
│ └── ClassSizeSniff.php
└── Functions
│ ├── AbstractFunctionSniff.php
│ ├── ArgumentsNumberLimitSniff.php
│ ├── CyclomaticComplexitySniff.php
│ └── FunctionSizeSniff.php
├── README.md
└── composer.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor/
2 | phpunit.xml
3 |
4 |
--------------------------------------------------------------------------------
/Tests/Functions/ArgumentsNumberLimitUnitTest.inc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ./Tests/
6 |
7 |
8 |
9 |
10 |
11 |
12 | ./Sniffs/
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/ruleset.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | The Secl coding standard for Maintainability support. Provided by SECL Group.
4 | */Tests/*
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "secl-group/phpcs-secl-standard",
3 | "keywords": [
4 | "phpcs",
5 | "Secl",
6 | "coding standard",
7 | "maintainability"
8 | ],
9 | "homepage": "https://github.com/SECL-Group/phpcs-secl-standard",
10 | "description": "A PHP_CodeSniffer maintainability standard for Secl Group applications",
11 | "license": "BSD",
12 | "require": {
13 | "squizlabs/php_codesniffer": "~2.0"
14 | },
15 | "require-dev": {
16 | "phpunit/phpunit": "~4"
17 | },
18 | "minimum-stability": "dev",
19 | "prefer-stable": true,
20 | "target-dir": "secl-group/phpcs/Secl",
21 | "extra": {
22 | "branch-alias": {
23 | "dev-master": "1.0-dev"
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Tests/Functions/CyclomaticComplexityUnitTest.inc:
--------------------------------------------------------------------------------
1 |
10 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE BSD License
11 | * @version GIT: master
12 | * @link https://github.com/SECL/phpcs-secl-standard
13 | */
14 |
15 | /**
16 | * Unit test class for the ClassSize sniff.
17 | *
18 | * A sniff unit test checks a .inc file for expected violations of a single
19 | * coding standard. Expected errors and warnings are stored in this class.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @link https://github.com/SECL/phpcs-secl-standard
28 | */
29 | class Secl_Tests_Classes_ClassSizeUnitTest extends AbstractSniffUnitTest
30 | {
31 | /**
32 | * Returns the lines where errors should occur.
33 | *
34 | * The key of the array should represent the line number and the value
35 | * should represent the number of errors that should occur on that line.
36 | *
37 | * @return array(int => int)
38 | */
39 | public function getErrorList()
40 | {
41 | return array(
42 | 21 => 1,
43 | );
44 | }
45 |
46 | /**
47 | * Returns the lines where warnings should occur.
48 | *
49 | * The key of the array should represent the line number and the value
50 | * should represent the number of warnings that should occur on that line.
51 | *
52 | * @return array(int => int)
53 | */
54 | public function getWarningList()
55 | {
56 | return array();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Tests/Functions/FunctionSizeUnitTest.php:
--------------------------------------------------------------------------------
1 |
10 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE BSD License
11 | * @version GIT: master
12 | * @link https://github.com/SECL/phpcs-secl-standard
13 | */
14 |
15 | /**
16 | * Unit test class for the FunctionSize sniff.
17 | *
18 | * A sniff unit test checks a .inc file for expected violations of a single
19 | * coding standard. Expected errors and warnings are stored in this class.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @link https://github.com/SECL/phpcs-secl-standard
28 | */
29 | class Secl_Tests_Functions_FunctionSizeUnitTest extends AbstractSniffUnitTest
30 | {
31 | /**
32 | * Returns the lines where errors should occur.
33 | *
34 | * The key of the array should represent the line number and the value
35 | * should represent the number of errors that should occur on that line.
36 | *
37 | * @return array(int => int)
38 | */
39 | public function getErrorList()
40 | {
41 | return array(
42 | 23 => 1,
43 | );
44 | }
45 |
46 | /**
47 | * Returns the lines where warnings should occur.
48 | *
49 | * The key of the array should represent the line number and the value
50 | * should represent the number of warnings that should occur on that line.
51 | *
52 | * @return array(int => int)
53 | */
54 | public function getWarningList()
55 | {
56 | return array();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Tests/Functions/ArgumentsNumberLimitUnitTest.php:
--------------------------------------------------------------------------------
1 |
10 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE BSD License
11 | * @version GIT: master
12 | * @link https://github.com/SECL/phpcs-secl-standard
13 | */
14 |
15 | /**
16 | * Unit test class for the Arguments Number Limit sniff.
17 | *
18 | * A sniff unit test checks a .inc file for expected violations of a single
19 | * coding standard. Expected errors and warnings are stored in this class.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @link https://github.com/SECL/phpcs-secl-standard
28 | */
29 | class Secl_Tests_Functions_ArgumentsNumberLimitUnitTest extends AbstractSniffUnitTest
30 | {
31 | /**
32 | * Returns the lines where errors should occur.
33 | *
34 | * The key of the array should represent the line number and the value
35 | * should represent the number of errors that should occur on that line.
36 | *
37 | * @return array(int => int)
38 | */
39 | public function getErrorList()
40 | {
41 | return array(
42 | 8 => 1,
43 | );
44 | }
45 |
46 | /**
47 | * Returns the lines where warnings should occur.
48 | *
49 | * The key of the array should represent the line number and the value
50 | * should represent the number of warnings that should occur on that line.
51 | *
52 | * @return array(int => int)
53 | */
54 | public function getWarningList()
55 | {
56 | return array();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Tests/Functions/CyclomaticComplexityUnitTest.php:
--------------------------------------------------------------------------------
1 |
10 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE BSD License
11 | * @version GIT: master
12 | * @link https://github.com/SECL/phpcs-secl-standard
13 | */
14 |
15 | /**
16 | * Unit test class for the Function Complexity sniff.
17 | *
18 | * A sniff unit test checks a .inc file for expected violations of a single
19 | * coding standard. Expected errors and warnings are stored in this class.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @link https://github.com/SECL/phpcs-secl-standard
28 | */
29 | class Secl_Tests_Functions_CyclomaticComplexityUnitTest extends AbstractSniffUnitTest
30 | {
31 | /**
32 | * Returns the lines where errors should occur.
33 | *
34 | * The key of the array should represent the line number and the value
35 | * should represent the number of errors that should occur on that line.
36 | *
37 | * @return array(int => int)
38 | */
39 | public function getErrorList()
40 | {
41 | return array(
42 | 21 => 1,
43 | );
44 |
45 | }
46 |
47 | /**
48 | * Returns the lines where warnings should occur.
49 | *
50 | * The key of the array should represent the line number and the value
51 | * should represent the number of warnings that should occur on that line.
52 | *
53 | * @return array(int => int)
54 | */
55 | public function getWarningList()
56 | {
57 | return array();
58 |
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Sniffs/Classes/AbstractClassSniff.php:
--------------------------------------------------------------------------------
1 |
10 | * @copyright 1994-2016 Secl Group
11 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
12 | * BSD License
13 | * @link http://pear.php.net/package/PHP_CodeSniffer
14 | */
15 |
16 | /**
17 | * Abstract Class for Test.
18 | *
19 | * Aggregate some common function.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @version Release: 1.0.1
28 | * @link http://pear.php.net/package/PHP_CodeSniffer
29 | */
30 | abstract class Secl_Sniffs_Classes_AbstractClassSniff implements PHP_CodeSniffer_Sniff
31 | {
32 | /**
33 | * Returns an array of tokens this test wants to listen for.
34 | *
35 | * @return array
36 | */
37 | public function register()
38 | {
39 | return array(
40 | T_CLASS,
41 | T_INTERFACE,
42 | T_TRAIT,
43 | );
44 | }//end register()
45 |
46 | /**
47 | * Processes this test, when one of its tokens is encountered.
48 | *
49 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
50 | * @param int $stackPtr The position of the current token
51 | * in the stack passed in $tokens.
52 | *
53 | * @return void
54 | */
55 | abstract public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr);
56 |
57 | /**
58 | * @param int $stackPtr
59 | * @param array $tokens
60 | *
61 | * @return bool
62 | */
63 | public function isValidClassType($stackPtr, $tokens)
64 | {
65 | if (isset($tokens[$stackPtr]['scope_opener']) === false) {
66 | return false;
67 | }
68 |
69 | return true;
70 | }
71 |
72 | /**
73 | * @param PHP_CodeSniffer_File $phpcsFile
74 | * @param int $stackPtr
75 | * @param array $tokens
76 | *
77 | * @return PHP_CodeSniffer_File
78 | */
79 | protected function setParseErrorWarning($phpcsFile, $stackPtr, $tokens)
80 | {
81 | $error = 'Possible parse error: %s missing opening or closing brace';
82 | $data = array($tokens[$stackPtr]['content']);
83 | $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $data);
84 | }
85 | }//end class
86 |
--------------------------------------------------------------------------------
/Sniffs/Functions/AbstractFunctionSniff.php:
--------------------------------------------------------------------------------
1 |
10 | * @copyright 1994-2016 Secl Group
11 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
12 | * BSD License
13 | * @link http://pear.php.net/package/PHP_CodeSniffer
14 | */
15 |
16 | /**
17 | * Function Parent for Test.
18 | *
19 | * Aggregate some common function.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @version Release: 1.0.0
28 | * @link http://pear.php.net/package/PHP_CodeSniffer
29 | */
30 | abstract class Secl_Sniffs_Functions_AbstractFunctionSniff implements
31 | PHP_CodeSniffer_Sniff
32 | {
33 | /**
34 | * Should this sniff check function braces?
35 | *
36 | * @var bool
37 | */
38 | public $checkFunctions = true;
39 |
40 | /**
41 | * Registers the tokens that this sniff wants to listen for.
42 | *
43 | * @return array
44 | */
45 | public function register()
46 | {
47 | return array(
48 | T_FUNCTION,
49 | );
50 | }//end register()
51 |
52 | /**
53 | * Processes this test, when one of its tokens is encountered.
54 | *
55 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
56 | * @param int $stackPtr The position of the current token
57 | * in the stack passed in $tokens.
58 | *
59 | * @return void
60 | */
61 | abstract public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr);
62 |
63 | /**
64 | * @param int $stackPtr
65 | * @param array $tokens
66 | *
67 | * @return boolean
68 | */
69 | public function isValidFunctionType($stackPtr, $tokens)
70 | {
71 | if (isset($tokens[$stackPtr]['scope_opener']) === false) {
72 | return false;
73 | }
74 |
75 | if ($this->isFunction($stackPtr, $tokens)) {
76 | return false;
77 | }
78 |
79 | return true;
80 | }
81 |
82 | /**
83 | * @param int $stackPtr
84 | * @param array $tokens
85 | *
86 | * @return bool
87 | */
88 | private function isFunction($stackPtr, $tokens)
89 | {
90 | return $tokens[$stackPtr]['code'] === T_FUNCTION
91 | && (bool) $this->checkFunctions === false;
92 | }
93 | }//end class
94 |
--------------------------------------------------------------------------------
/Sniffs/Functions/ArgumentsNumberLimitSniff.php:
--------------------------------------------------------------------------------
1 |
10 | * @copyright 1994-2016 Secl Group
11 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
12 | * BSD License
13 | * @link http://pear.php.net/package/PHP_CodeSniffer
14 | */
15 |
16 | /**
17 | * Arguments Number Limit Test.
18 | *
19 | * Checks maximum arguments number of the function.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @version Release: 1.0.0
28 | * @link http://pear.php.net/package/PHP_CodeSniffer
29 | */
30 | class Secl_Sniffs_Functions_ArgumentsNumberLimitSniff extends
31 | Secl_Sniffs_Functions_AbstractFunctionSniff
32 | {
33 | /**
34 | * Maximum arguments number of the function
35 | */
36 | const ARGUMENTS_NUMBER_LIMIT = 4;
37 |
38 | /**
39 | * Processes this test, when one of its tokens is encountered.
40 | *
41 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
42 | * @param int $stackPtr The position of the current token
43 | * in the stack passed in $tokens.
44 | *
45 | * @return void
46 | */
47 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
48 | {
49 | $tokens = $phpcsFile->getTokens();
50 |
51 | if (!$this->isValidFunctionType($stackPtr, $tokens)) {
52 | return;
53 | }
54 |
55 | $argumentsCount = $this->countNeedles($stackPtr, $tokens);
56 |
57 | if ($argumentsCount > self::ARGUMENTS_NUMBER_LIMIT) {
58 | $functionName = $phpcsFile->getDeclarationName($stackPtr);
59 | $errorData = [$functionName, self::ARGUMENTS_NUMBER_LIMIT];
60 | $error = 'The %s() function must not have more than %d arguments!';
61 | $phpcsFile->addError($error, $stackPtr, 'ArgumentsLimit', $errorData);
62 | }
63 | }
64 |
65 | /**
66 | * @param int $stackPtr
67 | * @param array $tokens
68 | *
69 | * @return int
70 | */
71 | private function countNeedles($stackPtr, $tokens)
72 | {
73 | $argStart = $tokens[$stackPtr]['parenthesis_opener'];
74 | $argEnd = $tokens[$stackPtr]['parenthesis_closer'];
75 |
76 | $argumentsCount = 0;
77 |
78 | for ($i = $argStart + 1; $i < $argEnd; $i++) {
79 | if ($tokens[$i]['code'] === T_VARIABLE) {
80 | $argumentsCount++;
81 | }
82 | }
83 |
84 | return $argumentsCount;
85 | }
86 | }//end class
87 |
--------------------------------------------------------------------------------
/Sniffs/Classes/ClassSizeSniff.php:
--------------------------------------------------------------------------------
1 |
10 | * @copyright 1994-2016 Secl Group
11 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
12 | * BSD License
13 | * @link http://pear.php.net/package/PHP_CodeSniffer
14 | */
15 |
16 | /**
17 | * Class Size Test.
18 | *
19 | * Checks maximum function number of the class.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @version Release: 1.0.1
28 | * @link http://pear.php.net/package/PHP_CodeSniffer
29 | */
30 | class Secl_Sniffs_Classes_ClassSizeSniff extends Secl_Sniffs_Classes_AbstractClassSniff
31 | {
32 | /**
33 | * Maximum lines number of the function
34 | */
35 | const CLASS_MAX_FUNCTION_NUMBER = 15;
36 |
37 | /**
38 | * Processes this test, when one of its tokens is encountered.
39 | *
40 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
41 | * @param int $stackPtr The position of the current token
42 | * in the stack passed in $tokens.
43 | *
44 | * @return void
45 | */
46 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
47 | {
48 | $tokens = $phpcsFile->getTokens();
49 |
50 | if (!$this->isValidClassType($stackPtr, $tokens)) {
51 | $this->setParseErrorWarning($phpcsFile, $stackPtr, $tokens);
52 |
53 | return;
54 | }
55 |
56 | $functionsCount = $this->countNeedles($stackPtr, $tokens);
57 |
58 | if ($functionsCount > self::CLASS_MAX_FUNCTION_NUMBER) {
59 | $errorMessage = 'The number of functions in the %s class must not be more than %d!';
60 | $errorType = 'ClassSize';
61 | $className = $phpcsFile->getDeclarationName($stackPtr);
62 | $errorData = [$className, self::CLASS_MAX_FUNCTION_NUMBER];
63 | $phpcsFile->addError($errorMessage, $stackPtr, $errorType, $errorData);
64 | }
65 | }
66 |
67 | /**
68 | * @param int $stackPtr
69 | * @param array $tokens
70 | *
71 | * @return int
72 | */
73 | private function countNeedles($stackPtr, $tokens)
74 | {
75 | $openingBrace = $tokens[$stackPtr]['scope_opener'];
76 | $closingBrace = $tokens[$stackPtr]['scope_closer'];
77 |
78 | $functionsCount = 0;
79 |
80 | for ($i = $openingBrace + 1; $i < $closingBrace - 1; $i++) {
81 | if ('T_FUNCTION' === $tokens[$i]['type']) {
82 | $functionsCount++;
83 | }
84 | }
85 |
86 | return $functionsCount;
87 | }
88 | }//end class
89 |
--------------------------------------------------------------------------------
/Sniffs/Functions/CyclomaticComplexitySniff.php:
--------------------------------------------------------------------------------
1 |
10 | * @copyright 1994-2016 Secl Group
11 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
12 | * BSD License
13 | * @link http://pear.php.net/package/PHP_CodeSniffer
14 | */
15 |
16 | /**
17 | * Cyclomatic Complexity Test.
18 | *
19 | * Checks maximum lines number of the function.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @version Release: 1.0.0
28 | * @link http://pear.php.net/package/PHP_CodeSniffer
29 | */
30 | class Secl_Sniffs_Functions_CyclomaticComplexitySniff extends
31 | Secl_Sniffs_Functions_AbstractFunctionSniff
32 | {
33 | /**
34 | * Cyclomatic Complexity limit for the function
35 | * The number of branch points plus one
36 | */
37 | const COMPLEXITY_LIMIT = 5;
38 |
39 | /**
40 | * Branch points
41 | */
42 | const BRANCH_POINTS
43 | = [
44 | T_IF, // if
45 | T_CASE, // case
46 | T_WHILE, // while
47 | T_FOR, // for
48 | T_FOREACH, // foreach
49 | T_CATCH, // catch
50 | T_BOOLEAN_AND, // &&
51 | T_BOOLEAN_OR, // ||
52 | T_INLINE_THEN, // ?
53 | ];
54 |
55 | /**
56 | * Processes this test, when one of its tokens is encountered.
57 | *
58 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
59 | * @param int $stackPtr The position of the current token
60 | * in the stack passed in $tokens.
61 | *
62 | * @return void
63 | */
64 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
65 | {
66 | $tokens = $phpcsFile->getTokens();
67 |
68 | if (!$this->isValidFunctionType($stackPtr, $tokens)) {
69 | return;
70 | }
71 |
72 | $cyclomaticComplexity = $this->countNeedles($stackPtr, $tokens);
73 |
74 | if ($cyclomaticComplexity > self::COMPLEXITY_LIMIT) {
75 | $functionName = $phpcsFile->getDeclarationName($stackPtr);
76 | $errorData = [$functionName, self::COMPLEXITY_LIMIT];
77 | $error = 'The %s() function must not have the complexity more than %d!';
78 | $phpcsFile->addError($error, $stackPtr, 'CyclomaticComplexity', $errorData);
79 | }
80 | }
81 |
82 | /**
83 | * @param int $stackPtr
84 | * @param array $tokens
85 | *
86 | * @return int
87 | */
88 | private function countNeedles($stackPtr, $tokens)
89 | {
90 | $openingBrace = $tokens[$stackPtr]['scope_opener'];
91 | $closingBrace = $tokens[$stackPtr]['scope_closer'];
92 |
93 | $branchPointCount = 0;
94 |
95 | for ($i = $openingBrace + 1; $i < $closingBrace - 1; $i++) {
96 | $code = $tokens[$i]['code'];
97 |
98 | if (in_array($code, self::BRANCH_POINTS)) {
99 | $branchPointCount++;
100 | }
101 | }
102 |
103 | $cyclomaticComplexity = $branchPointCount + 1;
104 |
105 | return $cyclomaticComplexity;
106 | }
107 | }//end class
108 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Secl Group PHP_CodeSniffer Maintainability Coding Standard
2 |
3 | PHP_CodeSniffer maintainability standard for [Secl Group applications](http://seclgroup.com/).
4 |
5 | Everyone is probably familiar with a situation in which, with the development of a project, the implementation of new functions becomes more time-consuming and expensive. And, unfortunately, it often happens that the price starts to significantly outweigh the possible benefit that can be obtained from the implementation of the function.
6 |
7 | Having analyzed a number of projects, the experts of Software Improvement Group (SIG) developed a set of simple principles and rules with the help of which you can make the situation much better. Some of these principles can be easily controlled in automatic mode. For this purpose, special software was created for such languages as Java and C#. We propose the easiest implementation of automatic control for PHP development. In this option, we have carried out control of these basic principles:
8 | - A function should be no longer than 15 lines of code;
9 | - The cyclomatic complexity of a function should not exceed 5;
10 | - Functions should not take more than 4 input arguments.
11 |
12 | Once such control has been implemented in our company, the quality of development has significantly improved. Therefore, the code has become much easier to understand and maintain.
13 |
14 | We propose you a basic option of the solution for automatic control. The standard can be easily integrated into a version control system. We recommend using it combined with other stylistic standards of your company.
15 |
16 | This project was based on the principles provided by Joost Visser in his book [Building Maintainable Software](https://github.com/oreillymedia/building_maintainable_software) (ISBN print: 978-1-4919-5352-5, ISBN eBook: 978-1-4919-5348-8). For more information about software maintainability, we recommend that you read the book.
17 |
18 | ## Installation
19 |
20 | This coding standard can be installed via composer or used in your PHP_CodeSniffer install over PECL. Both ways are described below, but the way of using composer is recommended:
21 |
22 | ### Using Composer
23 |
24 | 1. Install The standard as a dependency of your composer based project (It will install a composer version of PHP_CodeSniffer as a dependency):
25 |
26 | $ php composer.phar require --dev secl-group/phpcs-secl-standard:~1.0.0
27 |
28 | 2. Profit!
29 |
30 | $ bin/phpcs --standard=vendor/secl-group/phpcs-secl-standard/secl-group/phpcs/Secl --extensions=php src/
31 |
32 | ### Using PEAR
33 |
34 | 1. Install PHP_CodeSniffer:
35 |
36 | $ pear install PHP_CodeSniffer
37 |
38 | 2. Find your PEAR directory:
39 |
40 | $ pear config-show | grep php_dir
41 |
42 | 3. Copy, symlink or check out this repository to `Secl` folder inside the phpcs `Standards` directory:
43 |
44 | $ cd /path/to/pear/PHP/CodeSniffer/Standards
45 | $ git clone https://github.com/SECL-Group/phpcs-secl-standard Secl
46 |
47 | 4. Set Secl as your default coding standard if you want:
48 |
49 | $ phpcs --config-set default_standard Secl
50 |
51 | 5. Profit!
52 |
53 | $ phpcs --standard=Secl --extensions=php src/
54 |
55 | # Contributing
56 |
57 | If you do contribute code to these Sniffs, please make sure it conforms to the PEAR coding standards
58 | and that the Secl-coding-standard unit tests are still passed.
59 |
60 | To check the coding standard, run from the Secl-coding-standard source root:
61 |
62 | $ phpcs --ignore=*/tests/* --standard=Secl . -n
63 |
64 | # For unit-tests
65 |
66 | $ composer install
67 | $ cp phpunit.xml.dist phpunit.xml
68 |
69 | Make links to a vendor directory, use only absolute paths – otherwise, CORRECT the LINKS!
70 |
71 | $ mkdir /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl
72 | ln -sf /path/to/phpcs/Sniffs /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl/Sniffs
73 | ln -sf /path/to/phpcs/Tests /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl/Tests
74 | ln -sf /path/to/phpcs/ruleset.xml /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl/ruleset.xml
75 | ln -sf /path/to/phpcs/phpunit.xml /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl/phpunit.xml
76 |
77 | The unit tests are run from the Secl directory which includes the vendor directory.
78 |
79 | $ vendor/bin/phpunit -c phpunit.xml vendor/squizlabs/php_codesniffer/tests/AllTests.php
80 |
--------------------------------------------------------------------------------
/Sniffs/Functions/FunctionSizeSniff.php:
--------------------------------------------------------------------------------
1 |
10 | * @copyright 1994-2016 Secl Group
11 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
12 | * BSD License
13 | * @link http://pear.php.net/package/PHP_CodeSniffer
14 | */
15 |
16 | /**
17 | * Function Size Test.
18 | *
19 | * Checks maximum lines number of the function.
20 | *
21 | * @category PHP
22 | * @package PHP_CodeSniffer_Secl
23 | * @author HSN
24 | * @copyright 1994-2016 Secl Group
25 | * @license https://github.com/SECL/phpcs-secl-standard/blob/master/LICENSE
26 | * BSD License
27 | * @version Release: 1.0.0
28 | * @link http://pear.php.net/package/PHP_CodeSniffer
29 | */
30 | class Secl_Sniffs_Functions_FunctionSizeSniff extends Secl_Sniffs_Functions_AbstractFunctionSniff
31 | {
32 | /**
33 | * Maximum lines number of the function
34 | */
35 | const FUNCTION_MAX_SIZE = 15;
36 |
37 | /**
38 | * Processes this test, when one of its tokens is encountered.
39 | *
40 | * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
41 | * @param int $stackPtr The position of the current token
42 | * in the stack passed in $tokens.
43 | *
44 | * @return void
45 | */
46 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
47 | {
48 | $tokens = $phpcsFile->getTokens();
49 |
50 | if (!$this->isValidFunctionType($stackPtr, $tokens)) {
51 | return;
52 | }
53 |
54 | $functionEffectiveSize = $this->countNeedles($stackPtr, $tokens);
55 |
56 | if ($functionEffectiveSize > self::FUNCTION_MAX_SIZE) {
57 | $errorMessage = 'The %s() function must not be larger than %d lines!';
58 | $errorType = 'FunctionSize';
59 | $functionName = $phpcsFile->getDeclarationName($stackPtr);
60 | $errorData = [$functionName, self::FUNCTION_MAX_SIZE];
61 | $phpcsFile->addError($errorMessage, $stackPtr, $errorType, $errorData);
62 | }
63 | }
64 |
65 | /**
66 | * @param int $stackPtr
67 | * @param array $tokens
68 | *
69 | * @return int
70 | */
71 | private function countNeedles($stackPtr, $tokens)
72 | {
73 | $openingBrace = $tokens[$stackPtr]['scope_opener'];
74 | $firstFunctionLine = $tokens[$tokens[$stackPtr]['parenthesis_closer']]['line'];
75 | $closingBrace = $tokens[$stackPtr]['scope_closer'];
76 | $endFunctionLine = $tokens[$closingBrace]['line'];
77 | $functionTotalSize = $endFunctionLine - $firstFunctionLine;
78 |
79 | $negligibleLineCount = $this->insideFunctionLoop($tokens, $openingBrace, $closingBrace);
80 |
81 | $functionEffectiveSize = ($functionTotalSize - $negligibleLineCount);
82 |
83 | return $functionEffectiveSize;
84 | }
85 |
86 | /**
87 | * @param array $tokens
88 | * @param int $openingBrace
89 | * @param int $closingBrace
90 | *
91 | * @return int
92 | */
93 | private function insideFunctionLoop($tokens, $openingBrace, $closingBrace)
94 | {
95 | $negligibleLineCount = 0;
96 |
97 | for ($i = $openingBrace + 1; $i < $closingBrace - 1; $i++) {
98 | list($lineCountForIteration, $i) = $this->negligibleLineCountForIteration($tokens, $i);
99 | $negligibleLineCount = $negligibleLineCount + $lineCountForIteration;
100 | }
101 |
102 | return $negligibleLineCount;
103 | }
104 |
105 | /**
106 | * @param array $tokens
107 | * @param int $iterationIndex
108 | *
109 | * @return array
110 | */
111 | private function negligibleLineCountForIteration($tokens, $iterationIndex)
112 | {
113 | $negligibleLineCount = 0;
114 |
115 | list($docCommentLineCount, $iterationIndex) = $this->docComment($tokens, $iterationIndex);
116 |
117 | if ($docCommentLineCount) {
118 | $negligibleLineCount = $negligibleLineCount + $docCommentLineCount;
119 | } else {
120 | $negligibleLineCount = $negligibleLineCount + $this->emptyString($tokens, $iterationIndex);
121 | $negligibleLineCount = $negligibleLineCount + $this->inlineComment($tokens, $iterationIndex);
122 | }
123 |
124 | return [$negligibleLineCount, $iterationIndex];
125 | }
126 |
127 | /**
128 | * @param array $tokens
129 | * @param int $iterationIndex
130 | *
131 | * @return array
132 | */
133 | private function docComment($tokens, $iterationIndex)
134 | {
135 | if ($tokens[$iterationIndex]['code'] === T_DOC_COMMENT_OPEN_TAG) {
136 | $commentOpenerLine = $tokens[$iterationIndex]['line'];
137 | $commentCloserToken = $tokens[$iterationIndex]['comment_closer'];
138 | $commentCloserLine = $tokens[$commentCloserToken]['line'];
139 | $negligibleLineCount = $commentCloserLine - $commentOpenerLine + 1;
140 |
141 | return [$negligibleLineCount, $commentCloserToken];
142 | }
143 |
144 | return [0, $iterationIndex];
145 | }
146 |
147 | /**
148 | * @param array $tokens
149 | * @param int $iterationIndex
150 | *
151 | * @return int
152 | */
153 | private function inlineComment($tokens, $iterationIndex)
154 | {
155 | if (T_COMMENT === $tokens[$iterationIndex]['code']) {
156 | return 1;
157 | }
158 |
159 | return 0;
160 | }
161 |
162 | /**
163 | * @param array $tokens
164 | * @param int $iterationIndex
165 | *
166 | * @return int
167 | */
168 | private function emptyString($tokens, $iterationIndex)
169 | {
170 | if ($tokens[$iterationIndex]['column'] === 1 && $tokens[$iterationIndex]['length'] === 0) {
171 | return 1;
172 | }
173 |
174 | return 0;
175 | }
176 | }//end class
177 |
--------------------------------------------------------------------------------
/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_readme": [
3 | "This file locks the dependencies of your project to a known state",
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 | "This file is @generated automatically"
6 | ],
7 | "hash": "4b1c094777243a67d8cadcf42200fa84",
8 | "content-hash": "637d85ba453ede9973e70290daf5e30b",
9 | "packages": [
10 | {
11 | "name": "squizlabs/php_codesniffer",
12 | "version": "2.7.0",
13 | "source": {
14 | "type": "git",
15 | "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
16 | "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed"
17 | },
18 | "dist": {
19 | "type": "zip",
20 | "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
21 | "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
22 | "shasum": ""
23 | },
24 | "require": {
25 | "ext-simplexml": "*",
26 | "ext-tokenizer": "*",
27 | "ext-xmlwriter": "*",
28 | "php": ">=5.1.2"
29 | },
30 | "require-dev": {
31 | "phpunit/phpunit": "~4.0"
32 | },
33 | "bin": [
34 | "scripts/phpcs",
35 | "scripts/phpcbf"
36 | ],
37 | "type": "library",
38 | "extra": {
39 | "branch-alias": {
40 | "dev-master": "2.x-dev"
41 | }
42 | },
43 | "autoload": {
44 | "classmap": [
45 | "CodeSniffer.php",
46 | "CodeSniffer/CLI.php",
47 | "CodeSniffer/Exception.php",
48 | "CodeSniffer/File.php",
49 | "CodeSniffer/Fixer.php",
50 | "CodeSniffer/Report.php",
51 | "CodeSniffer/Reporting.php",
52 | "CodeSniffer/Sniff.php",
53 | "CodeSniffer/Tokens.php",
54 | "CodeSniffer/Reports/",
55 | "CodeSniffer/Tokenizers/",
56 | "CodeSniffer/DocGenerators/",
57 | "CodeSniffer/Standards/AbstractPatternSniff.php",
58 | "CodeSniffer/Standards/AbstractScopeSniff.php",
59 | "CodeSniffer/Standards/AbstractVariableSniff.php",
60 | "CodeSniffer/Standards/IncorrectPatternException.php",
61 | "CodeSniffer/Standards/Generic/Sniffs/",
62 | "CodeSniffer/Standards/MySource/Sniffs/",
63 | "CodeSniffer/Standards/PEAR/Sniffs/",
64 | "CodeSniffer/Standards/PSR1/Sniffs/",
65 | "CodeSniffer/Standards/PSR2/Sniffs/",
66 | "CodeSniffer/Standards/Squiz/Sniffs/",
67 | "CodeSniffer/Standards/Zend/Sniffs/"
68 | ]
69 | },
70 | "notification-url": "https://packagist.org/downloads/",
71 | "license": [
72 | "BSD-3-Clause"
73 | ],
74 | "authors": [
75 | {
76 | "name": "Greg Sherwood",
77 | "role": "lead"
78 | }
79 | ],
80 | "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
81 | "homepage": "http://www.squizlabs.com/php-codesniffer",
82 | "keywords": [
83 | "phpcs",
84 | "standards"
85 | ],
86 | "time": "2016-09-01 23:53:02"
87 | }
88 | ],
89 | "packages-dev": [
90 | {
91 | "name": "doctrine/instantiator",
92 | "version": "1.0.5",
93 | "source": {
94 | "type": "git",
95 | "url": "https://github.com/doctrine/instantiator.git",
96 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
97 | },
98 | "dist": {
99 | "type": "zip",
100 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
101 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
102 | "shasum": ""
103 | },
104 | "require": {
105 | "php": ">=5.3,<8.0-DEV"
106 | },
107 | "require-dev": {
108 | "athletic/athletic": "~0.1.8",
109 | "ext-pdo": "*",
110 | "ext-phar": "*",
111 | "phpunit/phpunit": "~4.0",
112 | "squizlabs/php_codesniffer": "~2.0"
113 | },
114 | "type": "library",
115 | "extra": {
116 | "branch-alias": {
117 | "dev-master": "1.0.x-dev"
118 | }
119 | },
120 | "autoload": {
121 | "psr-4": {
122 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
123 | }
124 | },
125 | "notification-url": "https://packagist.org/downloads/",
126 | "license": [
127 | "MIT"
128 | ],
129 | "authors": [
130 | {
131 | "name": "Marco Pivetta",
132 | "email": "ocramius@gmail.com",
133 | "homepage": "http://ocramius.github.com/"
134 | }
135 | ],
136 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
137 | "homepage": "https://github.com/doctrine/instantiator",
138 | "keywords": [
139 | "constructor",
140 | "instantiate"
141 | ],
142 | "time": "2015-06-14 21:17:01"
143 | },
144 | {
145 | "name": "phpdocumentor/reflection-common",
146 | "version": "1.0",
147 | "source": {
148 | "type": "git",
149 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
150 | "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
151 | },
152 | "dist": {
153 | "type": "zip",
154 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
155 | "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
156 | "shasum": ""
157 | },
158 | "require": {
159 | "php": ">=5.5"
160 | },
161 | "require-dev": {
162 | "phpunit/phpunit": "^4.6"
163 | },
164 | "type": "library",
165 | "extra": {
166 | "branch-alias": {
167 | "dev-master": "1.0.x-dev"
168 | }
169 | },
170 | "autoload": {
171 | "psr-4": {
172 | "phpDocumentor\\Reflection\\": [
173 | "src"
174 | ]
175 | }
176 | },
177 | "notification-url": "https://packagist.org/downloads/",
178 | "license": [
179 | "MIT"
180 | ],
181 | "authors": [
182 | {
183 | "name": "Jaap van Otterdijk",
184 | "email": "opensource@ijaap.nl"
185 | }
186 | ],
187 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
188 | "homepage": "http://www.phpdoc.org",
189 | "keywords": [
190 | "FQSEN",
191 | "phpDocumentor",
192 | "phpdoc",
193 | "reflection",
194 | "static analysis"
195 | ],
196 | "time": "2015-12-27 11:43:31"
197 | },
198 | {
199 | "name": "phpdocumentor/reflection-docblock",
200 | "version": "3.1.0",
201 | "source": {
202 | "type": "git",
203 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
204 | "reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
205 | },
206 | "dist": {
207 | "type": "zip",
208 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
209 | "reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
210 | "shasum": ""
211 | },
212 | "require": {
213 | "php": ">=5.5",
214 | "phpdocumentor/reflection-common": "^1.0@dev",
215 | "phpdocumentor/type-resolver": "^0.2.0",
216 | "webmozart/assert": "^1.0"
217 | },
218 | "require-dev": {
219 | "mockery/mockery": "^0.9.4",
220 | "phpunit/phpunit": "^4.4"
221 | },
222 | "type": "library",
223 | "autoload": {
224 | "psr-4": {
225 | "phpDocumentor\\Reflection\\": [
226 | "src/"
227 | ]
228 | }
229 | },
230 | "notification-url": "https://packagist.org/downloads/",
231 | "license": [
232 | "MIT"
233 | ],
234 | "authors": [
235 | {
236 | "name": "Mike van Riel",
237 | "email": "me@mikevanriel.com"
238 | }
239 | ],
240 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
241 | "time": "2016-06-10 09:48:41"
242 | },
243 | {
244 | "name": "phpdocumentor/type-resolver",
245 | "version": "0.2",
246 | "source": {
247 | "type": "git",
248 | "url": "https://github.com/phpDocumentor/TypeResolver.git",
249 | "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
250 | },
251 | "dist": {
252 | "type": "zip",
253 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
254 | "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
255 | "shasum": ""
256 | },
257 | "require": {
258 | "php": ">=5.5",
259 | "phpdocumentor/reflection-common": "^1.0"
260 | },
261 | "require-dev": {
262 | "mockery/mockery": "^0.9.4",
263 | "phpunit/phpunit": "^5.2||^4.8.24"
264 | },
265 | "type": "library",
266 | "extra": {
267 | "branch-alias": {
268 | "dev-master": "1.0.x-dev"
269 | }
270 | },
271 | "autoload": {
272 | "psr-4": {
273 | "phpDocumentor\\Reflection\\": [
274 | "src/"
275 | ]
276 | }
277 | },
278 | "notification-url": "https://packagist.org/downloads/",
279 | "license": [
280 | "MIT"
281 | ],
282 | "authors": [
283 | {
284 | "name": "Mike van Riel",
285 | "email": "me@mikevanriel.com"
286 | }
287 | ],
288 | "time": "2016-06-10 07:14:17"
289 | },
290 | {
291 | "name": "phpspec/prophecy",
292 | "version": "v1.6.1",
293 | "source": {
294 | "type": "git",
295 | "url": "https://github.com/phpspec/prophecy.git",
296 | "reference": "58a8137754bc24b25740d4281399a4a3596058e0"
297 | },
298 | "dist": {
299 | "type": "zip",
300 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0",
301 | "reference": "58a8137754bc24b25740d4281399a4a3596058e0",
302 | "shasum": ""
303 | },
304 | "require": {
305 | "doctrine/instantiator": "^1.0.2",
306 | "php": "^5.3|^7.0",
307 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
308 | "sebastian/comparator": "^1.1",
309 | "sebastian/recursion-context": "^1.0"
310 | },
311 | "require-dev": {
312 | "phpspec/phpspec": "^2.0"
313 | },
314 | "type": "library",
315 | "extra": {
316 | "branch-alias": {
317 | "dev-master": "1.6.x-dev"
318 | }
319 | },
320 | "autoload": {
321 | "psr-0": {
322 | "Prophecy\\": "src/"
323 | }
324 | },
325 | "notification-url": "https://packagist.org/downloads/",
326 | "license": [
327 | "MIT"
328 | ],
329 | "authors": [
330 | {
331 | "name": "Konstantin Kudryashov",
332 | "email": "ever.zet@gmail.com",
333 | "homepage": "http://everzet.com"
334 | },
335 | {
336 | "name": "Marcello Duarte",
337 | "email": "marcello.duarte@gmail.com"
338 | }
339 | ],
340 | "description": "Highly opinionated mocking framework for PHP 5.3+",
341 | "homepage": "https://github.com/phpspec/prophecy",
342 | "keywords": [
343 | "Double",
344 | "Dummy",
345 | "fake",
346 | "mock",
347 | "spy",
348 | "stub"
349 | ],
350 | "time": "2016-06-07 08:13:47"
351 | },
352 | {
353 | "name": "phpunit/php-code-coverage",
354 | "version": "2.2.4",
355 | "source": {
356 | "type": "git",
357 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
358 | "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
359 | },
360 | "dist": {
361 | "type": "zip",
362 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
363 | "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
364 | "shasum": ""
365 | },
366 | "require": {
367 | "php": ">=5.3.3",
368 | "phpunit/php-file-iterator": "~1.3",
369 | "phpunit/php-text-template": "~1.2",
370 | "phpunit/php-token-stream": "~1.3",
371 | "sebastian/environment": "^1.3.2",
372 | "sebastian/version": "~1.0"
373 | },
374 | "require-dev": {
375 | "ext-xdebug": ">=2.1.4",
376 | "phpunit/phpunit": "~4"
377 | },
378 | "suggest": {
379 | "ext-dom": "*",
380 | "ext-xdebug": ">=2.2.1",
381 | "ext-xmlwriter": "*"
382 | },
383 | "type": "library",
384 | "extra": {
385 | "branch-alias": {
386 | "dev-master": "2.2.x-dev"
387 | }
388 | },
389 | "autoload": {
390 | "classmap": [
391 | "src/"
392 | ]
393 | },
394 | "notification-url": "https://packagist.org/downloads/",
395 | "license": [
396 | "BSD-3-Clause"
397 | ],
398 | "authors": [
399 | {
400 | "name": "Sebastian Bergmann",
401 | "email": "sb@sebastian-bergmann.de",
402 | "role": "lead"
403 | }
404 | ],
405 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
406 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
407 | "keywords": [
408 | "coverage",
409 | "testing",
410 | "xunit"
411 | ],
412 | "time": "2015-10-06 15:47:00"
413 | },
414 | {
415 | "name": "phpunit/php-file-iterator",
416 | "version": "1.4.1",
417 | "source": {
418 | "type": "git",
419 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
420 | "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
421 | },
422 | "dist": {
423 | "type": "zip",
424 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
425 | "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
426 | "shasum": ""
427 | },
428 | "require": {
429 | "php": ">=5.3.3"
430 | },
431 | "type": "library",
432 | "extra": {
433 | "branch-alias": {
434 | "dev-master": "1.4.x-dev"
435 | }
436 | },
437 | "autoload": {
438 | "classmap": [
439 | "src/"
440 | ]
441 | },
442 | "notification-url": "https://packagist.org/downloads/",
443 | "license": [
444 | "BSD-3-Clause"
445 | ],
446 | "authors": [
447 | {
448 | "name": "Sebastian Bergmann",
449 | "email": "sb@sebastian-bergmann.de",
450 | "role": "lead"
451 | }
452 | ],
453 | "description": "FilterIterator implementation that filters files based on a list of suffixes.",
454 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
455 | "keywords": [
456 | "filesystem",
457 | "iterator"
458 | ],
459 | "time": "2015-06-21 13:08:43"
460 | },
461 | {
462 | "name": "phpunit/php-text-template",
463 | "version": "1.2.1",
464 | "source": {
465 | "type": "git",
466 | "url": "https://github.com/sebastianbergmann/php-text-template.git",
467 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
468 | },
469 | "dist": {
470 | "type": "zip",
471 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
472 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
473 | "shasum": ""
474 | },
475 | "require": {
476 | "php": ">=5.3.3"
477 | },
478 | "type": "library",
479 | "autoload": {
480 | "classmap": [
481 | "src/"
482 | ]
483 | },
484 | "notification-url": "https://packagist.org/downloads/",
485 | "license": [
486 | "BSD-3-Clause"
487 | ],
488 | "authors": [
489 | {
490 | "name": "Sebastian Bergmann",
491 | "email": "sebastian@phpunit.de",
492 | "role": "lead"
493 | }
494 | ],
495 | "description": "Simple template engine.",
496 | "homepage": "https://github.com/sebastianbergmann/php-text-template/",
497 | "keywords": [
498 | "template"
499 | ],
500 | "time": "2015-06-21 13:50:34"
501 | },
502 | {
503 | "name": "phpunit/php-timer",
504 | "version": "1.0.8",
505 | "source": {
506 | "type": "git",
507 | "url": "https://github.com/sebastianbergmann/php-timer.git",
508 | "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
509 | },
510 | "dist": {
511 | "type": "zip",
512 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
513 | "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
514 | "shasum": ""
515 | },
516 | "require": {
517 | "php": ">=5.3.3"
518 | },
519 | "require-dev": {
520 | "phpunit/phpunit": "~4|~5"
521 | },
522 | "type": "library",
523 | "autoload": {
524 | "classmap": [
525 | "src/"
526 | ]
527 | },
528 | "notification-url": "https://packagist.org/downloads/",
529 | "license": [
530 | "BSD-3-Clause"
531 | ],
532 | "authors": [
533 | {
534 | "name": "Sebastian Bergmann",
535 | "email": "sb@sebastian-bergmann.de",
536 | "role": "lead"
537 | }
538 | ],
539 | "description": "Utility class for timing",
540 | "homepage": "https://github.com/sebastianbergmann/php-timer/",
541 | "keywords": [
542 | "timer"
543 | ],
544 | "time": "2016-05-12 18:03:57"
545 | },
546 | {
547 | "name": "phpunit/php-token-stream",
548 | "version": "1.4.8",
549 | "source": {
550 | "type": "git",
551 | "url": "https://github.com/sebastianbergmann/php-token-stream.git",
552 | "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
553 | },
554 | "dist": {
555 | "type": "zip",
556 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
557 | "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
558 | "shasum": ""
559 | },
560 | "require": {
561 | "ext-tokenizer": "*",
562 | "php": ">=5.3.3"
563 | },
564 | "require-dev": {
565 | "phpunit/phpunit": "~4.2"
566 | },
567 | "type": "library",
568 | "extra": {
569 | "branch-alias": {
570 | "dev-master": "1.4-dev"
571 | }
572 | },
573 | "autoload": {
574 | "classmap": [
575 | "src/"
576 | ]
577 | },
578 | "notification-url": "https://packagist.org/downloads/",
579 | "license": [
580 | "BSD-3-Clause"
581 | ],
582 | "authors": [
583 | {
584 | "name": "Sebastian Bergmann",
585 | "email": "sebastian@phpunit.de"
586 | }
587 | ],
588 | "description": "Wrapper around PHP's tokenizer extension.",
589 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
590 | "keywords": [
591 | "tokenizer"
592 | ],
593 | "time": "2015-09-15 10:49:45"
594 | },
595 | {
596 | "name": "phpunit/phpunit",
597 | "version": "4.8.27",
598 | "source": {
599 | "type": "git",
600 | "url": "https://github.com/sebastianbergmann/phpunit.git",
601 | "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90"
602 | },
603 | "dist": {
604 | "type": "zip",
605 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90",
606 | "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90",
607 | "shasum": ""
608 | },
609 | "require": {
610 | "ext-dom": "*",
611 | "ext-json": "*",
612 | "ext-pcre": "*",
613 | "ext-reflection": "*",
614 | "ext-spl": "*",
615 | "php": ">=5.3.3",
616 | "phpspec/prophecy": "^1.3.1",
617 | "phpunit/php-code-coverage": "~2.1",
618 | "phpunit/php-file-iterator": "~1.4",
619 | "phpunit/php-text-template": "~1.2",
620 | "phpunit/php-timer": "^1.0.6",
621 | "phpunit/phpunit-mock-objects": "~2.3",
622 | "sebastian/comparator": "~1.1",
623 | "sebastian/diff": "~1.2",
624 | "sebastian/environment": "~1.3",
625 | "sebastian/exporter": "~1.2",
626 | "sebastian/global-state": "~1.0",
627 | "sebastian/version": "~1.0",
628 | "symfony/yaml": "~2.1|~3.0"
629 | },
630 | "suggest": {
631 | "phpunit/php-invoker": "~1.1"
632 | },
633 | "bin": [
634 | "phpunit"
635 | ],
636 | "type": "library",
637 | "extra": {
638 | "branch-alias": {
639 | "dev-master": "4.8.x-dev"
640 | }
641 | },
642 | "autoload": {
643 | "classmap": [
644 | "src/"
645 | ]
646 | },
647 | "notification-url": "https://packagist.org/downloads/",
648 | "license": [
649 | "BSD-3-Clause"
650 | ],
651 | "authors": [
652 | {
653 | "name": "Sebastian Bergmann",
654 | "email": "sebastian@phpunit.de",
655 | "role": "lead"
656 | }
657 | ],
658 | "description": "The PHP Unit Testing framework.",
659 | "homepage": "https://phpunit.de/",
660 | "keywords": [
661 | "phpunit",
662 | "testing",
663 | "xunit"
664 | ],
665 | "time": "2016-07-21 06:48:14"
666 | },
667 | {
668 | "name": "phpunit/phpunit-mock-objects",
669 | "version": "2.3.8",
670 | "source": {
671 | "type": "git",
672 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
673 | "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
674 | },
675 | "dist": {
676 | "type": "zip",
677 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
678 | "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
679 | "shasum": ""
680 | },
681 | "require": {
682 | "doctrine/instantiator": "^1.0.2",
683 | "php": ">=5.3.3",
684 | "phpunit/php-text-template": "~1.2",
685 | "sebastian/exporter": "~1.2"
686 | },
687 | "require-dev": {
688 | "phpunit/phpunit": "~4.4"
689 | },
690 | "suggest": {
691 | "ext-soap": "*"
692 | },
693 | "type": "library",
694 | "extra": {
695 | "branch-alias": {
696 | "dev-master": "2.3.x-dev"
697 | }
698 | },
699 | "autoload": {
700 | "classmap": [
701 | "src/"
702 | ]
703 | },
704 | "notification-url": "https://packagist.org/downloads/",
705 | "license": [
706 | "BSD-3-Clause"
707 | ],
708 | "authors": [
709 | {
710 | "name": "Sebastian Bergmann",
711 | "email": "sb@sebastian-bergmann.de",
712 | "role": "lead"
713 | }
714 | ],
715 | "description": "Mock Object library for PHPUnit",
716 | "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
717 | "keywords": [
718 | "mock",
719 | "xunit"
720 | ],
721 | "time": "2015-10-02 06:51:40"
722 | },
723 | {
724 | "name": "sebastian/comparator",
725 | "version": "1.2.0",
726 | "source": {
727 | "type": "git",
728 | "url": "https://github.com/sebastianbergmann/comparator.git",
729 | "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
730 | },
731 | "dist": {
732 | "type": "zip",
733 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
734 | "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
735 | "shasum": ""
736 | },
737 | "require": {
738 | "php": ">=5.3.3",
739 | "sebastian/diff": "~1.2",
740 | "sebastian/exporter": "~1.2"
741 | },
742 | "require-dev": {
743 | "phpunit/phpunit": "~4.4"
744 | },
745 | "type": "library",
746 | "extra": {
747 | "branch-alias": {
748 | "dev-master": "1.2.x-dev"
749 | }
750 | },
751 | "autoload": {
752 | "classmap": [
753 | "src/"
754 | ]
755 | },
756 | "notification-url": "https://packagist.org/downloads/",
757 | "license": [
758 | "BSD-3-Clause"
759 | ],
760 | "authors": [
761 | {
762 | "name": "Jeff Welch",
763 | "email": "whatthejeff@gmail.com"
764 | },
765 | {
766 | "name": "Volker Dusch",
767 | "email": "github@wallbash.com"
768 | },
769 | {
770 | "name": "Bernhard Schussek",
771 | "email": "bschussek@2bepublished.at"
772 | },
773 | {
774 | "name": "Sebastian Bergmann",
775 | "email": "sebastian@phpunit.de"
776 | }
777 | ],
778 | "description": "Provides the functionality to compare PHP values for equality",
779 | "homepage": "http://www.github.com/sebastianbergmann/comparator",
780 | "keywords": [
781 | "comparator",
782 | "compare",
783 | "equality"
784 | ],
785 | "time": "2015-07-26 15:48:44"
786 | },
787 | {
788 | "name": "sebastian/diff",
789 | "version": "1.4.1",
790 | "source": {
791 | "type": "git",
792 | "url": "https://github.com/sebastianbergmann/diff.git",
793 | "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
794 | },
795 | "dist": {
796 | "type": "zip",
797 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
798 | "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
799 | "shasum": ""
800 | },
801 | "require": {
802 | "php": ">=5.3.3"
803 | },
804 | "require-dev": {
805 | "phpunit/phpunit": "~4.8"
806 | },
807 | "type": "library",
808 | "extra": {
809 | "branch-alias": {
810 | "dev-master": "1.4-dev"
811 | }
812 | },
813 | "autoload": {
814 | "classmap": [
815 | "src/"
816 | ]
817 | },
818 | "notification-url": "https://packagist.org/downloads/",
819 | "license": [
820 | "BSD-3-Clause"
821 | ],
822 | "authors": [
823 | {
824 | "name": "Kore Nordmann",
825 | "email": "mail@kore-nordmann.de"
826 | },
827 | {
828 | "name": "Sebastian Bergmann",
829 | "email": "sebastian@phpunit.de"
830 | }
831 | ],
832 | "description": "Diff implementation",
833 | "homepage": "https://github.com/sebastianbergmann/diff",
834 | "keywords": [
835 | "diff"
836 | ],
837 | "time": "2015-12-08 07:14:41"
838 | },
839 | {
840 | "name": "sebastian/environment",
841 | "version": "1.3.8",
842 | "source": {
843 | "type": "git",
844 | "url": "https://github.com/sebastianbergmann/environment.git",
845 | "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
846 | },
847 | "dist": {
848 | "type": "zip",
849 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
850 | "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
851 | "shasum": ""
852 | },
853 | "require": {
854 | "php": "^5.3.3 || ^7.0"
855 | },
856 | "require-dev": {
857 | "phpunit/phpunit": "^4.8 || ^5.0"
858 | },
859 | "type": "library",
860 | "extra": {
861 | "branch-alias": {
862 | "dev-master": "1.3.x-dev"
863 | }
864 | },
865 | "autoload": {
866 | "classmap": [
867 | "src/"
868 | ]
869 | },
870 | "notification-url": "https://packagist.org/downloads/",
871 | "license": [
872 | "BSD-3-Clause"
873 | ],
874 | "authors": [
875 | {
876 | "name": "Sebastian Bergmann",
877 | "email": "sebastian@phpunit.de"
878 | }
879 | ],
880 | "description": "Provides functionality to handle HHVM/PHP environments",
881 | "homepage": "http://www.github.com/sebastianbergmann/environment",
882 | "keywords": [
883 | "Xdebug",
884 | "environment",
885 | "hhvm"
886 | ],
887 | "time": "2016-08-18 05:49:44"
888 | },
889 | {
890 | "name": "sebastian/exporter",
891 | "version": "1.2.2",
892 | "source": {
893 | "type": "git",
894 | "url": "https://github.com/sebastianbergmann/exporter.git",
895 | "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
896 | },
897 | "dist": {
898 | "type": "zip",
899 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
900 | "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
901 | "shasum": ""
902 | },
903 | "require": {
904 | "php": ">=5.3.3",
905 | "sebastian/recursion-context": "~1.0"
906 | },
907 | "require-dev": {
908 | "ext-mbstring": "*",
909 | "phpunit/phpunit": "~4.4"
910 | },
911 | "type": "library",
912 | "extra": {
913 | "branch-alias": {
914 | "dev-master": "1.3.x-dev"
915 | }
916 | },
917 | "autoload": {
918 | "classmap": [
919 | "src/"
920 | ]
921 | },
922 | "notification-url": "https://packagist.org/downloads/",
923 | "license": [
924 | "BSD-3-Clause"
925 | ],
926 | "authors": [
927 | {
928 | "name": "Jeff Welch",
929 | "email": "whatthejeff@gmail.com"
930 | },
931 | {
932 | "name": "Volker Dusch",
933 | "email": "github@wallbash.com"
934 | },
935 | {
936 | "name": "Bernhard Schussek",
937 | "email": "bschussek@2bepublished.at"
938 | },
939 | {
940 | "name": "Sebastian Bergmann",
941 | "email": "sebastian@phpunit.de"
942 | },
943 | {
944 | "name": "Adam Harvey",
945 | "email": "aharvey@php.net"
946 | }
947 | ],
948 | "description": "Provides the functionality to export PHP variables for visualization",
949 | "homepage": "http://www.github.com/sebastianbergmann/exporter",
950 | "keywords": [
951 | "export",
952 | "exporter"
953 | ],
954 | "time": "2016-06-17 09:04:28"
955 | },
956 | {
957 | "name": "sebastian/global-state",
958 | "version": "1.1.1",
959 | "source": {
960 | "type": "git",
961 | "url": "https://github.com/sebastianbergmann/global-state.git",
962 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
963 | },
964 | "dist": {
965 | "type": "zip",
966 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
967 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
968 | "shasum": ""
969 | },
970 | "require": {
971 | "php": ">=5.3.3"
972 | },
973 | "require-dev": {
974 | "phpunit/phpunit": "~4.2"
975 | },
976 | "suggest": {
977 | "ext-uopz": "*"
978 | },
979 | "type": "library",
980 | "extra": {
981 | "branch-alias": {
982 | "dev-master": "1.0-dev"
983 | }
984 | },
985 | "autoload": {
986 | "classmap": [
987 | "src/"
988 | ]
989 | },
990 | "notification-url": "https://packagist.org/downloads/",
991 | "license": [
992 | "BSD-3-Clause"
993 | ],
994 | "authors": [
995 | {
996 | "name": "Sebastian Bergmann",
997 | "email": "sebastian@phpunit.de"
998 | }
999 | ],
1000 | "description": "Snapshotting of global state",
1001 | "homepage": "http://www.github.com/sebastianbergmann/global-state",
1002 | "keywords": [
1003 | "global state"
1004 | ],
1005 | "time": "2015-10-12 03:26:01"
1006 | },
1007 | {
1008 | "name": "sebastian/recursion-context",
1009 | "version": "1.0.2",
1010 | "source": {
1011 | "type": "git",
1012 | "url": "https://github.com/sebastianbergmann/recursion-context.git",
1013 | "reference": "913401df809e99e4f47b27cdd781f4a258d58791"
1014 | },
1015 | "dist": {
1016 | "type": "zip",
1017 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
1018 | "reference": "913401df809e99e4f47b27cdd781f4a258d58791",
1019 | "shasum": ""
1020 | },
1021 | "require": {
1022 | "php": ">=5.3.3"
1023 | },
1024 | "require-dev": {
1025 | "phpunit/phpunit": "~4.4"
1026 | },
1027 | "type": "library",
1028 | "extra": {
1029 | "branch-alias": {
1030 | "dev-master": "1.0.x-dev"
1031 | }
1032 | },
1033 | "autoload": {
1034 | "classmap": [
1035 | "src/"
1036 | ]
1037 | },
1038 | "notification-url": "https://packagist.org/downloads/",
1039 | "license": [
1040 | "BSD-3-Clause"
1041 | ],
1042 | "authors": [
1043 | {
1044 | "name": "Jeff Welch",
1045 | "email": "whatthejeff@gmail.com"
1046 | },
1047 | {
1048 | "name": "Sebastian Bergmann",
1049 | "email": "sebastian@phpunit.de"
1050 | },
1051 | {
1052 | "name": "Adam Harvey",
1053 | "email": "aharvey@php.net"
1054 | }
1055 | ],
1056 | "description": "Provides functionality to recursively process PHP variables",
1057 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
1058 | "time": "2015-11-11 19:50:13"
1059 | },
1060 | {
1061 | "name": "sebastian/version",
1062 | "version": "1.0.6",
1063 | "source": {
1064 | "type": "git",
1065 | "url": "https://github.com/sebastianbergmann/version.git",
1066 | "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
1067 | },
1068 | "dist": {
1069 | "type": "zip",
1070 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
1071 | "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
1072 | "shasum": ""
1073 | },
1074 | "type": "library",
1075 | "autoload": {
1076 | "classmap": [
1077 | "src/"
1078 | ]
1079 | },
1080 | "notification-url": "https://packagist.org/downloads/",
1081 | "license": [
1082 | "BSD-3-Clause"
1083 | ],
1084 | "authors": [
1085 | {
1086 | "name": "Sebastian Bergmann",
1087 | "email": "sebastian@phpunit.de",
1088 | "role": "lead"
1089 | }
1090 | ],
1091 | "description": "Library that helps with managing the version number of Git-hosted PHP projects",
1092 | "homepage": "https://github.com/sebastianbergmann/version",
1093 | "time": "2015-06-21 13:59:46"
1094 | },
1095 | {
1096 | "name": "symfony/yaml",
1097 | "version": "v3.1.4",
1098 | "source": {
1099 | "type": "git",
1100 | "url": "https://github.com/symfony/yaml.git",
1101 | "reference": "f291ed25eb1435bddbe8a96caaef16469c2a092d"
1102 | },
1103 | "dist": {
1104 | "type": "zip",
1105 | "url": "https://api.github.com/repos/symfony/yaml/zipball/f291ed25eb1435bddbe8a96caaef16469c2a092d",
1106 | "reference": "f291ed25eb1435bddbe8a96caaef16469c2a092d",
1107 | "shasum": ""
1108 | },
1109 | "require": {
1110 | "php": ">=5.5.9"
1111 | },
1112 | "type": "library",
1113 | "extra": {
1114 | "branch-alias": {
1115 | "dev-master": "3.1-dev"
1116 | }
1117 | },
1118 | "autoload": {
1119 | "psr-4": {
1120 | "Symfony\\Component\\Yaml\\": ""
1121 | },
1122 | "exclude-from-classmap": [
1123 | "/Tests/"
1124 | ]
1125 | },
1126 | "notification-url": "https://packagist.org/downloads/",
1127 | "license": [
1128 | "MIT"
1129 | ],
1130 | "authors": [
1131 | {
1132 | "name": "Fabien Potencier",
1133 | "email": "fabien@symfony.com"
1134 | },
1135 | {
1136 | "name": "Symfony Community",
1137 | "homepage": "https://symfony.com/contributors"
1138 | }
1139 | ],
1140 | "description": "Symfony Yaml Component",
1141 | "homepage": "https://symfony.com",
1142 | "time": "2016-09-02 02:12:52"
1143 | },
1144 | {
1145 | "name": "webmozart/assert",
1146 | "version": "1.1.0",
1147 | "source": {
1148 | "type": "git",
1149 | "url": "https://github.com/webmozart/assert.git",
1150 | "reference": "bb2d123231c095735130cc8f6d31385a44c7b308"
1151 | },
1152 | "dist": {
1153 | "type": "zip",
1154 | "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308",
1155 | "reference": "bb2d123231c095735130cc8f6d31385a44c7b308",
1156 | "shasum": ""
1157 | },
1158 | "require": {
1159 | "php": "^5.3.3|^7.0"
1160 | },
1161 | "require-dev": {
1162 | "phpunit/phpunit": "^4.6",
1163 | "sebastian/version": "^1.0.1"
1164 | },
1165 | "type": "library",
1166 | "extra": {
1167 | "branch-alias": {
1168 | "dev-master": "1.2-dev"
1169 | }
1170 | },
1171 | "autoload": {
1172 | "psr-4": {
1173 | "Webmozart\\Assert\\": "src/"
1174 | }
1175 | },
1176 | "notification-url": "https://packagist.org/downloads/",
1177 | "license": [
1178 | "MIT"
1179 | ],
1180 | "authors": [
1181 | {
1182 | "name": "Bernhard Schussek",
1183 | "email": "bschussek@gmail.com"
1184 | }
1185 | ],
1186 | "description": "Assertions to validate method input/output with nice error messages.",
1187 | "keywords": [
1188 | "assert",
1189 | "check",
1190 | "validate"
1191 | ],
1192 | "time": "2016-08-09 15:02:57"
1193 | }
1194 | ],
1195 | "aliases": [],
1196 | "minimum-stability": "dev",
1197 | "stability-flags": [],
1198 | "prefer-stable": true,
1199 | "prefer-lowest": false,
1200 | "platform": [],
1201 | "platform-dev": []
1202 | }
1203 |
--------------------------------------------------------------------------------