File tree 1 file changed +18
-12
lines changed
1 file changed +18
-12
lines changed Original file line number Diff line number Diff line change 6
6
* See the COPYING-README file.
7
7
*/
8
8
9
- function loadDirectory ($ path ) {
9
+ function loadDirectory ($ path ): void {
10
10
if (strpos ($ path , 'integration ' )) {
11
11
return ;
12
12
}
13
+
13
14
if (strpos ($ path , 'Integration ' )) {
14
15
return ;
15
16
}
16
- if ($ dh = opendir ($ path )) {
17
- while ($ name = readdir ($ dh )) {
18
- if ($ name [0 ] !== '. ' ) {
19
- $ file = $ path . '/ ' . $ name ;
20
- if (is_dir ($ file )) {
21
- loadDirectory ($ file );
22
- } elseif (substr ($ name , -4 , 4 ) === '.php ' ) {
23
- require_once $ file ;
24
- }
25
- }
17
+
18
+ if (! $ dh = opendir ($ path )) {
19
+ return ;
20
+ }
21
+
22
+ while ($ name = readdir ($ dh )) {
23
+ if ($ name [0 ] === '. ' ) {
24
+ continue ;
25
+ }
26
+
27
+ $ file = $ path . '/ ' . $ name ;
28
+ if (is_dir ($ file )) {
29
+ loadDirectory ($ file );
30
+ } elseif (str_ends_with ($ name , '.php ' )) {
31
+ require_once $ file ;
26
32
}
27
33
}
28
34
}
29
35
30
- function getSubclasses ($ parentClassName ) {
36
+ function getSubclasses ($ parentClassName ): array {
31
37
$ classes = [];
32
38
foreach (get_declared_classes () as $ className ) {
33
39
if (is_subclass_of ($ className , $ parentClassName )) {
You can’t perform that action at this time.
0 commit comments