Address code standards issues

This commit is contained in:
fabrixxm 2018-11-21 15:10:47 +01:00 committed by Hypolite Petovan
parent 12dd7b552f
commit 9317a1c054
6 changed files with 53 additions and 44 deletions

View file

@ -15,18 +15,22 @@ namespace Friendica\Model\Storage;
class SystemResource implements IStorage
{
// Valid folders to look for resources
const VALID_FOLDERS = [ "images" ];
const VALID_FOLDERS = ["images"];
public static function get($filename)
{
$folder = dirname($filename);
if (!in_array($folder, self::VALID_FOLDERS)) return "";
if (!file_exists($filename)) return "";
if (!in_array($folder, self::VALID_FOLDERS)) {
return "";
}
if (!file_exists($filename)) {
return "";
}
return file_get_contents($filename);
}
public static function put($data, $filename=null)
public static function put($data, $filename="")
{
throw new \BadMethodCallException();
}