upgraded dependencies
This commit is contained in:
13
vendor/symfony/finder/SplFileInfo.php
vendored
13
vendor/symfony/finder/SplFileInfo.php
vendored
@@ -38,7 +38,7 @@ class SplFileInfo extends \SplFileInfo
|
||||
*
|
||||
* This path does not contain the file name.
|
||||
*
|
||||
* @return string the relative path
|
||||
* @return string
|
||||
*/
|
||||
public function getRelativePath()
|
||||
{
|
||||
@@ -50,7 +50,7 @@ class SplFileInfo extends \SplFileInfo
|
||||
*
|
||||
* This path contains the file name.
|
||||
*
|
||||
* @return string the relative path name
|
||||
* @return string
|
||||
*/
|
||||
public function getRelativePathname()
|
||||
{
|
||||
@@ -67,15 +67,18 @@ class SplFileInfo extends \SplFileInfo
|
||||
/**
|
||||
* Returns the contents of the file.
|
||||
*
|
||||
* @return string the contents of the file
|
||||
* @return string
|
||||
*
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function getContents()
|
||||
{
|
||||
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
|
||||
$content = file_get_contents($this->getPathname());
|
||||
restore_error_handler();
|
||||
try {
|
||||
$content = file_get_contents($this->getPathname());
|
||||
} finally {
|
||||
restore_error_handler();
|
||||
}
|
||||
if (false === $content) {
|
||||
throw new \RuntimeException($error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user