Version Description
- Fixed Composer issue.
Download this release
Release Info
Developer | wpengine |
Plugin | PHP Compatibility Checker |
Version | 1.4.3 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.3
- readme.txt +4 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_namespaces.php +0 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +298 -0
- vendor/composer/installed.json +79 -169
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Classes/OpeningBraceSameLineStandard.xml +28 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/BacktickOperatorStandard.xml +7 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/DisallowAlternativePHPTagsStandard.xml +7 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php +141 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php +63 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php +269 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/AbstractComplexVersionSniff.php +130 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/AbstractNewFeatureSniff.php +106 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/AbstractRemovedFeatureSniff.php +146 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/ComplexVersionInterface.php +75 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/Sniffs/PHP/VariableVariablesSniff.php +110 -0
- vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/phpcs.xml +22 -0
- vendor/wimg/php-compatibility/AbstractComplexVersionSniff.php +130 -0
- vendor/wimg/php-compatibility/AbstractNewFeatureSniff.php +106 -0
- vendor/wimg/php-compatibility/AbstractRemovedFeatureSniff.php +146 -0
- vendor/wimg/php-compatibility/ComplexVersionInterface.php +75 -0
- vendor/wimg/php-compatibility/Sniffs/PHP/VariableVariablesSniff.php +110 -0
- vendor/wimg/php-compatibility/phpcs.xml +22 -0
- wpengine-phpcompat.php +1 -1
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wpengine, octalmage, stevenkword, Taylor4484, pross, jcross
|
|
3 |
Tags: php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.7.2
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -114,6 +114,9 @@ To disclose security issues for this plugin please email WordPress@wpengine.com
|
|
114 |
|
115 |
== Changelog ==
|
116 |
|
|
|
|
|
|
|
117 |
= 1.4.1 =
|
118 |
- Updated PHP_CodeSniffer to fix a security advisory.
|
119 |
- Whitelisted a number of plugins.
|
3 |
Tags: php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.7.2
|
6 |
+
Stable tag: 1.4.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
114 |
|
115 |
== Changelog ==
|
116 |
|
117 |
+
= 1.4.3 =
|
118 |
+
- Fixed Composer issue.
|
119 |
+
|
120 |
= 1.4.1 =
|
121 |
- Updated PHP_CodeSniffer to fix a security advisory.
|
122 |
- Whitelisted a number of plugins.
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitb3bb3714c09974954f460653a49ed706::getLoader();
|
vendor/composer/autoload_namespaces.php
CHANGED
@@ -7,5 +7,4 @@ $baseDir = dirname($vendorDir);
|
|
7 |
|
8 |
return array(
|
9 |
'SimplyAdmire\\ComposerPlugins' => array($vendorDir . '/simplyadmire/composer-plugins'),
|
10 |
-
'' => array($vendorDir . '/neronmoon/scriptsdev/src'),
|
11 |
);
|
7 |
|
8 |
return array(
|
9 |
'SimplyAdmire\\ComposerPlugins' => array($vendorDir . '/simplyadmire/composer-plugins'),
|
|
|
10 |
);
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit2a60b911d59581b77bf10bbf0aa9965f
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitb3bb3714c09974954f460653a49ed706
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitb3bb3714c09974954f460653a49ed706', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitb3bb3714c09974954f460653a49ed706', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitb3bb3714c09974954f460653a49ed706::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
ADDED
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_static.php @generated by Composer
|
4 |
+
|
5 |
+
namespace Composer\Autoload;
|
6 |
+
|
7 |
+
class ComposerStaticInitb3bb3714c09974954f460653a49ed706
|
8 |
+
{
|
9 |
+
public static $prefixLengthsPsr4 = array (
|
10 |
+
'P' =>
|
11 |
+
array (
|
12 |
+
'PHPCompatibility\\' => 17,
|
13 |
+
),
|
14 |
+
);
|
15 |
+
|
16 |
+
public static $prefixDirsPsr4 = array (
|
17 |
+
'PHPCompatibility\\' =>
|
18 |
+
array (
|
19 |
+
0 => __DIR__ . '/..' . '/wimg/php-compatibility',
|
20 |
+
),
|
21 |
+
);
|
22 |
+
|
23 |
+
public static $prefixesPsr0 = array (
|
24 |
+
'S' =>
|
25 |
+
array (
|
26 |
+
'SimplyAdmire\\ComposerPlugins' =>
|
27 |
+
array (
|
28 |
+
0 => __DIR__ . '/..' . '/simplyadmire/composer-plugins',
|
29 |
+
),
|
30 |
+
),
|
31 |
+
);
|
32 |
+
|
33 |
+
public static $classMap = array (
|
34 |
+
'Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php',
|
35 |
+
'Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php',
|
36 |
+
'Generic_Sniffs_Classes_DuplicateClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php',
|
37 |
+
'Generic_Sniffs_Classes_OpeningBraceSameLineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php',
|
38 |
+
'Generic_Sniffs_CodeAnalysis_EmptyStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php',
|
39 |
+
'Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php',
|
40 |
+
'Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php',
|
41 |
+
'Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php',
|
42 |
+
'Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php',
|
43 |
+
'Generic_Sniffs_CodeAnalysis_UnnecessaryFinalModifierSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php',
|
44 |
+
'Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php',
|
45 |
+
'Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php',
|
46 |
+
'Generic_Sniffs_Commenting_DocCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php',
|
47 |
+
'Generic_Sniffs_Commenting_FixmeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php',
|
48 |
+
'Generic_Sniffs_Commenting_TodoSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php',
|
49 |
+
'Generic_Sniffs_ControlStructures_InlineControlStructureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php',
|
50 |
+
'Generic_Sniffs_Debug_CSSLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php',
|
51 |
+
'Generic_Sniffs_Debug_ClosureLinterSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php',
|
52 |
+
'Generic_Sniffs_Debug_JSHintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php',
|
53 |
+
'Generic_Sniffs_Files_ByteOrderMarkSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php',
|
54 |
+
'Generic_Sniffs_Files_EndFileNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php',
|
55 |
+
'Generic_Sniffs_Files_EndFileNoNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php',
|
56 |
+
'Generic_Sniffs_Files_InlineHTMLSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php',
|
57 |
+
'Generic_Sniffs_Files_LineEndingsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php',
|
58 |
+
'Generic_Sniffs_Files_LineLengthSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php',
|
59 |
+
'Generic_Sniffs_Files_LowercasedFilenameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php',
|
60 |
+
'Generic_Sniffs_Files_OneClassPerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php',
|
61 |
+
'Generic_Sniffs_Files_OneInterfacePerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php',
|
62 |
+
'Generic_Sniffs_Files_OneTraitPerFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php',
|
63 |
+
'Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php',
|
64 |
+
'Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php',
|
65 |
+
'Generic_Sniffs_Formatting_NoSpaceAfterCastSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php',
|
66 |
+
'Generic_Sniffs_Formatting_SpaceAfterCastSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php',
|
67 |
+
'Generic_Sniffs_Formatting_SpaceAfterNotSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php',
|
68 |
+
'Generic_Sniffs_Functions_CallTimePassByReferenceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php',
|
69 |
+
'Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php',
|
70 |
+
'Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php',
|
71 |
+
'Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php',
|
72 |
+
'Generic_Sniffs_Metrics_CyclomaticComplexitySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php',
|
73 |
+
'Generic_Sniffs_Metrics_NestingLevelSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php',
|
74 |
+
'Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php',
|
75 |
+
'Generic_Sniffs_NamingConventions_ConstructorNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php',
|
76 |
+
'Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php',
|
77 |
+
'Generic_Sniffs_PHP_BacktickOperatorSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php',
|
78 |
+
'Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php',
|
79 |
+
'Generic_Sniffs_PHP_ClosingPHPTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php',
|
80 |
+
'Generic_Sniffs_PHP_DeprecatedFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php',
|
81 |
+
'Generic_Sniffs_PHP_DisallowAlternativePHPTagsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php',
|
82 |
+
'Generic_Sniffs_PHP_DisallowShortOpenTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php',
|
83 |
+
'Generic_Sniffs_PHP_ForbiddenFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php',
|
84 |
+
'Generic_Sniffs_PHP_LowerCaseConstantSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php',
|
85 |
+
'Generic_Sniffs_PHP_LowerCaseKeywordSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php',
|
86 |
+
'Generic_Sniffs_PHP_NoSilencedErrorsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php',
|
87 |
+
'Generic_Sniffs_PHP_SAPIUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php',
|
88 |
+
'Generic_Sniffs_PHP_SyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php',
|
89 |
+
'Generic_Sniffs_PHP_UpperCaseConstantSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php',
|
90 |
+
'Generic_Sniffs_Strings_UnnecessaryStringConcatSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php',
|
91 |
+
'Generic_Sniffs_VersionControl_SubversionPropertiesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php',
|
92 |
+
'Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php',
|
93 |
+
'Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php',
|
94 |
+
'Generic_Sniffs_WhiteSpace_ScopeIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php',
|
95 |
+
'MySource_Sniffs_CSS_BrowserSpecificStylesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php',
|
96 |
+
'MySource_Sniffs_Channels_DisallowSelfActionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php',
|
97 |
+
'MySource_Sniffs_Channels_IncludeOwnSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php',
|
98 |
+
'MySource_Sniffs_Channels_IncludeSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php',
|
99 |
+
'MySource_Sniffs_Channels_UnusedSystemSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php',
|
100 |
+
'MySource_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php',
|
101 |
+
'MySource_Sniffs_Debug_DebugCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php',
|
102 |
+
'MySource_Sniffs_Debug_FirebugConsoleSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php',
|
103 |
+
'MySource_Sniffs_Objects_AssignThisSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php',
|
104 |
+
'MySource_Sniffs_Objects_CreateWidgetTypeCallbackSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php',
|
105 |
+
'MySource_Sniffs_Objects_DisallowNewWidgetSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php',
|
106 |
+
'MySource_Sniffs_PHP_AjaxNullComparisonSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php',
|
107 |
+
'MySource_Sniffs_PHP_EvalObjectFactorySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php',
|
108 |
+
'MySource_Sniffs_PHP_GetRequestDataSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php',
|
109 |
+
'MySource_Sniffs_PHP_ReturnFunctionValueSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php',
|
110 |
+
'MySource_Sniffs_Strings_JoinStringsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php',
|
111 |
+
'PEAR_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php',
|
112 |
+
'PEAR_Sniffs_Commenting_ClassCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php',
|
113 |
+
'PEAR_Sniffs_Commenting_FileCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php',
|
114 |
+
'PEAR_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php',
|
115 |
+
'PEAR_Sniffs_Commenting_InlineCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php',
|
116 |
+
'PEAR_Sniffs_ControlStructures_ControlSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php',
|
117 |
+
'PEAR_Sniffs_ControlStructures_MultiLineConditionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php',
|
118 |
+
'PEAR_Sniffs_Files_IncludingFileSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php',
|
119 |
+
'PEAR_Sniffs_Formatting_MultiLineAssignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php',
|
120 |
+
'PEAR_Sniffs_Functions_FunctionCallSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php',
|
121 |
+
'PEAR_Sniffs_Functions_FunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php',
|
122 |
+
'PEAR_Sniffs_Functions_ValidDefaultValueSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php',
|
123 |
+
'PEAR_Sniffs_NamingConventions_ValidClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php',
|
124 |
+
'PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
|
125 |
+
'PEAR_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
126 |
+
'PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php',
|
127 |
+
'PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
|
128 |
+
'PEAR_Sniffs_WhiteSpace_ScopeIndentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php',
|
129 |
+
'PHP_CodeSniffer' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer.php',
|
130 |
+
'PHP_CodeSniffer_CLI' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/CLI.php',
|
131 |
+
'PHP_CodeSniffer_DocGenerators_Generator' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php',
|
132 |
+
'PHP_CodeSniffer_DocGenerators_HTML' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php',
|
133 |
+
'PHP_CodeSniffer_DocGenerators_Markdown' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php',
|
134 |
+
'PHP_CodeSniffer_DocGenerators_Text' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php',
|
135 |
+
'PHP_CodeSniffer_Exception' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Exception.php',
|
136 |
+
'PHP_CodeSniffer_File' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/File.php',
|
137 |
+
'PHP_CodeSniffer_Fixer' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Fixer.php',
|
138 |
+
'PHP_CodeSniffer_Report' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Report.php',
|
139 |
+
'PHP_CodeSniffer_Reporting' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reporting.php',
|
140 |
+
'PHP_CodeSniffer_Reports_Cbf' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php',
|
141 |
+
'PHP_CodeSniffer_Reports_Checkstyle' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php',
|
142 |
+
'PHP_CodeSniffer_Reports_Csv' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php',
|
143 |
+
'PHP_CodeSniffer_Reports_Diff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php',
|
144 |
+
'PHP_CodeSniffer_Reports_Emacs' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php',
|
145 |
+
'PHP_CodeSniffer_Reports_Full' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php',
|
146 |
+
'PHP_CodeSniffer_Reports_Gitblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php',
|
147 |
+
'PHP_CodeSniffer_Reports_Hgblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php',
|
148 |
+
'PHP_CodeSniffer_Reports_Info' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php',
|
149 |
+
'PHP_CodeSniffer_Reports_Json' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php',
|
150 |
+
'PHP_CodeSniffer_Reports_Junit' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php',
|
151 |
+
'PHP_CodeSniffer_Reports_Notifysend' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php',
|
152 |
+
'PHP_CodeSniffer_Reports_Source' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php',
|
153 |
+
'PHP_CodeSniffer_Reports_Summary' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php',
|
154 |
+
'PHP_CodeSniffer_Reports_Svnblame' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php',
|
155 |
+
'PHP_CodeSniffer_Reports_VersionControl' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php',
|
156 |
+
'PHP_CodeSniffer_Reports_Xml' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php',
|
157 |
+
'PHP_CodeSniffer_Sniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Sniff.php',
|
158 |
+
'PHP_CodeSniffer_Standards_AbstractPatternSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php',
|
159 |
+
'PHP_CodeSniffer_Standards_AbstractScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php',
|
160 |
+
'PHP_CodeSniffer_Standards_AbstractVariableSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php',
|
161 |
+
'PHP_CodeSniffer_Standards_IncorrectPatternException' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php',
|
162 |
+
'PHP_CodeSniffer_Tokenizers_CSS' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php',
|
163 |
+
'PHP_CodeSniffer_Tokenizers_Comment' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php',
|
164 |
+
'PHP_CodeSniffer_Tokenizers_JS' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php',
|
165 |
+
'PHP_CodeSniffer_Tokenizers_PHP' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php',
|
166 |
+
'PHP_CodeSniffer_Tokens' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Tokens.php',
|
167 |
+
'PSR1_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php',
|
168 |
+
'PSR1_Sniffs_Files_SideEffectsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php',
|
169 |
+
'PSR1_Sniffs_Methods_CamelCapsMethodNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php',
|
170 |
+
'PSR2_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php',
|
171 |
+
'PSR2_Sniffs_Classes_PropertyDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php',
|
172 |
+
'PSR2_Sniffs_ControlStructures_ControlStructureSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php',
|
173 |
+
'PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
|
174 |
+
'PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
|
175 |
+
'PSR2_Sniffs_Files_ClosingTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php',
|
176 |
+
'PSR2_Sniffs_Files_EndFileNewlineSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php',
|
177 |
+
'PSR2_Sniffs_Methods_FunctionCallSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php',
|
178 |
+
'PSR2_Sniffs_Methods_FunctionClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php',
|
179 |
+
'PSR2_Sniffs_Methods_MethodDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php',
|
180 |
+
'PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php',
|
181 |
+
'PSR2_Sniffs_Namespaces_UseDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php',
|
182 |
+
'Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php',
|
183 |
+
'Squiz_Sniffs_Arrays_ArrayDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php',
|
184 |
+
'Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php',
|
185 |
+
'Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php',
|
186 |
+
'Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php',
|
187 |
+
'Squiz_Sniffs_CSS_ColonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php',
|
188 |
+
'Squiz_Sniffs_CSS_ColourDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php',
|
189 |
+
'Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php',
|
190 |
+
'Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php',
|
191 |
+
'Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php',
|
192 |
+
'Squiz_Sniffs_CSS_EmptyClassDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php',
|
193 |
+
'Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php',
|
194 |
+
'Squiz_Sniffs_CSS_ForbiddenStylesSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php',
|
195 |
+
'Squiz_Sniffs_CSS_IndentationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php',
|
196 |
+
'Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php',
|
197 |
+
'Squiz_Sniffs_CSS_MissingColonSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php',
|
198 |
+
'Squiz_Sniffs_CSS_NamedColoursSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php',
|
199 |
+
'Squiz_Sniffs_CSS_OpacitySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php',
|
200 |
+
'Squiz_Sniffs_CSS_SemicolonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php',
|
201 |
+
'Squiz_Sniffs_CSS_ShorthandSizeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php',
|
202 |
+
'Squiz_Sniffs_Classes_ClassDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php',
|
203 |
+
'Squiz_Sniffs_Classes_ClassFileNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php',
|
204 |
+
'Squiz_Sniffs_Classes_DuplicatePropertySniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php',
|
205 |
+
'Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php',
|
206 |
+
'Squiz_Sniffs_Classes_SelfMemberReferenceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php',
|
207 |
+
'Squiz_Sniffs_Classes_ValidClassNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php',
|
208 |
+
'Squiz_Sniffs_Commenting_BlockCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php',
|
209 |
+
'Squiz_Sniffs_Commenting_ClassCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php',
|
210 |
+
'Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php',
|
211 |
+
'Squiz_Sniffs_Commenting_DocCommentAlignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php',
|
212 |
+
'Squiz_Sniffs_Commenting_EmptyCatchCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php',
|
213 |
+
'Squiz_Sniffs_Commenting_FileCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php',
|
214 |
+
'Squiz_Sniffs_Commenting_FunctionCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php',
|
215 |
+
'Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php',
|
216 |
+
'Squiz_Sniffs_Commenting_InlineCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php',
|
217 |
+
'Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php',
|
218 |
+
'Squiz_Sniffs_Commenting_PostStatementCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php',
|
219 |
+
'Squiz_Sniffs_Commenting_VariableCommentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php',
|
220 |
+
'Squiz_Sniffs_ControlStructures_ControlSignatureSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php',
|
221 |
+
'Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
|
222 |
+
'Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php',
|
223 |
+
'Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php',
|
224 |
+
'Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php',
|
225 |
+
'Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php',
|
226 |
+
'Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
|
227 |
+
'Squiz_Sniffs_Debug_JSLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php',
|
228 |
+
'Squiz_Sniffs_Debug_JavaScriptLintSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php',
|
229 |
+
'Squiz_Sniffs_Files_FileExtensionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php',
|
230 |
+
'Squiz_Sniffs_Formatting_OperatorBracketSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php',
|
231 |
+
'Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php',
|
232 |
+
'Squiz_Sniffs_Functions_FunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php',
|
233 |
+
'Squiz_Sniffs_Functions_FunctionDuplicateArgumentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php',
|
234 |
+
'Squiz_Sniffs_Functions_GlobalFunctionSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php',
|
235 |
+
'Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php',
|
236 |
+
'Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php',
|
237 |
+
'Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
|
238 |
+
'Squiz_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
239 |
+
'Squiz_Sniffs_Objects_DisallowObjectStringIndexSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php',
|
240 |
+
'Squiz_Sniffs_Objects_ObjectInstantiationSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php',
|
241 |
+
'Squiz_Sniffs_Objects_ObjectMemberCommaSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php',
|
242 |
+
'Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php',
|
243 |
+
'Squiz_Sniffs_Operators_IncrementDecrementUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php',
|
244 |
+
'Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php',
|
245 |
+
'Squiz_Sniffs_PHP_CommentedOutCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php',
|
246 |
+
'Squiz_Sniffs_PHP_DisallowBooleanStatementSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php',
|
247 |
+
'Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php',
|
248 |
+
'Squiz_Sniffs_PHP_DisallowInlineIfSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php',
|
249 |
+
'Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php',
|
250 |
+
'Squiz_Sniffs_PHP_DisallowObEndFlushSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php',
|
251 |
+
'Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php',
|
252 |
+
'Squiz_Sniffs_PHP_DiscouragedFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php',
|
253 |
+
'Squiz_Sniffs_PHP_EmbeddedPhpSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php',
|
254 |
+
'Squiz_Sniffs_PHP_EvalSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php',
|
255 |
+
'Squiz_Sniffs_PHP_ForbiddenFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php',
|
256 |
+
'Squiz_Sniffs_PHP_GlobalKeywordSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php',
|
257 |
+
'Squiz_Sniffs_PHP_HeredocSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php',
|
258 |
+
'Squiz_Sniffs_PHP_InnerFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php',
|
259 |
+
'Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php',
|
260 |
+
'Squiz_Sniffs_PHP_NonExecutableCodeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php',
|
261 |
+
'Squiz_Sniffs_Scope_MemberVarScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php',
|
262 |
+
'Squiz_Sniffs_Scope_MethodScopeSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php',
|
263 |
+
'Squiz_Sniffs_Scope_StaticThisUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php',
|
264 |
+
'Squiz_Sniffs_Strings_ConcatenationSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php',
|
265 |
+
'Squiz_Sniffs_Strings_DoubleQuoteUsageSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php',
|
266 |
+
'Squiz_Sniffs_Strings_EchoedStringsSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php',
|
267 |
+
'Squiz_Sniffs_WhiteSpace_CastSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php',
|
268 |
+
'Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php',
|
269 |
+
'Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php',
|
270 |
+
'Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php',
|
271 |
+
'Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php',
|
272 |
+
'Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php',
|
273 |
+
'Squiz_Sniffs_WhiteSpace_LogicalOperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php',
|
274 |
+
'Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php',
|
275 |
+
'Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php',
|
276 |
+
'Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php',
|
277 |
+
'Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php',
|
278 |
+
'Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
|
279 |
+
'Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php',
|
280 |
+
'Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php',
|
281 |
+
'Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php',
|
282 |
+
'WPEPHPCompat' => __DIR__ . '/../..' . '/src/wpephpcompat.php',
|
283 |
+
'Zend_Sniffs_Debug_CodeAnalyzerSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php',
|
284 |
+
'Zend_Sniffs_Files_ClosingTagSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php',
|
285 |
+
'Zend_Sniffs_NamingConventions_ValidVariableNameSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php',
|
286 |
+
);
|
287 |
+
|
288 |
+
public static function getInitializer(ClassLoader $loader)
|
289 |
+
{
|
290 |
+
return \Closure::bind(function () use ($loader) {
|
291 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitb3bb3714c09974954f460653a49ed706::$prefixLengthsPsr4;
|
292 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitb3bb3714c09974954f460653a49ed706::$prefixDirsPsr4;
|
293 |
+
$loader->prefixesPsr0 = ComposerStaticInitb3bb3714c09974954f460653a49ed706::$prefixesPsr0;
|
294 |
+
$loader->classMap = ComposerStaticInitb3bb3714c09974954f460653a49ed706::$classMap;
|
295 |
+
|
296 |
+
}, null, ClassLoader::class);
|
297 |
+
}
|
298 |
+
}
|
vendor/composer/installed.json
CHANGED
@@ -1,160 +1,4 @@
|
|
1 |
[
|
2 |
-
{
|
3 |
-
"name": "simplyadmire/composer-plugins",
|
4 |
-
"version": "dev-master",
|
5 |
-
"version_normalized": "9999999-dev",
|
6 |
-
"source": {
|
7 |
-
"type": "git",
|
8 |
-
"url": "https://github.com/SimplyAdmire/ComposerPlugins.git",
|
9 |
-
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19"
|
10 |
-
},
|
11 |
-
"dist": {
|
12 |
-
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/SimplyAdmire/ComposerPlugins/zipball/d8380f670694c1c2330b22591ca74adc82cffe19",
|
14 |
-
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19",
|
15 |
-
"shasum": ""
|
16 |
-
},
|
17 |
-
"require": {
|
18 |
-
"composer-plugin-api": "^1.0",
|
19 |
-
"squizlabs/php_codesniffer": "*"
|
20 |
-
},
|
21 |
-
"time": "2016-05-12T11:58:38+00:00",
|
22 |
-
"type": "composer-plugin",
|
23 |
-
"extra": {
|
24 |
-
"class": [
|
25 |
-
"SimplyAdmire\\ComposerPlugins\\PhpCodesnifferStandardInstallerPlugin"
|
26 |
-
]
|
27 |
-
},
|
28 |
-
"installation-source": "source",
|
29 |
-
"autoload": {
|
30 |
-
"psr-0": {
|
31 |
-
"SimplyAdmire\\ComposerPlugins": ""
|
32 |
-
}
|
33 |
-
},
|
34 |
-
"notification-url": "https://packagist.org/downloads/",
|
35 |
-
"license": [
|
36 |
-
"LGPL-3.0+"
|
37 |
-
],
|
38 |
-
"authors": [
|
39 |
-
{
|
40 |
-
"name": "Rens Admiraal",
|
41 |
-
"email": "rens@simplyadmire.com",
|
42 |
-
"role": "lead"
|
43 |
-
}
|
44 |
-
],
|
45 |
-
"description": "Composer plugin for installing PHP_CodeSniffer standards",
|
46 |
-
"keywords": [
|
47 |
-
"PHP_CodeSniffer",
|
48 |
-
"TYPO3 CMS",
|
49 |
-
"TYPO3 Flow",
|
50 |
-
"TYPO3 Neos",
|
51 |
-
"phpcs",
|
52 |
-
"standards",
|
53 |
-
"typo3"
|
54 |
-
],
|
55 |
-
"abandoned": true
|
56 |
-
},
|
57 |
-
{
|
58 |
-
"name": "wimg/php-compatibility",
|
59 |
-
"version": "dev-master",
|
60 |
-
"version_normalized": "9999999-dev",
|
61 |
-
"source": {
|
62 |
-
"type": "git",
|
63 |
-
"url": "https://github.com/wimg/PHPCompatibility.git",
|
64 |
-
"reference": "4853c6da08a6cb0f53029170e93c97120a6a2335"
|
65 |
-
},
|
66 |
-
"dist": {
|
67 |
-
"type": "zip",
|
68 |
-
"url": "https://api.github.com/repos/wimg/PHPCompatibility/zipball/4853c6da08a6cb0f53029170e93c97120a6a2335",
|
69 |
-
"reference": "4853c6da08a6cb0f53029170e93c97120a6a2335",
|
70 |
-
"shasum": ""
|
71 |
-
},
|
72 |
-
"require": {
|
73 |
-
"ext-tokenizer": "*",
|
74 |
-
"php": ">=5.1.2",
|
75 |
-
"squizlabs/php_codesniffer": "~2.0"
|
76 |
-
},
|
77 |
-
"require-dev": {
|
78 |
-
"satooshi/php-coveralls": "dev-master"
|
79 |
-
},
|
80 |
-
"time": "2017-01-03T20:31:50+00:00",
|
81 |
-
"type": "phpcodesniffer-standard",
|
82 |
-
"installation-source": "source",
|
83 |
-
"autoload": {
|
84 |
-
"psr-4": {
|
85 |
-
"PHPCompatibility\\": ""
|
86 |
-
}
|
87 |
-
},
|
88 |
-
"notification-url": "https://packagist.org/downloads/",
|
89 |
-
"license": [
|
90 |
-
"LGPL-3.0"
|
91 |
-
],
|
92 |
-
"authors": [
|
93 |
-
{
|
94 |
-
"name": "Wim Godden",
|
95 |
-
"role": "lead"
|
96 |
-
}
|
97 |
-
],
|
98 |
-
"description": "This is a set of sniffs for PHP_CodeSniffer that checks for PHP version compatibility.",
|
99 |
-
"homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
|
100 |
-
"keywords": [
|
101 |
-
"compatibility",
|
102 |
-
"phpcs",
|
103 |
-
"standards"
|
104 |
-
]
|
105 |
-
},
|
106 |
-
{
|
107 |
-
"name": "neronmoon/scriptsdev",
|
108 |
-
"version": "v0.1.0",
|
109 |
-
"version_normalized": "0.1.0.0",
|
110 |
-
"source": {
|
111 |
-
"type": "git",
|
112 |
-
"url": "https://github.com/neronmoon/scriptsdev.git",
|
113 |
-
"reference": "ab5cec346cab353500b957de8c7e6548961d35fe"
|
114 |
-
},
|
115 |
-
"dist": {
|
116 |
-
"type": "zip",
|
117 |
-
"url": "https://api.github.com/repos/neronmoon/scriptsdev/zipball/ab5cec346cab353500b957de8c7e6548961d35fe",
|
118 |
-
"reference": "ab5cec346cab353500b957de8c7e6548961d35fe",
|
119 |
-
"shasum": ""
|
120 |
-
},
|
121 |
-
"require": {
|
122 |
-
"composer-plugin-api": "^1.0"
|
123 |
-
},
|
124 |
-
"require-dev": {
|
125 |
-
"composer/composer": "~1.0@dev"
|
126 |
-
},
|
127 |
-
"time": "2015-11-12T17:00:24+00:00",
|
128 |
-
"type": "composer-plugin",
|
129 |
-
"extra": {
|
130 |
-
"class": "\\Plugin"
|
131 |
-
},
|
132 |
-
"installation-source": "dist",
|
133 |
-
"autoload": {
|
134 |
-
"psr-0": {
|
135 |
-
"": "src/"
|
136 |
-
}
|
137 |
-
},
|
138 |
-
"notification-url": "https://packagist.org/downloads/",
|
139 |
-
"license": [
|
140 |
-
"MIT"
|
141 |
-
],
|
142 |
-
"authors": [
|
143 |
-
{
|
144 |
-
"name": "Vitaliy Krasnoperov",
|
145 |
-
"email": "alistar.neron@gmail.com"
|
146 |
-
}
|
147 |
-
],
|
148 |
-
"description": "Scripts-dev behaviour for Composer",
|
149 |
-
"homepage": "https://github.com/neronmoon/scriptsdev",
|
150 |
-
"keywords": [
|
151 |
-
"commands",
|
152 |
-
"commands execution",
|
153 |
-
"composer",
|
154 |
-
"dev",
|
155 |
-
"scripts"
|
156 |
-
]
|
157 |
-
},
|
158 |
{
|
159 |
"name": "squizlabs/php_codesniffer",
|
160 |
"version": "2.8.1",
|
@@ -236,41 +80,107 @@
|
|
236 |
]
|
237 |
},
|
238 |
{
|
239 |
-
"name": "
|
240 |
"version": "dev-master",
|
241 |
"version_normalized": "9999999-dev",
|
242 |
"source": {
|
243 |
"type": "git",
|
244 |
-
"url": "https://github.com/
|
245 |
-
"reference": "
|
246 |
},
|
247 |
"dist": {
|
248 |
"type": "zip",
|
249 |
-
"url": "https://api.github.com/repos/
|
250 |
-
"reference": "
|
251 |
"shasum": ""
|
252 |
},
|
253 |
"require": {
|
254 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
},
|
256 |
-
"time": "2016-08-29T20:04:47+00:00",
|
257 |
-
"type": "library",
|
258 |
"installation-source": "source",
|
|
|
|
|
|
|
|
|
|
|
259 |
"notification-url": "https://packagist.org/downloads/",
|
260 |
"license": [
|
261 |
-
"
|
262 |
],
|
263 |
"authors": [
|
264 |
{
|
265 |
-
"name": "
|
266 |
-
"
|
|
|
267 |
}
|
268 |
],
|
269 |
-
"description": "
|
270 |
"keywords": [
|
|
|
|
|
|
|
|
|
271 |
"phpcs",
|
272 |
"standards",
|
273 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
]
|
275 |
}
|
276 |
]
|
1 |
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
{
|
3 |
"name": "squizlabs/php_codesniffer",
|
4 |
"version": "2.8.1",
|
80 |
]
|
81 |
},
|
82 |
{
|
83 |
+
"name": "simplyadmire/composer-plugins",
|
84 |
"version": "dev-master",
|
85 |
"version_normalized": "9999999-dev",
|
86 |
"source": {
|
87 |
"type": "git",
|
88 |
+
"url": "https://github.com/SimplyAdmire/ComposerPlugins.git",
|
89 |
+
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19"
|
90 |
},
|
91 |
"dist": {
|
92 |
"type": "zip",
|
93 |
+
"url": "https://api.github.com/repos/SimplyAdmire/ComposerPlugins/zipball/d8380f670694c1c2330b22591ca74adc82cffe19",
|
94 |
+
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19",
|
95 |
"shasum": ""
|
96 |
},
|
97 |
"require": {
|
98 |
+
"composer-plugin-api": "^1.0",
|
99 |
+
"squizlabs/php_codesniffer": "*"
|
100 |
+
},
|
101 |
+
"time": "2016-05-12T11:58:38+00:00",
|
102 |
+
"type": "composer-plugin",
|
103 |
+
"extra": {
|
104 |
+
"class": [
|
105 |
+
"SimplyAdmire\\ComposerPlugins\\PhpCodesnifferStandardInstallerPlugin"
|
106 |
+
]
|
107 |
},
|
|
|
|
|
108 |
"installation-source": "source",
|
109 |
+
"autoload": {
|
110 |
+
"psr-0": {
|
111 |
+
"SimplyAdmire\\ComposerPlugins": ""
|
112 |
+
}
|
113 |
+
},
|
114 |
"notification-url": "https://packagist.org/downloads/",
|
115 |
"license": [
|
116 |
+
"LGPL-3.0+"
|
117 |
],
|
118 |
"authors": [
|
119 |
{
|
120 |
+
"name": "Rens Admiraal",
|
121 |
+
"email": "rens@simplyadmire.com",
|
122 |
+
"role": "lead"
|
123 |
}
|
124 |
],
|
125 |
+
"description": "Composer plugin for installing PHP_CodeSniffer standards",
|
126 |
"keywords": [
|
127 |
+
"PHP_CodeSniffer",
|
128 |
+
"TYPO3 CMS",
|
129 |
+
"TYPO3 Flow",
|
130 |
+
"TYPO3 Neos",
|
131 |
"phpcs",
|
132 |
"standards",
|
133 |
+
"typo3"
|
134 |
+
],
|
135 |
+
"abandoned": true
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"name": "wimg/php-compatibility",
|
139 |
+
"version": "dev-master",
|
140 |
+
"version_normalized": "9999999-dev",
|
141 |
+
"source": {
|
142 |
+
"type": "git",
|
143 |
+
"url": "https://github.com/wimg/PHPCompatibility.git",
|
144 |
+
"reference": "4853c6da08a6cb0f53029170e93c97120a6a2335"
|
145 |
+
},
|
146 |
+
"dist": {
|
147 |
+
"type": "zip",
|
148 |
+
"url": "https://api.github.com/repos/wimg/PHPCompatibility/zipball/4853c6da08a6cb0f53029170e93c97120a6a2335",
|
149 |
+
"reference": "4853c6da08a6cb0f53029170e93c97120a6a2335",
|
150 |
+
"shasum": ""
|
151 |
+
},
|
152 |
+
"require": {
|
153 |
+
"ext-tokenizer": "*",
|
154 |
+
"php": ">=5.1.2",
|
155 |
+
"squizlabs/php_codesniffer": "~2.0"
|
156 |
+
},
|
157 |
+
"require-dev": {
|
158 |
+
"satooshi/php-coveralls": "dev-master"
|
159 |
+
},
|
160 |
+
"time": "2017-01-03T20:31:50+00:00",
|
161 |
+
"type": "phpcodesniffer-standard",
|
162 |
+
"installation-source": "source",
|
163 |
+
"autoload": {
|
164 |
+
"psr-4": {
|
165 |
+
"PHPCompatibility\\": ""
|
166 |
+
}
|
167 |
+
},
|
168 |
+
"notification-url": "https://packagist.org/downloads/",
|
169 |
+
"license": [
|
170 |
+
"LGPL-3.0"
|
171 |
+
],
|
172 |
+
"authors": [
|
173 |
+
{
|
174 |
+
"name": "Wim Godden",
|
175 |
+
"role": "lead"
|
176 |
+
}
|
177 |
+
],
|
178 |
+
"description": "This is a set of sniffs for PHP_CodeSniffer that checks for PHP version compatibility.",
|
179 |
+
"homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
|
180 |
+
"keywords": [
|
181 |
+
"compatibility",
|
182 |
+
"phpcs",
|
183 |
+
"standards"
|
184 |
]
|
185 |
}
|
186 |
]
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Classes/OpeningBraceSameLineStandard.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<documentation title="Opening Brace on Same Line">
|
2 |
+
<standard>
|
3 |
+
<![CDATA[
|
4 |
+
The opening brace of a class must be on the same line after the definition and must be the last thing on that line.
|
5 |
+
]]>
|
6 |
+
</standard>
|
7 |
+
<code_comparison>
|
8 |
+
<code title="Valid: Opening brace on the same line.">
|
9 |
+
<![CDATA[
|
10 |
+
class Foo <em>{</em>
|
11 |
+
}
|
12 |
+
]]>
|
13 |
+
</code>
|
14 |
+
<code title="Invalid: Opening brace on the next line.">
|
15 |
+
<![CDATA[
|
16 |
+
class Foo
|
17 |
+
<em>{</em>
|
18 |
+
}
|
19 |
+
]]>
|
20 |
+
</code>
|
21 |
+
<code title="Invalid: Opening brace not last thing on the line.">
|
22 |
+
<![CDATA[
|
23 |
+
class Foo {<em> // Start of class.</em>
|
24 |
+
}
|
25 |
+
]]>
|
26 |
+
</code>
|
27 |
+
</code_comparison>
|
28 |
+
</documentation>
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/BacktickOperatorStandard.xml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<documentation title="Backtick Operator">
|
2 |
+
<standard>
|
3 |
+
<![CDATA[
|
4 |
+
Disallow the use of the backtick operator for execution of shell commands.
|
5 |
+
]]>
|
6 |
+
</standard>
|
7 |
+
</documentation>
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/DisallowAlternativePHPTagsStandard.xml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<documentation title="Alternative PHP Code Tags">
|
2 |
+
<standard>
|
3 |
+
<![CDATA[
|
4 |
+
Always use <?php ?> to delimit PHP code, do not use the ASP <% %> style tags nor the <script language="php"></script> tags. This is the most portable way to include PHP code on differing operating systems and setups.
|
5 |
+
]]>
|
6 |
+
</standard>
|
7 |
+
</documentation>
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Generic_Sniffs_Classes_OpeningBraceSameLineSniff.
|
4 |
+
*
|
5 |
+
* PHP version 5
|
6 |
+
*
|
7 |
+
* @category PHP
|
8 |
+
* @package PHP_CodeSniffer
|
9 |
+
* @author Greg Sherwood <gsherwood@squiz.net>
|
10 |
+
* @author Marc McIntyre <mmcintyre@squiz.net>
|
11 |
+
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
|
12 |
+
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
|
13 |
+
* @link http://pear.php.net/package/PHP_CodeSniffer
|
14 |
+
*/
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Generic_Sniffs_Classes_OpeningBraceSameLineSniff.
|
18 |
+
*
|
19 |
+
* Checks that the opening brace of a class or interface is on the same line
|
20 |
+
* as the class declaration.
|
21 |
+
*
|
22 |
+
* Also checks that the brace is the last thing on that line and has precisely one space before it.
|
23 |
+
*
|
24 |
+
* @category PHP
|
25 |
+
* @package PHP_CodeSniffer
|
26 |
+
* @author Greg Sherwood <gsherwood@squiz.net>
|
27 |
+
* @author Marc McIntyre <mmcintyre@squiz.net>
|
28 |
+
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
|
29 |
+
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
|
30 |
+
* @version Release: @package_version@
|
31 |
+
* @link http://pear.php.net/package/PHP_CodeSniffer
|
32 |
+
*/
|
33 |
+
class Generic_Sniffs_Classes_OpeningBraceSameLineSniff implements PHP_CodeSniffer_Sniff
|
34 |
+
{
|
35 |
+
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Returns an array of tokens this test wants to listen for.
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function register()
|
43 |
+
{
|
44 |
+
return array(
|
45 |
+
T_CLASS,
|
46 |
+
T_INTERFACE,
|
47 |
+
T_TRAIT,
|
48 |
+
);
|
49 |
+
|
50 |
+
}//end register()
|
51 |
+
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Processes this test, when one of its tokens is encountered.
|
55 |
+
*
|
56 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
57 |
+
* @param int $stackPtr The position of the current token in the
|
58 |
+
* stack passed in $tokens.
|
59 |
+
*
|
60 |
+
* @return void
|
61 |
+
*/
|
62 |
+
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
63 |
+
{
|
64 |
+
$tokens = $phpcsFile->getTokens();
|
65 |
+
$scope_identifier = $phpcsFile->findNext(T_STRING, ($stackPtr + 1));
|
66 |
+
$errorData = array(strtolower($tokens[$stackPtr]['content']).' '.$tokens[$scope_identifier]['content']);
|
67 |
+
|
68 |
+
if (isset($tokens[$stackPtr]['scope_opener']) === false) {
|
69 |
+
$error = 'Possible parse error: %s missing opening or closing brace';
|
70 |
+
$phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $errorData);
|
71 |
+
return;
|
72 |
+
}
|
73 |
+
|
74 |
+
$openingBrace = $tokens[$stackPtr]['scope_opener'];
|
75 |
+
|
76 |
+
// Is the brace on the same line as the class/interface/trait declaration ?
|
77 |
+
$lastClassLineToken = $phpcsFile->findPrevious(T_STRING, ($openingBrace - 1), $stackPtr);
|
78 |
+
$lastClassLine = $tokens[$lastClassLineToken]['line'];
|
79 |
+
$braceLine = $tokens[$openingBrace]['line'];
|
80 |
+
$lineDifference = ($braceLine - $lastClassLine);
|
81 |
+
|
82 |
+
if ($lineDifference > 0) {
|
83 |
+
$phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'new line');
|
84 |
+
$error = 'Opening brace should be on the same line as the declaration for %s';
|
85 |
+
$fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceOnNewLine', $errorData);
|
86 |
+
if ($fix === true) {
|
87 |
+
$phpcsFile->fixer->beginChangeset();
|
88 |
+
$phpcsFile->fixer->addContent($lastClassLineToken, ' {');
|
89 |
+
$phpcsFile->fixer->replaceToken($openingBrace, '');
|
90 |
+
$phpcsFile->fixer->endChangeset();
|
91 |
+
}
|
92 |
+
} else {
|
93 |
+
$phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'same line');
|
94 |
+
}
|
95 |
+
|
96 |
+
// Is the opening brace the last thing on the line ?
|
97 |
+
$next = $phpcsFile->findNext(T_WHITESPACE, ($openingBrace + 1), null, true);
|
98 |
+
if ($tokens[$next]['line'] === $tokens[$openingBrace]['line']) {
|
99 |
+
if ($next === $tokens[$stackPtr]['scope_closer']) {
|
100 |
+
// Ignore empty classes.
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
$error = 'Opening brace must be the last content on the line';
|
105 |
+
$fix = $phpcsFile->addFixableError($error, $openingBrace, 'ContentAfterBrace');
|
106 |
+
if ($fix === true) {
|
107 |
+
$phpcsFile->fixer->addNewline($openingBrace);
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
// Only continue checking if the opening brace looks good.
|
112 |
+
if ($lineDifference > 0) {
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
+
// Is there precisely one space before the opening brace ?
|
117 |
+
if ($tokens[($openingBrace - 1)]['code'] !== T_WHITESPACE) {
|
118 |
+
$length = 0;
|
119 |
+
} else if ($tokens[($openingBrace - 1)]['content'] === "\t") {
|
120 |
+
$length = '\t';
|
121 |
+
} else {
|
122 |
+
$length = strlen($tokens[($openingBrace - 1)]['content']);
|
123 |
+
}
|
124 |
+
|
125 |
+
if ($length !== 1) {
|
126 |
+
$error = 'Expected 1 space before opening brace; found %s';
|
127 |
+
$data = array($length);
|
128 |
+
$fix = $phpcsFile->addFixableError($error, $openingBrace, 'SpaceBeforeBrace', $data);
|
129 |
+
if ($fix === true) {
|
130 |
+
if ($length === 0 || $length === '\t') {
|
131 |
+
$phpcsFile->fixer->addContentBefore($openingBrace, ' ');
|
132 |
+
} else {
|
133 |
+
$phpcsFile->fixer->replaceToken(($openingBrace - 1), ' ');
|
134 |
+
}
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
}//end process()
|
139 |
+
|
140 |
+
|
141 |
+
}//end class
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Generic_Sniffs_PHP_BacktickOperatorSniff.
|
4 |
+
*
|
5 |
+
* PHP version 5
|
6 |
+
*
|
7 |
+
* @category PHP
|
8 |
+
* @package PHP_CodeSniffer
|
9 |
+
* @author Greg Sherwood <gsherwood@squiz.net>
|
10 |
+
* @author Marc McIntyre <mmcintyre@squiz.net>
|
11 |
+
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
|
12 |
+
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
|
13 |
+
* @link http://pear.php.net/package/PHP_CodeSniffer
|
14 |
+
*/
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Generic_Sniffs_PHP_BacktickOperatorSniff.
|
18 |
+
*
|
19 |
+
* Checks for the use of the backtick execution operator.
|
20 |
+
*
|
21 |
+
* @category PHP
|
22 |
+
* @package PHP_CodeSniffer
|
23 |
+
* @author Greg Sherwood <gsherwood@squiz.net>
|
24 |
+
* @author Marc McIntyre <mmcintyre@squiz.net>
|
25 |
+
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
|
26 |
+
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
|
27 |
+
* @version Release: @package_version@
|
28 |
+
* @link http://pear.php.net/package/PHP_CodeSniffer
|
29 |
+
*/
|
30 |
+
class Generic_Sniffs_PHP_BacktickOperatorSniff implements PHP_CodeSniffer_Sniff
|
31 |
+
{
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Returns an array of tokens this test wants to listen for.
|
36 |
+
*
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function register()
|
40 |
+
{
|
41 |
+
return array(T_BACKTICK);
|
42 |
+
|
43 |
+
}//end register()
|
44 |
+
|
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 |
+
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
56 |
+
{
|
57 |
+
$error = 'Use of the backtick operator is forbidden';
|
58 |
+
$phpcsFile->addError($error, $stackPtr, 'Found');
|
59 |
+
|
60 |
+
}//end process()
|
61 |
+
|
62 |
+
|
63 |
+
}//end class
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php
ADDED
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Generic_Sniffs_PHP_DisallowAlternativePHPTagsSniff.
|
4 |
+
*
|
5 |
+
* PHP version 5
|
6 |
+
*
|
7 |
+
* @category PHP
|
8 |
+
* @package PHP_CodeSniffer
|
9 |
+
* @author Greg Sherwood <gsherwood@squiz.net>
|
10 |
+
* @author Marc McIntyre <mmcintyre@squiz.net>
|
11 |
+
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
|
12 |
+
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
|
13 |
+
* @link http://pear.php.net/package/PHP_CodeSniffer
|
14 |
+
*/
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Generic_Sniffs_PHP_DisallowAlternativePHPTagsSniff.
|
18 |
+
*
|
19 |
+
* Verifies that no alternative PHP tags are used.
|
20 |
+
*
|
21 |
+
* If alternative PHP open tags are found, this sniff can fix both the open and close tags.
|
22 |
+
*
|
23 |
+
* @category PHP
|
24 |
+
* @package PHP_CodeSniffer
|
25 |
+
* @author Greg Sherwood <gsherwood@squiz.net>
|
26 |
+
* @author Marc McIntyre <mmcintyre@squiz.net>
|
27 |
+
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
|
28 |
+
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
|
29 |
+
* @version Release: @package_version@
|
30 |
+
* @link http://pear.php.net/package/PHP_CodeSniffer
|
31 |
+
*/
|
32 |
+
class Generic_Sniffs_PHP_DisallowAlternativePHPTagsSniff implements PHP_CodeSniffer_Sniff
|
33 |
+
{
|
34 |
+
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Whether ASP tags are enabled or not.
|
38 |
+
*
|
39 |
+
* @var bool
|
40 |
+
*/
|
41 |
+
private $_aspTags = false;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* The current PHP version.
|
45 |
+
*
|
46 |
+
* @var integer
|
47 |
+
*/
|
48 |
+
private $_phpVersion = null;
|
49 |
+
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Returns an array of tokens this test wants to listen for.
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function register()
|
57 |
+
{
|
58 |
+
if ($this->_phpVersion === null) {
|
59 |
+
$this->_phpVersion = PHP_CodeSniffer::getConfigData('php_version');
|
60 |
+
if ($this->_phpVersion === null) {
|
61 |
+
$this->_phpVersion = PHP_VERSION_ID;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
if ($this->_phpVersion < 70000) {
|
66 |
+
$this->_aspTags = (boolean) ini_get('asp_tags');
|
67 |
+
}
|
68 |
+
|
69 |
+
return array(
|
70 |
+
T_OPEN_TAG,
|
71 |
+
T_OPEN_TAG_WITH_ECHO,
|
72 |
+
T_INLINE_HTML,
|
73 |
+
);
|
74 |
+
|
75 |
+
}//end register()
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Processes this test, when one of its tokens is encountered.
|
80 |
+
*
|
81 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
82 |
+
* @param int $stackPtr The position of the current token
|
83 |
+
* in the stack passed in $tokens.
|
84 |
+
*
|
85 |
+
* @return void
|
86 |
+
*/
|
87 |
+
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
88 |
+
{
|
89 |
+
$tokens = $phpcsFile->getTokens();
|
90 |
+
$openTag = $tokens[$stackPtr];
|
91 |
+
$content = $openTag['content'];
|
92 |
+
|
93 |
+
if (trim($content) === '') {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
+
if ($openTag['code'] === T_OPEN_TAG) {
|
98 |
+
if ($content === '<%') {
|
99 |
+
$error = 'ASP style opening tag used; expected "<?php" but found "%s"';
|
100 |
+
$closer = $this->findClosingTag($phpcsFile, $tokens, $stackPtr, '%>');
|
101 |
+
$errorCode = 'ASPOpenTagFound';
|
102 |
+
} else if (strpos($content, '<script ') !== false) {
|
103 |
+
$error = 'Script style opening tag used; expected "<?php" but found "%s"';
|
104 |
+
$closer = $this->findClosingTag($phpcsFile, $tokens, $stackPtr, '</script>');
|
105 |
+
$errorCode = 'ScriptOpenTagFound';
|
106 |
+
}
|
107 |
+
|
108 |
+
if (isset($error, $closer, $errorCode) === true) {
|
109 |
+
$data = array($content);
|
110 |
+
|
111 |
+
if ($closer === false) {
|
112 |
+
$phpcsFile->addError($error, $stackPtr, $errorCode, $data);
|
113 |
+
} else {
|
114 |
+
$fix = $phpcsFile->addFixableError($error, $stackPtr, $errorCode, $data);
|
115 |
+
if ($fix === true) {
|
116 |
+
$this->addChangeset($phpcsFile, $tokens, $stackPtr, $closer);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
return;
|
122 |
+
}//end if
|
123 |
+
|
124 |
+
if ($openTag['code'] === T_OPEN_TAG_WITH_ECHO && $content === '<%=') {
|
125 |
+
$error = 'ASP style opening tag used with echo; expected "<?php echo %s ..." but found "%s %s ..."';
|
126 |
+
$nextVar = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
|
127 |
+
$snippet = $this->getSnippet($tokens[$nextVar]['content']);
|
128 |
+
$data = array(
|
129 |
+
$snippet,
|
130 |
+
$content,
|
131 |
+
$snippet,
|
132 |
+
);
|
133 |
+
|
134 |
+
$closer = $this->findClosingTag($phpcsFile, $tokens, $stackPtr, '%>');
|
135 |
+
|
136 |
+
if ($closer === false) {
|
137 |
+
$phpcsFile->addError($error, $stackPtr, 'ASPShortOpenTagFound', $data);
|
138 |
+
} else {
|
139 |
+
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'ASPShortOpenTagFound', $data);
|
140 |
+
if ($fix === true) {
|
141 |
+
$this->addChangeset($phpcsFile, $tokens, $stackPtr, $closer, true);
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
return;
|
146 |
+
}//end if
|
147 |
+
|
148 |
+
// Account for incorrect script open tags.
|
149 |
+
// The "(?:<s)?" in the regex is to work-around a bug in PHP 5.2.
|
150 |
+
if ($openTag['code'] === T_INLINE_HTML
|
151 |
+
&& preg_match('`((?:<s)?cript (?:[^>]+)?language=[\'"]?php[\'"]?(?:[^>]+)?>)`i', $content, $match) === 1
|
152 |
+
) {
|
153 |
+
$error = 'Script style opening tag used; expected "<?php" but found "%s"';
|
154 |
+
$snippet = $this->getSnippet($content, $match[1]);
|
155 |
+
$data = array($match[1].$snippet);
|
156 |
+
|
157 |
+
$phpcsFile->addError($error, $stackPtr, 'ScriptOpenTagFound', $data);
|
158 |
+
return;
|
159 |
+
}
|
160 |
+
|
161 |
+
if ($openTag['code'] === T_INLINE_HTML && $this->_aspTags === false) {
|
162 |
+
if (strpos($content, '<%=') !== false) {
|
163 |
+
$error = 'Possible use of ASP style short opening tags detected. Needs manual inspection. Found: %s';
|
164 |
+
$snippet = $this->getSnippet($content, '<%=');
|
165 |
+
$data = array('<%='.$snippet);
|
166 |
+
|
167 |
+
$phpcsFile->addWarning($error, $stackPtr, 'MaybeASPShortOpenTagFound', $data);
|
168 |
+
} else if (strpos($content, '<%') !== false) {
|
169 |
+
$error = 'Possible use of ASP style opening tags detected. Needs manual inspection. Found: %s';
|
170 |
+
$snippet = $this->getSnippet($content, '<%');
|
171 |
+
$data = array('<%'.$snippet);
|
172 |
+
|
173 |
+
$phpcsFile->addWarning($error, $stackPtr, 'MaybeASPOpenTagFound', $data);
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
}//end process()
|
178 |
+
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Get a snippet from a HTML token.
|
182 |
+
*
|
183 |
+
* @param string $content The content of the HTML token.
|
184 |
+
* @param string $start_at Partial string to use as a starting point for the snippet.
|
185 |
+
* @param int $length The target length of the snippet to get. Defaults to 40.
|
186 |
+
*
|
187 |
+
* @return string
|
188 |
+
*/
|
189 |
+
protected function getSnippet($content, $start_at = '', $length = 40)
|
190 |
+
{
|
191 |
+
$start_pos = 0;
|
192 |
+
|
193 |
+
if ($start_at !== '') {
|
194 |
+
$start_pos = strpos($content, $start_at);
|
195 |
+
if ($start_pos !== false) {
|
196 |
+
$start_pos += strlen($start_at);
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
$snippet = substr($content, $start_pos, $length);
|
201 |
+
if ((strlen($content) - $start_pos) > $length) {
|
202 |
+
$snippet .= '...';
|
203 |
+
}
|
204 |
+
|
205 |
+
return $snippet;
|
206 |
+
|
207 |
+
}//end getSnippet()
|
208 |
+
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Try and find a matching PHP closing tag.
|
212 |
+
*
|
213 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
214 |
+
* @param array $tokens The token stack.
|
215 |
+
* @param int $stackPtr The position of the current token
|
216 |
+
* in the stack passed in $tokens.
|
217 |
+
* @param string $content The expected content of the closing tag to match the opener.
|
218 |
+
*
|
219 |
+
* @return int|false Pointer to the position in the stack for the closing tag or false if not found.
|
220 |
+
*/
|
221 |
+
protected function findClosingTag(PHP_CodeSniffer_File $phpcsFile, $tokens, $stackPtr, $content)
|
222 |
+
{
|
223 |
+
$closer = $phpcsFile->findNext(T_CLOSE_TAG, ($stackPtr + 1));
|
224 |
+
|
225 |
+
if ($closer !== false && $content === trim($tokens[$closer]['content'])) {
|
226 |
+
return $closer;
|
227 |
+
}
|
228 |
+
|
229 |
+
return false;
|
230 |
+
|
231 |
+
}//end findClosingTag()
|
232 |
+
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Add a changeset to replace the alternative PHP tags.
|
236 |
+
*
|
237 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
238 |
+
* @param array $tokens The token stack.
|
239 |
+
* @param int $open_tag_pointer Stack pointer to the PHP open tag.
|
240 |
+
* @param int $close_tag_pointer Stack pointer to the PHP close tag.
|
241 |
+
* @param bool $echo Whether to add 'echo' or not.
|
242 |
+
*
|
243 |
+
* @return void
|
244 |
+
*/
|
245 |
+
protected function addChangeset(PHP_CodeSniffer_File $phpcsFile, $tokens, $open_tag_pointer, $close_tag_pointer, $echo = false)
|
246 |
+
{
|
247 |
+
// Build up the open tag replacement and make sure there's always whitespace behind it.
|
248 |
+
$open_replacement = '<?php';
|
249 |
+
if ($echo === true) {
|
250 |
+
$open_replacement .= ' echo';
|
251 |
+
}
|
252 |
+
|
253 |
+
if ($tokens[($open_tag_pointer + 1)]['code'] !== T_WHITESPACE) {
|
254 |
+
$open_replacement .= ' ';
|
255 |
+
}
|
256 |
+
|
257 |
+
// Make sure we don't remove any line breaks after the closing tag.
|
258 |
+
$regex = '`'.preg_quote(trim($tokens[$close_tag_pointer]['content'])).'`';
|
259 |
+
$close_replacement = preg_replace($regex, '?>', $tokens[$close_tag_pointer]['content']);
|
260 |
+
|
261 |
+
$phpcsFile->fixer->beginChangeset();
|
262 |
+
$phpcsFile->fixer->replaceToken($open_tag_pointer, $open_replacement);
|
263 |
+
$phpcsFile->fixer->replaceToken($close_tag_pointer, $close_replacement);
|
264 |
+
$phpcsFile->fixer->endChangeset();
|
265 |
+
|
266 |
+
}//end addChangeset()
|
267 |
+
|
268 |
+
|
269 |
+
}//end class
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/AbstractComplexVersionSniff.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_AbstractComplexVersionSniff.
|
4 |
+
*
|
5 |
+
* @category PHP
|
6 |
+
* @package PHPCompatibility
|
7 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* PHPCompatibility_AbstractComplexVersionSniff.
|
12 |
+
*
|
13 |
+
* @category PHP
|
14 |
+
* @package PHPCompatibility
|
15 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
16 |
+
*/
|
17 |
+
abstract class PHPCompatibility_AbstractComplexVersionSniff extends PHPCompatibility_Sniff implements PHPCompatibility_ComplexVersionInterface
|
18 |
+
{
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Handle the retrieval of relevant information and - if necessary - throwing of an
|
23 |
+
* error/warning for an item.
|
24 |
+
*
|
25 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
26 |
+
* @param int $stackPtr The position of the relevant token in
|
27 |
+
* the stack.
|
28 |
+
* @param array $itemInfo Base information about the item.
|
29 |
+
*
|
30 |
+
* @return void
|
31 |
+
*/
|
32 |
+
public function handleFeature(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo)
|
33 |
+
{
|
34 |
+
$itemArray = $this->getItemArray($itemInfo);
|
35 |
+
$errorInfo = $this->getErrorInfo($itemArray, $itemInfo);
|
36 |
+
|
37 |
+
if ($this->shouldThrowError($errorInfo) === true) {
|
38 |
+
$this->addError($phpcsFile, $stackPtr, $itemInfo, $errorInfo);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Determine whether an error/warning should be thrown for an item based on collected information.
|
45 |
+
*
|
46 |
+
* @param array $errorInfo Detail information about an item.
|
47 |
+
*
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
abstract protected function shouldThrowError(array $errorInfo);
|
51 |
+
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get an array of the non-PHP-version array keys used in a sub-array.
|
55 |
+
*
|
56 |
+
* @return array
|
57 |
+
*/
|
58 |
+
protected function getNonVersionArrayKeys()
|
59 |
+
{
|
60 |
+
return array();
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Retrieve a subset of an item array containing only the array keys which
|
66 |
+
* contain PHP version information.
|
67 |
+
*
|
68 |
+
* @param array $itemArray Version and other information about an item.
|
69 |
+
*
|
70 |
+
* @return array Array with only the version information.
|
71 |
+
*/
|
72 |
+
protected function getVersionArray(array $itemArray)
|
73 |
+
{
|
74 |
+
return array_diff_key($itemArray, array_flip($this->getNonVersionArrayKeys()));
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get the item name to be used for the creation of the error code and in the error message.
|
80 |
+
*
|
81 |
+
* @param array $itemInfo Base information about the item.
|
82 |
+
* @param array $errorInfo Detail information about an item.
|
83 |
+
*
|
84 |
+
* @return string
|
85 |
+
*/
|
86 |
+
protected function getItemName(array $itemInfo, array $errorInfo)
|
87 |
+
{
|
88 |
+
return $itemInfo['name'];
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Get the error message template for a specific sniff.
|
94 |
+
*
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
abstract protected function getErrorMsgTemplate();
|
98 |
+
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Allow for concrete child classes to filter the error message before it's passed to PHPCS.
|
102 |
+
*
|
103 |
+
* @param string $error The error message which was created.
|
104 |
+
* @param array $itemInfo Base information about the item this error message applied to.
|
105 |
+
* @param array $errorInfo Detail information about an item this error message applied to.
|
106 |
+
*
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
protected function filterErrorMsg($error, array $itemInfo, array $errorInfo)
|
110 |
+
{
|
111 |
+
return $error;
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Allow for concrete child classes to filter the error data before it's passed to PHPCS.
|
117 |
+
*
|
118 |
+
* @param array $data The error data array which was created.
|
119 |
+
* @param array $itemInfo Base information about the item this error message applied to.
|
120 |
+
* @param array $errorInfo Detail information about an item this error message applied to.
|
121 |
+
*
|
122 |
+
* @return array
|
123 |
+
*/
|
124 |
+
protected function filterErrorData(array $data, array $itemInfo, array $errorInfo)
|
125 |
+
{
|
126 |
+
return $data;
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
}//end class
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/AbstractNewFeatureSniff.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_AbstractNewFeatureSniff.
|
4 |
+
*
|
5 |
+
* @category PHP
|
6 |
+
* @package PHPCompatibility
|
7 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* PPHPCompatibility_AbstractNewFeatureSniff.
|
12 |
+
*
|
13 |
+
* @category PHP
|
14 |
+
* @package PHPCompatibility
|
15 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
16 |
+
*/
|
17 |
+
abstract class PHPCompatibility_AbstractNewFeatureSniff extends PHPCompatibility_AbstractComplexVersionSniff
|
18 |
+
{
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Determine whether an error/warning should be thrown for an item based on collected information.
|
23 |
+
*
|
24 |
+
* @param array $errorInfo Detail information about an item.
|
25 |
+
*
|
26 |
+
* @return bool
|
27 |
+
*/
|
28 |
+
protected function shouldThrowError(array $errorInfo)
|
29 |
+
{
|
30 |
+
return ($errorInfo['not_in_version'] !== '');
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Retrieve the relevant detail (version) information for use in an error message.
|
36 |
+
*
|
37 |
+
* @param array $itemArray Version and other information about the item.
|
38 |
+
* @param array $itemInfo Base information about the item.
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function getErrorInfo(array $itemArray, array $itemInfo)
|
43 |
+
{
|
44 |
+
$errorInfo = array(
|
45 |
+
'not_in_version' => '',
|
46 |
+
'error' => true,
|
47 |
+
);
|
48 |
+
|
49 |
+
$versionArray = $this->getVersionArray($itemArray);
|
50 |
+
|
51 |
+
if (empty($versionArray) === false) {
|
52 |
+
foreach ($versionArray as $version => $present) {
|
53 |
+
if ($errorInfo['not_in_version'] === '' && $present === false
|
54 |
+
&& $this->supportsBelow($version) === true
|
55 |
+
) {
|
56 |
+
$errorInfo['not_in_version'] = $version;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
return $errorInfo;
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get the error message template for this sniff.
|
67 |
+
*
|
68 |
+
* @return string
|
69 |
+
*/
|
70 |
+
protected function getErrorMsgTemplate()
|
71 |
+
{
|
72 |
+
return '%s is not present in PHP version %s or earlier';
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Generates the error or warning for this item.
|
78 |
+
*
|
79 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
80 |
+
* @param int $stackPtr The position of the relevant token in
|
81 |
+
* the stack.
|
82 |
+
* @param array $itemInfo Base information about the item.
|
83 |
+
* @param array $errorInfo Array with detail (version) information
|
84 |
+
* relevant to the item.
|
85 |
+
*
|
86 |
+
* @return void
|
87 |
+
*/
|
88 |
+
public function addError(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo)
|
89 |
+
{
|
90 |
+
$itemName = $this->getItemName($itemInfo, $errorInfo);
|
91 |
+
$error = $this->getErrorMsgTemplate();
|
92 |
+
|
93 |
+
$errorCode = $this->stringToErrorCode($itemName).'Found';
|
94 |
+
$data = array(
|
95 |
+
$itemName,
|
96 |
+
$errorInfo['not_in_version'],
|
97 |
+
);
|
98 |
+
|
99 |
+
$error = $this->filterErrorMsg($error, $itemInfo, $errorInfo);
|
100 |
+
$data = $this->filterErrorData($data, $itemInfo, $errorInfo);
|
101 |
+
|
102 |
+
$this->addMessage($phpcsFile, $error, $stackPtr, $errorInfo['error'], $errorCode, $data);
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
}//end class
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/AbstractRemovedFeatureSniff.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_AbstractRemovedFeatureSniff.
|
4 |
+
*
|
5 |
+
* @category PHP
|
6 |
+
* @package PHPCompatibility
|
7 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* PHPCompatibility_AbstractRemovedFeatureSniff.
|
12 |
+
*
|
13 |
+
* @category PHP
|
14 |
+
* @package PHPCompatibility
|
15 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
16 |
+
*/
|
17 |
+
abstract class PHPCompatibility_AbstractRemovedFeatureSniff extends PHPCompatibility_AbstractComplexVersionSniff
|
18 |
+
{
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Determine whether an error/warning should be thrown for an item based on collected information.
|
23 |
+
*
|
24 |
+
* @param array $errorInfo Detail information about an item.
|
25 |
+
*
|
26 |
+
* @return bool
|
27 |
+
*/
|
28 |
+
protected function shouldThrowError(array $errorInfo)
|
29 |
+
{
|
30 |
+
return ($errorInfo['deprecated'] !== '' || $errorInfo['removed'] !== '');
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get an array of the non-PHP-version array keys used in a sub-array.
|
36 |
+
*
|
37 |
+
* By default, removed feature version arrays, contain an additional 'alternative' array key.
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
protected function getNonVersionArrayKeys()
|
42 |
+
{
|
43 |
+
return array('alternative');
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Retrieve the relevant detail (version) information for use in an error message.
|
49 |
+
*
|
50 |
+
* @param array $itemArray Version and other information about the item.
|
51 |
+
* @param array $itemInfo Base information about the item.
|
52 |
+
*
|
53 |
+
* @return array
|
54 |
+
*/
|
55 |
+
public function getErrorInfo(array $itemArray, array $itemInfo)
|
56 |
+
{
|
57 |
+
$errorInfo = array(
|
58 |
+
'deprecated' => '',
|
59 |
+
'removed' => '',
|
60 |
+
'alternative' => '',
|
61 |
+
'error' => false,
|
62 |
+
);
|
63 |
+
|
64 |
+
$versionArray = $this->getVersionArray($itemArray);
|
65 |
+
|
66 |
+
if (empty($versionArray) === false) {
|
67 |
+
foreach ($versionArray as $version => $removed) {
|
68 |
+
if ($this->supportsAbove($version) === true) {
|
69 |
+
if ($removed === true && $errorInfo['removed'] === '') {
|
70 |
+
$errorInfo['removed'] = $version;
|
71 |
+
$errorInfo['error'] = true;
|
72 |
+
} else if ($errorInfo['deprecated'] === '') {
|
73 |
+
$errorInfo['deprecated'] = $version;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
if (isset($itemArray['alternative']) === true) {
|
80 |
+
$errorInfo['alternative'] = $itemArray['alternative'];
|
81 |
+
}
|
82 |
+
|
83 |
+
return $errorInfo;
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Get the error message template for suggesting an alternative for a specific sniff.
|
89 |
+
*
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
protected function getAlternativeOptionTemplate()
|
93 |
+
{
|
94 |
+
return '; Use %s instead';
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Generates the error or warning for this item.
|
100 |
+
*
|
101 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
102 |
+
* @param int $stackPtr The position of the relevant token in
|
103 |
+
* the stack.
|
104 |
+
* @param array $itemInfo Base information about the item.
|
105 |
+
* @param array $errorInfo Array with detail (version) information
|
106 |
+
* relevant to the item.
|
107 |
+
*
|
108 |
+
* @return void
|
109 |
+
*/
|
110 |
+
public function addError(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo)
|
111 |
+
{
|
112 |
+
$itemName = $this->getItemName($itemInfo, $errorInfo);
|
113 |
+
$error = $this->getErrorMsgTemplate();
|
114 |
+
|
115 |
+
$errorCode = $this->stringToErrorCode($itemName);
|
116 |
+
$data = array($itemName);
|
117 |
+
|
118 |
+
if ($errorInfo['deprecated'] !== '') {
|
119 |
+
$error .= 'deprecated since PHP %s and ';
|
120 |
+
$errorCode .= 'Deprecated';
|
121 |
+
$data[] = $errorInfo['deprecated'];
|
122 |
+
}
|
123 |
+
|
124 |
+
if ($errorInfo['removed'] !== '') {
|
125 |
+
$error .= 'removed since PHP %s and ';
|
126 |
+
$errorCode .= 'Removed';
|
127 |
+
$data[] = $errorInfo['removed'];
|
128 |
+
}
|
129 |
+
|
130 |
+
// Remove the last 'and' from the message.
|
131 |
+
$error = substr($error, 0, (strlen($error) - 5));
|
132 |
+
|
133 |
+
if ($errorInfo['alternative'] !== '') {
|
134 |
+
$error .= $this->getAlternativeOptionTemplate();
|
135 |
+
$data[] = $errorInfo['alternative'];
|
136 |
+
}
|
137 |
+
|
138 |
+
$error = $this->filterErrorMsg($error, $itemInfo, $errorInfo);
|
139 |
+
$data = $this->filterErrorData($data, $itemInfo, $errorInfo);
|
140 |
+
|
141 |
+
$this->addMessage($phpcsFile, $error, $stackPtr, $errorInfo['error'], $errorCode, $data);
|
142 |
+
|
143 |
+
}//end addError()
|
144 |
+
|
145 |
+
|
146 |
+
}//end class
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/ComplexVersionInterface.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_ComplexVersionInterface.
|
4 |
+
*
|
5 |
+
* @category PHP
|
6 |
+
* @package PHPCompatibility
|
7 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* PHPCompatibility_ComplexVersionInterface.
|
12 |
+
*
|
13 |
+
* Interface to be implemented by sniffs using a multi-dimensional array of
|
14 |
+
* PHP features (functions, classes etc) being sniffed for with version
|
15 |
+
* information in sub-arrays.
|
16 |
+
*
|
17 |
+
* @category PHP
|
18 |
+
* @package PHPCompatibility
|
19 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
20 |
+
*/
|
21 |
+
interface PHPCompatibility_ComplexVersionInterface
|
22 |
+
{
|
23 |
+
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Handle the retrieval of relevant information and - if necessary - throwing of an
|
27 |
+
* error/warning for an item.
|
28 |
+
*
|
29 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
30 |
+
* @param int $stackPtr The position of the relevant token in
|
31 |
+
* the stack.
|
32 |
+
* @param array $itemInfo Base information about the item.
|
33 |
+
*
|
34 |
+
* @return void
|
35 |
+
*/
|
36 |
+
public function handleFeature(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo);
|
37 |
+
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get the relevant sub-array for a specific item from a multi-dimensional array.
|
41 |
+
*
|
42 |
+
* @param array $itemInfo Base information about the item.
|
43 |
+
*
|
44 |
+
* @return array Version and other information about the item.
|
45 |
+
*/
|
46 |
+
public function getItemArray(array $itemInfo);
|
47 |
+
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Retrieve the relevant detail (version) information for use in an error message.
|
51 |
+
*
|
52 |
+
* @param array $itemArray Version and other information about the item.
|
53 |
+
* @param array $itemInfo Base information about the item.
|
54 |
+
*
|
55 |
+
* @return array
|
56 |
+
*/
|
57 |
+
public function getErrorInfo(array $itemArray, array $itemInfo);
|
58 |
+
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Generates the error or warning for this item.
|
62 |
+
*
|
63 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
64 |
+
* @param int $stackPtr The position of the relevant token in
|
65 |
+
* the stack.
|
66 |
+
* @param array $itemInfo Base information about the item.
|
67 |
+
* @param array $errorInfo Array with detail (version) information
|
68 |
+
* relevant to the item.
|
69 |
+
*
|
70 |
+
* @return void
|
71 |
+
*/
|
72 |
+
public function addError(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo);
|
73 |
+
|
74 |
+
|
75 |
+
}//end interface
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/Sniffs/PHP/VariableVariablesSniff.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_Sniffs_PHP_VariableVariables.
|
4 |
+
*
|
5 |
+
* PHP version 7.0
|
6 |
+
*
|
7 |
+
* @category PHP
|
8 |
+
* @package PHPCompatibility
|
9 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* PHPCompatibility_Sniffs_PHP_VariableVariables.
|
14 |
+
*
|
15 |
+
* The interpretation of variable variables has changed in PHP 7.0.
|
16 |
+
*
|
17 |
+
* PHP version 7.0
|
18 |
+
*
|
19 |
+
* @category PHP
|
20 |
+
* @package PHPCompatibility
|
21 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
22 |
+
*/
|
23 |
+
class PHPCompatibility_Sniffs_PHP_VariableVariablesSniff extends PHPCompatibility_Sniff
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Returns an array of tokens this test wants to listen for.
|
27 |
+
*
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public function register()
|
31 |
+
{
|
32 |
+
return array(T_VARIABLE);
|
33 |
+
|
34 |
+
}//end register()
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Processes this test, when one of its tokens is encountered.
|
38 |
+
*
|
39 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
40 |
+
* @param int $stackPtr The position of the current token
|
41 |
+
* in the stack passed in $tokens.
|
42 |
+
*
|
43 |
+
* @return void
|
44 |
+
*/
|
45 |
+
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
46 |
+
{
|
47 |
+
if ($this->supportsAbove('7.0') === false) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
|
51 |
+
$tokens = $phpcsFile->getTokens();
|
52 |
+
|
53 |
+
// Verify that the next token is a square open bracket. If not, bow out.
|
54 |
+
$nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true, null, true);
|
55 |
+
|
56 |
+
if ($nextToken === false || $tokens[$nextToken]['code'] !== T_OPEN_SQUARE_BRACKET || isset($tokens[$nextToken]['bracket_closer']) === false) {
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
|
60 |
+
// The previous token has to be a $, -> or ::.
|
61 |
+
if (isset($tokens[($stackPtr - 1)]) === false || in_array($tokens[($stackPtr - 1)]['code'], array(T_DOLLAR, T_OBJECT_OPERATOR, T_DOUBLE_COLON), true) === false) {
|
62 |
+
return;
|
63 |
+
}
|
64 |
+
|
65 |
+
// For static object calls, it only applies when this is a function call.
|
66 |
+
if ($tokens[($stackPtr - 1)]['code'] === T_DOUBLE_COLON) {
|
67 |
+
$hasBrackets = $tokens[$nextToken]['bracket_closer'];
|
68 |
+
while (($hasBrackets = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($hasBrackets + 1), null, true, null, true)) !== false ) {
|
69 |
+
if ($tokens[$hasBrackets]['code'] === T_OPEN_SQUARE_BRACKET) {
|
70 |
+
if (isset($tokens[$hasBrackets]['bracket_closer'])) {
|
71 |
+
$hasBrackets = $tokens[$hasBrackets]['bracket_closer'];
|
72 |
+
continue;
|
73 |
+
}
|
74 |
+
else {
|
75 |
+
// Live coding.
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
elseif ($tokens[$hasBrackets]['code'] === T_OPEN_PARENTHESIS) {
|
80 |
+
// Caught!
|
81 |
+
break;
|
82 |
+
}
|
83 |
+
else {
|
84 |
+
// Not a function call, so bow out.
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
// Now let's also prevent false positives when used with self and static which still work fine.
|
90 |
+
$classToken = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 2), null, true, null, true);
|
91 |
+
if ($classToken !== false) {
|
92 |
+
if ($tokens[$classToken]['code'] === T_STATIC || $tokens[$classToken]['code'] === T_SELF) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
elseif ($tokens[$classToken]['code'] === T_STRING && $tokens[$classToken]['content'] === 'self') {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
$phpcsFile->addError(
|
102 |
+
'Indirect access to variables, properties and methods will be evaluated strictly in left-to-right order since PHP 7.0. Use curly braces to remove ambiguity.',
|
103 |
+
$stackPtr,
|
104 |
+
'Found'
|
105 |
+
);
|
106 |
+
|
107 |
+
}//end process()
|
108 |
+
|
109 |
+
|
110 |
+
}//end class
|
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility/phpcs.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<ruleset name="PHPCS Coding Standards for PHPCompatibility">
|
3 |
+
<description>Check the code of the PHPCompatibility standard itself.</description>
|
4 |
+
|
5 |
+
<arg value="sp"/>
|
6 |
+
<arg name="extensions" value="php"/>
|
7 |
+
|
8 |
+
<!-- Exclude test case code. -->
|
9 |
+
<exclude-pattern>/Tests/sniff-examples/*</exclude-pattern>
|
10 |
+
|
11 |
+
<!-- Exclude Composer vendor directory. -->
|
12 |
+
<exclude-pattern>*/vendor/*</exclude-pattern>
|
13 |
+
|
14 |
+
<config name="testVersion" value="5.1-99.0"/>
|
15 |
+
<rule ref="PHPCompatibility"/>
|
16 |
+
|
17 |
+
<!-- Verified correct usage. -->
|
18 |
+
<rule ref="PHPCompatibility.PHP.DeprecatedIniDirectives.asp_tagsRemoved">
|
19 |
+
<exclude-pattern>*/RemovedAlternativePHPTags*.php</exclude-pattern>
|
20 |
+
</rule>
|
21 |
+
|
22 |
+
</ruleset>
|
vendor/wimg/php-compatibility/AbstractComplexVersionSniff.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_AbstractComplexVersionSniff.
|
4 |
+
*
|
5 |
+
* @category PHP
|
6 |
+
* @package PHPCompatibility
|
7 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* PHPCompatibility_AbstractComplexVersionSniff.
|
12 |
+
*
|
13 |
+
* @category PHP
|
14 |
+
* @package PHPCompatibility
|
15 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
16 |
+
*/
|
17 |
+
abstract class PHPCompatibility_AbstractComplexVersionSniff extends PHPCompatibility_Sniff implements PHPCompatibility_ComplexVersionInterface
|
18 |
+
{
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Handle the retrieval of relevant information and - if necessary - throwing of an
|
23 |
+
* error/warning for an item.
|
24 |
+
*
|
25 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
26 |
+
* @param int $stackPtr The position of the relevant token in
|
27 |
+
* the stack.
|
28 |
+
* @param array $itemInfo Base information about the item.
|
29 |
+
*
|
30 |
+
* @return void
|
31 |
+
*/
|
32 |
+
public function handleFeature(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo)
|
33 |
+
{
|
34 |
+
$itemArray = $this->getItemArray($itemInfo);
|
35 |
+
$errorInfo = $this->getErrorInfo($itemArray, $itemInfo);
|
36 |
+
|
37 |
+
if ($this->shouldThrowError($errorInfo) === true) {
|
38 |
+
$this->addError($phpcsFile, $stackPtr, $itemInfo, $errorInfo);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Determine whether an error/warning should be thrown for an item based on collected information.
|
45 |
+
*
|
46 |
+
* @param array $errorInfo Detail information about an item.
|
47 |
+
*
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
abstract protected function shouldThrowError(array $errorInfo);
|
51 |
+
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get an array of the non-PHP-version array keys used in a sub-array.
|
55 |
+
*
|
56 |
+
* @return array
|
57 |
+
*/
|
58 |
+
protected function getNonVersionArrayKeys()
|
59 |
+
{
|
60 |
+
return array();
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Retrieve a subset of an item array containing only the array keys which
|
66 |
+
* contain PHP version information.
|
67 |
+
*
|
68 |
+
* @param array $itemArray Version and other information about an item.
|
69 |
+
*
|
70 |
+
* @return array Array with only the version information.
|
71 |
+
*/
|
72 |
+
protected function getVersionArray(array $itemArray)
|
73 |
+
{
|
74 |
+
return array_diff_key($itemArray, array_flip($this->getNonVersionArrayKeys()));
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get the item name to be used for the creation of the error code and in the error message.
|
80 |
+
*
|
81 |
+
* @param array $itemInfo Base information about the item.
|
82 |
+
* @param array $errorInfo Detail information about an item.
|
83 |
+
*
|
84 |
+
* @return string
|
85 |
+
*/
|
86 |
+
protected function getItemName(array $itemInfo, array $errorInfo)
|
87 |
+
{
|
88 |
+
return $itemInfo['name'];
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Get the error message template for a specific sniff.
|
94 |
+
*
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
abstract protected function getErrorMsgTemplate();
|
98 |
+
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Allow for concrete child classes to filter the error message before it's passed to PHPCS.
|
102 |
+
*
|
103 |
+
* @param string $error The error message which was created.
|
104 |
+
* @param array $itemInfo Base information about the item this error message applied to.
|
105 |
+
* @param array $errorInfo Detail information about an item this error message applied to.
|
106 |
+
*
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
protected function filterErrorMsg($error, array $itemInfo, array $errorInfo)
|
110 |
+
{
|
111 |
+
return $error;
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Allow for concrete child classes to filter the error data before it's passed to PHPCS.
|
117 |
+
*
|
118 |
+
* @param array $data The error data array which was created.
|
119 |
+
* @param array $itemInfo Base information about the item this error message applied to.
|
120 |
+
* @param array $errorInfo Detail information about an item this error message applied to.
|
121 |
+
*
|
122 |
+
* @return array
|
123 |
+
*/
|
124 |
+
protected function filterErrorData(array $data, array $itemInfo, array $errorInfo)
|
125 |
+
{
|
126 |
+
return $data;
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
}//end class
|
vendor/wimg/php-compatibility/AbstractNewFeatureSniff.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_AbstractNewFeatureSniff.
|
4 |
+
*
|
5 |
+
* @category PHP
|
6 |
+
* @package PHPCompatibility
|
7 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* PPHPCompatibility_AbstractNewFeatureSniff.
|
12 |
+
*
|
13 |
+
* @category PHP
|
14 |
+
* @package PHPCompatibility
|
15 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
16 |
+
*/
|
17 |
+
abstract class PHPCompatibility_AbstractNewFeatureSniff extends PHPCompatibility_AbstractComplexVersionSniff
|
18 |
+
{
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Determine whether an error/warning should be thrown for an item based on collected information.
|
23 |
+
*
|
24 |
+
* @param array $errorInfo Detail information about an item.
|
25 |
+
*
|
26 |
+
* @return bool
|
27 |
+
*/
|
28 |
+
protected function shouldThrowError(array $errorInfo)
|
29 |
+
{
|
30 |
+
return ($errorInfo['not_in_version'] !== '');
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Retrieve the relevant detail (version) information for use in an error message.
|
36 |
+
*
|
37 |
+
* @param array $itemArray Version and other information about the item.
|
38 |
+
* @param array $itemInfo Base information about the item.
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function getErrorInfo(array $itemArray, array $itemInfo)
|
43 |
+
{
|
44 |
+
$errorInfo = array(
|
45 |
+
'not_in_version' => '',
|
46 |
+
'error' => true,
|
47 |
+
);
|
48 |
+
|
49 |
+
$versionArray = $this->getVersionArray($itemArray);
|
50 |
+
|
51 |
+
if (empty($versionArray) === false) {
|
52 |
+
foreach ($versionArray as $version => $present) {
|
53 |
+
if ($errorInfo['not_in_version'] === '' && $present === false
|
54 |
+
&& $this->supportsBelow($version) === true
|
55 |
+
) {
|
56 |
+
$errorInfo['not_in_version'] = $version;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
return $errorInfo;
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get the error message template for this sniff.
|
67 |
+
*
|
68 |
+
* @return string
|
69 |
+
*/
|
70 |
+
protected function getErrorMsgTemplate()
|
71 |
+
{
|
72 |
+
return '%s is not present in PHP version %s or earlier';
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Generates the error or warning for this item.
|
78 |
+
*
|
79 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
80 |
+
* @param int $stackPtr The position of the relevant token in
|
81 |
+
* the stack.
|
82 |
+
* @param array $itemInfo Base information about the item.
|
83 |
+
* @param array $errorInfo Array with detail (version) information
|
84 |
+
* relevant to the item.
|
85 |
+
*
|
86 |
+
* @return void
|
87 |
+
*/
|
88 |
+
public function addError(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo)
|
89 |
+
{
|
90 |
+
$itemName = $this->getItemName($itemInfo, $errorInfo);
|
91 |
+
$error = $this->getErrorMsgTemplate();
|
92 |
+
|
93 |
+
$errorCode = $this->stringToErrorCode($itemName).'Found';
|
94 |
+
$data = array(
|
95 |
+
$itemName,
|
96 |
+
$errorInfo['not_in_version'],
|
97 |
+
);
|
98 |
+
|
99 |
+
$error = $this->filterErrorMsg($error, $itemInfo, $errorInfo);
|
100 |
+
$data = $this->filterErrorData($data, $itemInfo, $errorInfo);
|
101 |
+
|
102 |
+
$this->addMessage($phpcsFile, $error, $stackPtr, $errorInfo['error'], $errorCode, $data);
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
}//end class
|
vendor/wimg/php-compatibility/AbstractRemovedFeatureSniff.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_AbstractRemovedFeatureSniff.
|
4 |
+
*
|
5 |
+
* @category PHP
|
6 |
+
* @package PHPCompatibility
|
7 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* PHPCompatibility_AbstractRemovedFeatureSniff.
|
12 |
+
*
|
13 |
+
* @category PHP
|
14 |
+
* @package PHPCompatibility
|
15 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
16 |
+
*/
|
17 |
+
abstract class PHPCompatibility_AbstractRemovedFeatureSniff extends PHPCompatibility_AbstractComplexVersionSniff
|
18 |
+
{
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Determine whether an error/warning should be thrown for an item based on collected information.
|
23 |
+
*
|
24 |
+
* @param array $errorInfo Detail information about an item.
|
25 |
+
*
|
26 |
+
* @return bool
|
27 |
+
*/
|
28 |
+
protected function shouldThrowError(array $errorInfo)
|
29 |
+
{
|
30 |
+
return ($errorInfo['deprecated'] !== '' || $errorInfo['removed'] !== '');
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get an array of the non-PHP-version array keys used in a sub-array.
|
36 |
+
*
|
37 |
+
* By default, removed feature version arrays, contain an additional 'alternative' array key.
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
protected function getNonVersionArrayKeys()
|
42 |
+
{
|
43 |
+
return array('alternative');
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Retrieve the relevant detail (version) information for use in an error message.
|
49 |
+
*
|
50 |
+
* @param array $itemArray Version and other information about the item.
|
51 |
+
* @param array $itemInfo Base information about the item.
|
52 |
+
*
|
53 |
+
* @return array
|
54 |
+
*/
|
55 |
+
public function getErrorInfo(array $itemArray, array $itemInfo)
|
56 |
+
{
|
57 |
+
$errorInfo = array(
|
58 |
+
'deprecated' => '',
|
59 |
+
'removed' => '',
|
60 |
+
'alternative' => '',
|
61 |
+
'error' => false,
|
62 |
+
);
|
63 |
+
|
64 |
+
$versionArray = $this->getVersionArray($itemArray);
|
65 |
+
|
66 |
+
if (empty($versionArray) === false) {
|
67 |
+
foreach ($versionArray as $version => $removed) {
|
68 |
+
if ($this->supportsAbove($version) === true) {
|
69 |
+
if ($removed === true && $errorInfo['removed'] === '') {
|
70 |
+
$errorInfo['removed'] = $version;
|
71 |
+
$errorInfo['error'] = true;
|
72 |
+
} else if ($errorInfo['deprecated'] === '') {
|
73 |
+
$errorInfo['deprecated'] = $version;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
if (isset($itemArray['alternative']) === true) {
|
80 |
+
$errorInfo['alternative'] = $itemArray['alternative'];
|
81 |
+
}
|
82 |
+
|
83 |
+
return $errorInfo;
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Get the error message template for suggesting an alternative for a specific sniff.
|
89 |
+
*
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
protected function getAlternativeOptionTemplate()
|
93 |
+
{
|
94 |
+
return '; Use %s instead';
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Generates the error or warning for this item.
|
100 |
+
*
|
101 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
102 |
+
* @param int $stackPtr The position of the relevant token in
|
103 |
+
* the stack.
|
104 |
+
* @param array $itemInfo Base information about the item.
|
105 |
+
* @param array $errorInfo Array with detail (version) information
|
106 |
+
* relevant to the item.
|
107 |
+
*
|
108 |
+
* @return void
|
109 |
+
*/
|
110 |
+
public function addError(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo)
|
111 |
+
{
|
112 |
+
$itemName = $this->getItemName($itemInfo, $errorInfo);
|
113 |
+
$error = $this->getErrorMsgTemplate();
|
114 |
+
|
115 |
+
$errorCode = $this->stringToErrorCode($itemName);
|
116 |
+
$data = array($itemName);
|
117 |
+
|
118 |
+
if ($errorInfo['deprecated'] !== '') {
|
119 |
+
$error .= 'deprecated since PHP %s and ';
|
120 |
+
$errorCode .= 'Deprecated';
|
121 |
+
$data[] = $errorInfo['deprecated'];
|
122 |
+
}
|
123 |
+
|
124 |
+
if ($errorInfo['removed'] !== '') {
|
125 |
+
$error .= 'removed since PHP %s and ';
|
126 |
+
$errorCode .= 'Removed';
|
127 |
+
$data[] = $errorInfo['removed'];
|
128 |
+
}
|
129 |
+
|
130 |
+
// Remove the last 'and' from the message.
|
131 |
+
$error = substr($error, 0, (strlen($error) - 5));
|
132 |
+
|
133 |
+
if ($errorInfo['alternative'] !== '') {
|
134 |
+
$error .= $this->getAlternativeOptionTemplate();
|
135 |
+
$data[] = $errorInfo['alternative'];
|
136 |
+
}
|
137 |
+
|
138 |
+
$error = $this->filterErrorMsg($error, $itemInfo, $errorInfo);
|
139 |
+
$data = $this->filterErrorData($data, $itemInfo, $errorInfo);
|
140 |
+
|
141 |
+
$this->addMessage($phpcsFile, $error, $stackPtr, $errorInfo['error'], $errorCode, $data);
|
142 |
+
|
143 |
+
}//end addError()
|
144 |
+
|
145 |
+
|
146 |
+
}//end class
|
vendor/wimg/php-compatibility/ComplexVersionInterface.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_ComplexVersionInterface.
|
4 |
+
*
|
5 |
+
* @category PHP
|
6 |
+
* @package PHPCompatibility
|
7 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* PHPCompatibility_ComplexVersionInterface.
|
12 |
+
*
|
13 |
+
* Interface to be implemented by sniffs using a multi-dimensional array of
|
14 |
+
* PHP features (functions, classes etc) being sniffed for with version
|
15 |
+
* information in sub-arrays.
|
16 |
+
*
|
17 |
+
* @category PHP
|
18 |
+
* @package PHPCompatibility
|
19 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
20 |
+
*/
|
21 |
+
interface PHPCompatibility_ComplexVersionInterface
|
22 |
+
{
|
23 |
+
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Handle the retrieval of relevant information and - if necessary - throwing of an
|
27 |
+
* error/warning for an item.
|
28 |
+
*
|
29 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
30 |
+
* @param int $stackPtr The position of the relevant token in
|
31 |
+
* the stack.
|
32 |
+
* @param array $itemInfo Base information about the item.
|
33 |
+
*
|
34 |
+
* @return void
|
35 |
+
*/
|
36 |
+
public function handleFeature(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo);
|
37 |
+
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get the relevant sub-array for a specific item from a multi-dimensional array.
|
41 |
+
*
|
42 |
+
* @param array $itemInfo Base information about the item.
|
43 |
+
*
|
44 |
+
* @return array Version and other information about the item.
|
45 |
+
*/
|
46 |
+
public function getItemArray(array $itemInfo);
|
47 |
+
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Retrieve the relevant detail (version) information for use in an error message.
|
51 |
+
*
|
52 |
+
* @param array $itemArray Version and other information about the item.
|
53 |
+
* @param array $itemInfo Base information about the item.
|
54 |
+
*
|
55 |
+
* @return array
|
56 |
+
*/
|
57 |
+
public function getErrorInfo(array $itemArray, array $itemInfo);
|
58 |
+
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Generates the error or warning for this item.
|
62 |
+
*
|
63 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
64 |
+
* @param int $stackPtr The position of the relevant token in
|
65 |
+
* the stack.
|
66 |
+
* @param array $itemInfo Base information about the item.
|
67 |
+
* @param array $errorInfo Array with detail (version) information
|
68 |
+
* relevant to the item.
|
69 |
+
*
|
70 |
+
* @return void
|
71 |
+
*/
|
72 |
+
public function addError(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $itemInfo, array $errorInfo);
|
73 |
+
|
74 |
+
|
75 |
+
}//end interface
|
vendor/wimg/php-compatibility/Sniffs/PHP/VariableVariablesSniff.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* PHPCompatibility_Sniffs_PHP_VariableVariables.
|
4 |
+
*
|
5 |
+
* PHP version 7.0
|
6 |
+
*
|
7 |
+
* @category PHP
|
8 |
+
* @package PHPCompatibility
|
9 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* PHPCompatibility_Sniffs_PHP_VariableVariables.
|
14 |
+
*
|
15 |
+
* The interpretation of variable variables has changed in PHP 7.0.
|
16 |
+
*
|
17 |
+
* PHP version 7.0
|
18 |
+
*
|
19 |
+
* @category PHP
|
20 |
+
* @package PHPCompatibility
|
21 |
+
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
|
22 |
+
*/
|
23 |
+
class PHPCompatibility_Sniffs_PHP_VariableVariablesSniff extends PHPCompatibility_Sniff
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Returns an array of tokens this test wants to listen for.
|
27 |
+
*
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public function register()
|
31 |
+
{
|
32 |
+
return array(T_VARIABLE);
|
33 |
+
|
34 |
+
}//end register()
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Processes this test, when one of its tokens is encountered.
|
38 |
+
*
|
39 |
+
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
40 |
+
* @param int $stackPtr The position of the current token
|
41 |
+
* in the stack passed in $tokens.
|
42 |
+
*
|
43 |
+
* @return void
|
44 |
+
*/
|
45 |
+
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
46 |
+
{
|
47 |
+
if ($this->supportsAbove('7.0') === false) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
|
51 |
+
$tokens = $phpcsFile->getTokens();
|
52 |
+
|
53 |
+
// Verify that the next token is a square open bracket. If not, bow out.
|
54 |
+
$nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true, null, true);
|
55 |
+
|
56 |
+
if ($nextToken === false || $tokens[$nextToken]['code'] !== T_OPEN_SQUARE_BRACKET || isset($tokens[$nextToken]['bracket_closer']) === false) {
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
|
60 |
+
// The previous token has to be a $, -> or ::.
|
61 |
+
if (isset($tokens[($stackPtr - 1)]) === false || in_array($tokens[($stackPtr - 1)]['code'], array(T_DOLLAR, T_OBJECT_OPERATOR, T_DOUBLE_COLON), true) === false) {
|
62 |
+
return;
|
63 |
+
}
|
64 |
+
|
65 |
+
// For static object calls, it only applies when this is a function call.
|
66 |
+
if ($tokens[($stackPtr - 1)]['code'] === T_DOUBLE_COLON) {
|
67 |
+
$hasBrackets = $tokens[$nextToken]['bracket_closer'];
|
68 |
+
while (($hasBrackets = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($hasBrackets + 1), null, true, null, true)) !== false ) {
|
69 |
+
if ($tokens[$hasBrackets]['code'] === T_OPEN_SQUARE_BRACKET) {
|
70 |
+
if (isset($tokens[$hasBrackets]['bracket_closer'])) {
|
71 |
+
$hasBrackets = $tokens[$hasBrackets]['bracket_closer'];
|
72 |
+
continue;
|
73 |
+
}
|
74 |
+
else {
|
75 |
+
// Live coding.
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
elseif ($tokens[$hasBrackets]['code'] === T_OPEN_PARENTHESIS) {
|
80 |
+
// Caught!
|
81 |
+
break;
|
82 |
+
}
|
83 |
+
else {
|
84 |
+
// Not a function call, so bow out.
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
// Now let's also prevent false positives when used with self and static which still work fine.
|
90 |
+
$classToken = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 2), null, true, null, true);
|
91 |
+
if ($classToken !== false) {
|
92 |
+
if ($tokens[$classToken]['code'] === T_STATIC || $tokens[$classToken]['code'] === T_SELF) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
elseif ($tokens[$classToken]['code'] === T_STRING && $tokens[$classToken]['content'] === 'self') {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
$phpcsFile->addError(
|
102 |
+
'Indirect access to variables, properties and methods will be evaluated strictly in left-to-right order since PHP 7.0. Use curly braces to remove ambiguity.',
|
103 |
+
$stackPtr,
|
104 |
+
'Found'
|
105 |
+
);
|
106 |
+
|
107 |
+
}//end process()
|
108 |
+
|
109 |
+
|
110 |
+
}//end class
|
vendor/wimg/php-compatibility/phpcs.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<ruleset name="PHPCS Coding Standards for PHPCompatibility">
|
3 |
+
<description>Check the code of the PHPCompatibility standard itself.</description>
|
4 |
+
|
5 |
+
<arg value="sp"/>
|
6 |
+
<arg name="extensions" value="php"/>
|
7 |
+
|
8 |
+
<!-- Exclude test case code. -->
|
9 |
+
<exclude-pattern>/Tests/sniff-examples/*</exclude-pattern>
|
10 |
+
|
11 |
+
<!-- Exclude Composer vendor directory. -->
|
12 |
+
<exclude-pattern>*/vendor/*</exclude-pattern>
|
13 |
+
|
14 |
+
<config name="testVersion" value="5.1-99.0"/>
|
15 |
+
<rule ref="PHPCompatibility"/>
|
16 |
+
|
17 |
+
<!-- Verified correct usage. -->
|
18 |
+
<rule ref="PHPCompatibility.PHP.DeprecatedIniDirectives.asp_tagsRemoved">
|
19 |
+
<exclude-pattern>*/RemovedAlternativePHPTags*.php</exclude-pattern>
|
20 |
+
</rule>
|
21 |
+
|
22 |
+
</ruleset>
|
wpengine-phpcompat.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: PHP Compatibility Checker
|
|
4 |
Plugin URI: https://wpengine.com
|
5 |
Description: Make sure your plugins and themes are compatible with newer PHP versions.
|
6 |
Author: WP Engine
|
7 |
-
Version: 1.4.
|
8 |
Author URI: https://wpengine.com
|
9 |
Text Domain: php-compatibility-checker
|
10 |
*/
|
4 |
Plugin URI: https://wpengine.com
|
5 |
Description: Make sure your plugins and themes are compatible with newer PHP versions.
|
6 |
Author: WP Engine
|
7 |
+
Version: 1.4.3
|
8 |
Author URI: https://wpengine.com
|
9 |
Text Domain: php-compatibility-checker
|
10 |
*/
|