@@ -126,7 +126,7 @@ |
||
| 126 | 126 | */ |
| 127 | 127 | private static function matchTypeToRegex($type, $regex, $fileContents) |
| 128 | 128 | { |
| 129 | - $matches=[]; |
|
| 129 | + $matches = []; |
|
| 130 | 130 | if (!preg_match($regex, $fileContents, $matches)) { |
| 131 | 131 | return null; |
| 132 | 132 | } |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | */ |
| 127 | 127 | private static function matchTypeToRegex($type, $regex, $fileContents) |
| 128 | 128 | { |
| 129 | - $matches=[]; |
|
| 129 | + $matches = []; |
|
| 130 | 130 | if (!preg_match($regex, $fileContents, $matches)) { |
| 131 | 131 | return null; |
| 132 | 132 | } |
@@ -65,6 +65,9 @@ discard block |
||
| 65 | 65 | return self::usingBinary("/usr/bin/lsb_release"); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | + /** |
|
| 69 | + * @param string $pathToBinary |
|
| 70 | + */ |
|
| 68 | 71 | public static function usingBinary($pathToBinary) |
| 69 | 72 | { |
| 70 | 73 | $output = self::getOutputFromBinary($pathToBinary); |
@@ -119,6 +122,9 @@ discard block |
||
| 119 | 122 | return [$distroName, $distroVersion]; |
| 120 | 123 | } |
| 121 | 124 | |
| 125 | + /** |
|
| 126 | + * @param string $fieldName |
|
| 127 | + */ |
|
| 122 | 128 | private static function extractField($lines, $fieldName) |
| 123 | 129 | { |
| 124 | 130 | $matches = FilterForMatchingString::against($lines, $fieldName); |