This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
|||||||||||
2 | ||||||||||||
3 | namespace KochTest\Autoload; |
|||||||||||
4 | ||||||||||||
5 | use Koch\Autoload\Loader; |
|||||||||||
6 | ||||||||||||
7 | /** |
|||||||||||
8 | * Interface and Class definition for testing |
|||||||||||
9 | * the autoload skipping, when "already loaded". |
|||||||||||
10 | */ |
|||||||||||
11 | interface ThisInterfaceExists |
|||||||||||
0 ignored issues
–
show
|
||||||||||||
12 | { |
|||||||||||
13 | } |
|||||||||||
14 | ||||||||||||
15 | class ThisClassExists |
|||||||||||
0 ignored issues
–
show
|
||||||||||||
16 | { |
|||||||||||
17 | } |
|||||||||||
18 | ||||||||||||
19 | class LoaderTest extends \PHPUnit_Framework_TestCase |
|||||||||||
0 ignored issues
–
show
|
||||||||||||
20 | { |
|||||||||||
21 | public $classMapFile = 'autoloader.classmap.php'; |
|||||||||||
22 | ||||||||||||
23 | public function setUp() |
|||||||||||
24 | { |
|||||||||||
25 | parent::setUp(); |
|||||||||||
26 | ||||||||||||
27 | // add Fixtures folder, only if not already on the include_path |
|||||||||||
28 | $path = realpath(__DIR__ . '/fixtures'); |
|||||||||||
29 | if (strpos(get_include_path(), $path) === false) { |
|||||||||||
30 | set_include_path($path . PATH_SEPARATOR . get_include_path()); |
|||||||||||
31 | } |
|||||||||||
32 | ||||||||||||
33 | /* |
|||||||||||
34 | * The APC user cache needs a reset, so that the map is generated freshly each run. |
|||||||||||
35 | * APC is used by readAutoloadingMapApc() / writeAutoloadingMapApc(). |
|||||||||||
36 | */ |
|||||||||||
37 | self::apcClearCache(); |
|||||||||||
38 | ||||||||||||
39 | Loader::setClassMapFile($this->classMapFile); |
|||||||||||
40 | } |
|||||||||||
41 | ||||||||||||
42 | public function tearDown() |
|||||||||||
43 | { |
|||||||||||
44 | self::apcClearCache(); |
|||||||||||
45 | } |
|||||||||||
46 | ||||||||||||
47 | public static function apcClearCache() |
|||||||||||
48 | { |
|||||||||||
49 | if (extension_loaded('apc') and ini_get('apc.enabled') and ini_get('apc.enable_cli')) { |
|||||||||||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
Using logical operators such as
and instead of && is generally not recommended.
PHP has two types of connecting operators (logical operators, and boolean operators):
The difference between these is the order in which they are executed. In most cases,
you would want to use a boolean operator like Let’s take a look at a few examples: // Logical operators have lower precedence:
$f = false or true;
// is executed like this:
($f = false) or true;
// Boolean operators have higher precedence:
$f = false || true;
// is executed like this:
$f = (false || true);
Logical Operators are used for Control-FlowOne case where you explicitly want to use logical operators is for control-flow such as this: $x === 5
or die('$x must be 5.');
// Instead of
if ($x !== 5) {
die('$x must be 5.');
}
Since // The following is currently a parse error.
$x === 5
or throw new RuntimeException('$x must be 5.');
These limitations lead to logical operators rarely being of use in current PHP code. ![]() |
||||||||||||
50 | apc_clear_cache('user'); |
|||||||||||
51 | } |
|||||||||||
52 | } |
|||||||||||
53 | ||||||||||||
54 | /** |
|||||||||||
55 | * testMethodautoload(). |
|||||||||||
56 | */ |
|||||||||||
57 | public function testMethodautoload() |
|||||||||||
58 | { |
|||||||||||
59 | // workflow of autoloading |
|||||||||||
60 | ||||||||||||
61 | // 1. existing class |
|||||||||||
62 | $this->assertFalse(Loader::autoload('ThisClassExists')); |
|||||||||||
63 | // 2. existing interface |
|||||||||||
64 | $this->assertFalse(Loader::autoload('ThisInterfaceExists')); |
|||||||||||
65 | // 3. existing trait |
|||||||||||
66 | if (PHP_VERSION_ID <= 50400) { |
|||||||||||
67 | $this->assertFalse(Loader::autoload('ClassADefinesTraitA')); |
|||||||||||
68 | } |
|||||||||||
69 | // PHP 5.4.6 Bug... trait_exists does not return anything (true|false|null). |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
41% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
70 | // So a "cannot redeclare class TraitA" fatal error is thrown. |
|||||||||||
71 | //$this->assertFalse(Loader::autoload('ClassBDefinesTraitA')); |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
75% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
72 | ||||||||||||
73 | // 1. autoloadExclusions() |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
50% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
74 | // 2. autoloadInclusions() |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
50% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
75 | // 3. autoloadByApcOrFileMap() |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
50% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
76 | // 4. autoloadIncludePath() |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
50% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
77 | // 5. autoloadTryPathsAndMap() |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
50% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
78 | } |
|||||||||||
79 | ||||||||||||
80 | public function testMethodconstruct() |
|||||||||||
81 | { |
|||||||||||
82 | // unregister first (autoloader was registered during test setup) |
|||||||||||
83 | $r = spl_autoload_unregister(['Koch\Autoload\Loader', 'autoload']); |
|||||||||||
0 ignored issues
–
show
$r is not used, you could remove the assignment.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently. $myVar = 'Value';
$higher = false;
if (rand(1, 6) > 3) {
$higher = true;
} else {
$higher = false;
}
Both the ![]() |
||||||||||||
84 | ||||||||||||
85 | // registers autoloader via constructor |
|||||||||||
86 | new Loader(); |
|||||||||||
87 | ||||||||||||
88 | // test Koch Framework Autoloader is registered in the spl_autoloader_stack at first place |
|||||||||||
89 | $registered_autoloaders = spl_autoload_functions(); |
|||||||||||
0 ignored issues
–
show
$registered_autoloaders does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
||||||||||||
90 | ||||||||||||
91 | $this->assertTrue(is_string($registered_autoloaders[0][0])); |
|||||||||||
0 ignored issues
–
show
$registered_autoloaders does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
||||||||||||
92 | $this->assertFalse(is_object($registered_autoloaders[0][0])); |
|||||||||||
0 ignored issues
–
show
$registered_autoloaders does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
||||||||||||
93 | ||||||||||||
94 | $this->assertEquals('Koch\Autoload\Loader', $registered_autoloaders[0][0]); |
|||||||||||
0 ignored issues
–
show
$registered_autoloaders does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
||||||||||||
95 | $this->assertEquals('autoload', $registered_autoloaders[0][1]); |
|||||||||||
0 ignored issues
–
show
$registered_autoloaders does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$ ).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. ![]() |
||||||||||||
96 | } |
|||||||||||
97 | ||||||||||||
98 | /** |
|||||||||||
99 | * testMethodautoloadExclusions(). |
|||||||||||
100 | */ |
|||||||||||
101 | public function testMethodautoloadExclusions() |
|||||||||||
102 | { |
|||||||||||
103 | // exclude "Smarty_Internal" classes |
|||||||||||
104 | $this->assertTrue(Loader::autoloadExclusions('Smarty_Internal_SomeClass')); |
|||||||||||
105 | ||||||||||||
106 | // exclude "Doctrine" classes |
|||||||||||
107 | $this->assertTrue(Loader::autoloadExclusions('Doctrine_SomeClass')); |
|||||||||||
108 | $this->assertTrue(Loader::autoloadExclusions('Doctrine\SomeClass')); |
|||||||||||
109 | ||||||||||||
110 | // but not, our own namespaced doctrine classes "Koch\Doctrine\" |
|||||||||||
111 | $this->assertFalse(Loader::autoloadExclusions('Koch\Doctrine\SomeClass')); |
|||||||||||
112 | $this->assertFalse(Loader::autoloadExclusions('Koch\Pagination\Adapter\Doctrine')); |
|||||||||||
113 | ||||||||||||
114 | // exclude "Smarty" classes |
|||||||||||
115 | $this->assertTrue(Loader::autoloadExclusions('Smarty_')); |
|||||||||||
116 | ||||||||||||
117 | // but not, our own smarty class "\Smarty" |
|||||||||||
118 | $this->assertFalse(Loader::autoloadExclusions('Koch\View\Renderer\Smarty')); |
|||||||||||
119 | } |
|||||||||||
120 | ||||||||||||
121 | /** |
|||||||||||
122 | * testMethodautoloadInclusions(). |
|||||||||||
123 | */ |
|||||||||||
124 | public function testMethodautoloadInclusions() |
|||||||||||
125 | { |
|||||||||||
126 | // try to load an unknown class |
|||||||||||
127 | $this->assertFalse(Loader::autoloadInclusions('SomeUnknownClass')); |
|||||||||||
128 | ||||||||||||
129 | // try to load "Application_Staging" class |
|||||||||||
130 | // no definitions atm |
|||||||||||
131 | #$this->assertTrue(Loader::autoloadInclusions('Application_Staging')); |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
75% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
132 | } |
|||||||||||
133 | ||||||||||||
134 | /** |
|||||||||||
135 | * testMethodautoloadByApcOrFileMap. |
|||||||||||
136 | */ |
|||||||||||
137 | public function testMethodautoloadByApcOrFileMap() |
|||||||||||
138 | { |
|||||||||||
139 | // try to load an unknown class |
|||||||||||
140 | $this->assertFalse(Loader::autoloadByApcOrFileMap('SomeUnknownClass')); |
|||||||||||
141 | ||||||||||||
142 | Loader::addMapping('Captcha', realpath(__DIR__ . '/../../../framework/Koch/Captcha/Captcha.php')); |
|||||||||||
143 | $this->assertTrue(Loader::autoloadByApcOrFileMap('Captcha')); |
|||||||||||
144 | } |
|||||||||||
145 | ||||||||||||
146 | /** |
|||||||||||
147 | * testMethodautoloadIncludePath(). |
|||||||||||
148 | */ |
|||||||||||
149 | public function testMethodautoloadIncludePath() |
|||||||||||
150 | { |
|||||||||||
151 | // try to load an unknown class |
|||||||||||
152 | $this->assertFalse(Loader::autoloadIncludePath('\Namespace\Library\SomeUnknownClass')); |
|||||||||||
153 | ||||||||||||
154 | // set the include path to our fixtures directory, where a namespaced class exists |
|||||||||||
155 | $path = __DIR__ . '/fixtures/Application'; |
|||||||||||
156 | set_include_path($path . PATH_SEPARATOR . get_include_path()); |
|||||||||||
157 | ||||||||||||
158 | // try to load existing namespaced class |
|||||||||||
159 | $this->assertTrue(Loader::autoloadIncludePath('NamespacedClass')); |
|||||||||||
160 | } |
|||||||||||
161 | ||||||||||||
162 | View Code Duplication | public function testMethodwriteAutoloadingMapFile() |
||||||||||
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
||||||||||||
163 | { |
|||||||||||
164 | if (is_file($this->classMapFile)) { |
|||||||||||
165 | unlink($this->classMapFile); |
|||||||||||
166 | } |
|||||||||||
167 | ||||||||||||
168 | // file will be created |
|||||||||||
169 | $this->assertSame([], Loader::readAutoloadingMapFile()); |
|||||||||||
170 | $this->assertTrue(is_file($this->classMapFile)); |
|||||||||||
171 | ||||||||||||
172 | $array = ['class' => 'file']; |
|||||||||||
173 | $this->assertTrue(Loader::writeAutoloadingMapFile($array)); |
|||||||||||
174 | $this->assertSame($array, Loader::readAutoloadingMapFile()); |
|||||||||||
175 | } |
|||||||||||
176 | ||||||||||||
177 | View Code Duplication | public function testMethodreadAutoloadingMapFile() |
||||||||||
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
||||||||||||
178 | { |
|||||||||||
179 | if (is_file($this->classMapFile)) { |
|||||||||||
180 | unlink($this->classMapFile); |
|||||||||||
181 | } |
|||||||||||
182 | // file will be created |
|||||||||||
183 | $this->assertSame([], Loader::readAutoloadingMapFile()); |
|||||||||||
184 | $this->assertTrue(is_file($this->classMapFile)); |
|||||||||||
185 | ||||||||||||
186 | $array = ['class' => 'file']; |
|||||||||||
187 | $this->assertTrue(Loader::writeAutoloadingMapFile($array)); |
|||||||||||
188 | $this->assertSame($array, Loader::readAutoloadingMapFile()); |
|||||||||||
189 | } |
|||||||||||
190 | ||||||||||||
191 | public function testMethodwriteAutoloadingMapApc() |
|||||||||||
192 | { |
|||||||||||
193 | if (!extension_loaded('apc')) { |
|||||||||||
194 | $this->markTestSkipped('This test requires the PHP extension "apc".'); |
|||||||||||
195 | } |
|||||||||||
196 | ||||||||||||
197 | $array = ['class' => 'file']; |
|||||||||||
198 | $this->assertTrue(Loader::writeAutoloadingMapApc($array)); |
|||||||||||
199 | $this->assertSame($array, Loader::readAutoloadingMapApc()); |
|||||||||||
200 | } |
|||||||||||
201 | ||||||||||||
202 | public function testMethodreadAutoloadingMapApc() |
|||||||||||
203 | { |
|||||||||||
204 | if (!extension_loaded('apc')) { |
|||||||||||
205 | $this->markTestSkipped(' This test requires the PHP extension "apc".'); |
|||||||||||
206 | } |
|||||||||||
207 | ||||||||||||
208 | $this->assertSame(apc_fetch('KF_CLASSMAP'), Loader::readAutoloadingMapApc()); |
|||||||||||
209 | } |
|||||||||||
210 | ||||||||||||
211 | View Code Duplication | public function testMethodaddMapping() |
||||||||||
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
||||||||||||
212 | { |
|||||||||||
213 | $class = 'addToMappingClass'; |
|||||||||||
214 | $file = realpath(__DIR__ . '/fixtures/notloaded/addToMapping.php'); |
|||||||||||
215 | ||||||||||||
216 | $this->assertTrue(Loader::addMapping($class, $file)); |
|||||||||||
217 | ||||||||||||
218 | // test if the entry was added to the autoloader class map array |
|||||||||||
219 | $map = Loader::getAutoloaderClassMap(); |
|||||||||||
220 | // entry exists |
|||||||||||
221 | $this->assertTrue(true, array_key_exists($class, $map)); |
|||||||||||
222 | // compare entries |
|||||||||||
223 | $this->assertEquals($map[$class], $file); |
|||||||||||
224 | ||||||||||||
225 | // file not loaded, just mapped |
|||||||||||
226 | #$this->assertFalse(class_exists($class, false)); |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
77% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
227 | ||||||||||||
228 | // triggering autoload via class_exists |
|||||||||||
229 | // --- WARNING --- |
|||||||||||
230 | // The "Koch Framework Autoloader" needs to be registered BEFORE "Composers Autoloader". |
|||||||||||
231 | $this->assertTrue(class_exists($class, true)); |
|||||||||||
232 | } |
|||||||||||
233 | ||||||||||||
234 | View Code Duplication | public function testMethodincludeFileAndMap() |
||||||||||
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
||||||||||||
235 | { |
|||||||||||
236 | $file = realpath(__DIR__ . '/fixtures/includeFileAndMap.php'); |
|||||||||||
237 | $class = 'includeFileAndMapClass'; |
|||||||||||
238 | ||||||||||||
239 | Loader::includeFileAndMap($file, $class); |
|||||||||||
240 | ||||||||||||
241 | // test if the entry was added to the autoloader class map array |
|||||||||||
242 | $map = Loader::getAutoloaderClassMap(); |
|||||||||||
243 | ||||||||||||
244 | $this->assertTrue(true, array_key_exists($class, $map)); |
|||||||||||
245 | ||||||||||||
246 | $this->assertEquals($map[$class], $file); |
|||||||||||
247 | ||||||||||||
248 | // file already loaded |
|||||||||||
249 | $this->assertTrue(class_exists($class, false)); |
|||||||||||
250 | } |
|||||||||||
251 | ||||||||||||
252 | public function testMethodincludeFile() |
|||||||||||
253 | { |
|||||||||||
254 | // a) include file |
|||||||||||
255 | $this->assertTrue(Loader::includeFile(__DIR__ . '/fixtures/ClassForRequireFile1.php')); |
|||||||||||
256 | ||||||||||||
257 | // b) include class |
|||||||||||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
43% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
||||||||||||
258 | $this->assertTrue(Loader::includeFile(__DIR__ . '/fixtures/ClassForRequireFile2.php', 'ClassForRequireFile2')); |
|||||||||||
259 | ||||||||||||
260 | // c) include class (second parameter), but class does not exist |
|||||||||||
261 | $this->assertFalse(Loader::includeFile('nonExistantFile.php'), 'ThisClassDoesNotExist'); |
|||||||||||
262 | ||||||||||||
263 | // d) file not found returns false |
|||||||||||
264 | $this->assertFalse(Loader::includeFile('nonExistantFile.php')); |
|||||||||||
265 | } |
|||||||||||
266 | ||||||||||||
267 | public function testsetInclusionMap() |
|||||||||||
268 | { |
|||||||||||
269 | $classmap = ['class' => 'file']; |
|||||||||||
270 | Loader::setInclusionsClassMap($classmap); |
|||||||||||
271 | $this->assertEquals(Loader::$inclusionsClassmap, $classmap); |
|||||||||||
272 | } |
|||||||||||
273 | } |
|||||||||||
274 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.