Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -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()
{
@@ -61,21 +61,24 @@ class SplFileInfo extends \SplFileInfo
{
$filename = $this->getFilename();
return \pathinfo($filename, PATHINFO_FILENAME);
return pathinfo($filename, \PATHINFO_FILENAME);
}
/**
* 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);
}