The variable $siteSections does not exist. Did you forget to declare it?
This check marks access to variables or properties that have not been declared yet. While PHP
has no explicit notion of declaring a variable, accessing it before a value is assigned
to it is most likely a bug.
The variable $methodSections does not exist. Did you forget to declare it?
This check marks access to variables or properties that have not been declared yet. While PHP
has no explicit notion of declaring a variable, accessing it before a value is assigned
to it is most likely a bug.
Loading history...
29
30
/**
31
* Now put allowed lines back together
32
*/
33
$content = "$heading\n\n";
34
35
foreach ($siteSections as $siteSection) {
36
$content .= "$siteSection\n";
37
}
38
39
foreach ($methodSections as $methodSection) {
40
$content .= "$methodSection\n";
41
}
42
}
43
44
45
private function findHeading(string $content): string
46
{
47
if (preg_match('/^# ?[^#].+/m', $content, $matches)) {
48
return $matches[0];
49
}
50
51
return '# API Docs';
52
}
53
54
55
private function findSections(array $lines): array
56
{
57
$return = [1 => [], 2 => []];
58
59
foreach ($lines as $line) {
60
if (preg_match('/^(@@?) ?.+[^:]:.+\.md/', $line, $matches)) { // Section
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.