for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Rico\Lib;
use Rico\Slib\FileUtils as StaticFileUtils;
class FileUtils
{
/**
* Adds a new $line at the end of a $file without duplication.
*
* @param string $file
* @param string $line
* @return bool|null
*/
public function addLine(string $file, string $line)
return StaticFileUtils::addLine($file, $line);
}
* Counts the number of lines in a $file.
* @param bool $countEmpty
* @return int|bool
public function count(string $file, bool $countEmpty = false)
return StaticFileUtils::count($file, $countEmpty);
* Extracts the extension (without the dot) of a filename alone or contained in a path.
* @param string $filename
* @return string
public function extractExtension(string $filename): string
return StaticFileUtils::extractExtension($filename);