public static function computeFileLines($fileContents)
{
$lines = [];
if (preg_match_all("/(\\n)/siU", $fileContents, $matches, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE)) {
foreach ($matches[1] as $index => $key) {
$lines[] = $key[1];
}
}
return $lines;
}