for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author stev leibelt <[email protected]>
* @since 2014-12-20
*/
namespace Net\Bazzline\Component\Locator\Configuration\Validator;
* Class ReadableFilePath
* @package Net\Bazzline\Component\Locator\Configuration\Validator
class ReadableFilePath
{
* @param string $path
* @throws RuntimeException
* @todo add interface
* @todo replace RuntimeException with InvalidArgumentException
public function validate($path)
if (!is_file($path)) {
throw new RuntimeException(
'provided path "' . $path . '" is not a file'
);
}
if (!is_readable($path)) {
'file "' . $path . '" is not readable'