Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | protected function findConfigLine(string $namespace, string $key): array |
||
32 | { |
||
33 | $file = realpath("config/$namespace.php"); |
||
34 | $contents = Filesystem::getContents($file); |
||
35 | $lines = explode("\n", $contents); |
||
36 | |||
37 | foreach ($lines as $line => $content) { |
||
38 | if (str_contains($content, "'$key' =>")) { |
||
39 | break; |
||
40 | } |
||
41 | } |
||
42 | |||
43 | assert($file !== false); |
||
44 | assert(isset($line)); |
||
45 | |||
46 | return [$file, $line + 1]; |
||
47 | } |
||
63 |