Upgrade to 3.5

This commit is contained in:
Bastian Allgeier
2020-12-15 11:01:41 +01:00
parent eabce32cf0
commit 9109130c9c
43 changed files with 306 additions and 159 deletions

View File

@@ -547,14 +547,19 @@ class F
}
/**
* Reads the content of a file
* Reads the content of a file or requests the
* contents of a remote HTTP or HTTPS URL
*
* @param string $file The path for the file
* @param string $file The path for the file or an absolute URL
* @return string|false
*/
public static function read(string $file)
{
if (is_file($file) !== true) {
if (
is_file($file) !== true &&
Str::startsWith($file, 'https://') !== true &&
Str::startsWith($file, 'http://') !== true
) {
return false;
}

View File

@@ -232,7 +232,7 @@ class File
/**
* Reads the file content and returns it.
*
* @return string
* @return string|false
*/
public function read()
{