From cbb5124d59dcdf2cc5a4e3eb10fe4655b5328388 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Wed, 21 Nov 2018 16:36:29 +0100 Subject: [PATCH] Code standards --- src/Model/Photo.php | 4 ++-- src/Model/Storage/IStorage.php | 2 +- src/Model/Storage/SystemResource.php | 2 +- src/Module/Photo.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/Photo.php b/src/Model/Photo.php index 3c22c52bc..3e0d5e40a 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -125,7 +125,7 @@ class Photo extends BaseObject $data = ""; if ($photo["backend-class"] == "") { // legacy data storage in "data" column - $i = self::selectFirst(["data"], ["id"=>$photo["id"]]); + $i = self::selectFirst(["data"], ["id" => $photo["id"]]); if ($i === false) { return null; } @@ -168,7 +168,7 @@ class Photo extends BaseObject $fields = self::getFields(); $values = array_fill(0, count($fields), ""); $photo = array_combine($fields, $values); - $photo["backend-class"] = "\Friendica\Model\Storage\SystemResource"; + $photo["backend-class"] = \Friendica\Model\Storage\SystemResource::class; $photo["backend-ref"] = $filename; $photo["type"] = $mimetype; $photo["cacheable"] = false; diff --git a/src/Model/Storage/IStorage.php b/src/Model/Storage/IStorage.php index 93298050d..deacb8ffc 100644 --- a/src/Model/Storage/IStorage.php +++ b/src/Model/Storage/IStorage.php @@ -19,7 +19,7 @@ interface IStorage public static function get($ref); /** - * @brief Put data in backend as $ref. If $ref is not defiend a new reference is created. + * @brief Put data in backend as $ref. If $ref is not defined a new reference is created. * @param string $data Data to save * @param string $ref Data referece. Optional. * @return string Saved data referece diff --git a/src/Model/Storage/SystemResource.php b/src/Model/Storage/SystemResource.php index b54aabf6a..354b1e328 100644 --- a/src/Model/Storage/SystemResource.php +++ b/src/Model/Storage/SystemResource.php @@ -30,7 +30,7 @@ class SystemResource implements IStorage } - public static function put($data, $filename="") + public static function put($data, $filename = "") { throw new \BadMethodCallException(); } diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 13d925376..a175f7c09 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -150,7 +150,7 @@ class Photo extends BaseModule } $photo = MPhoto::selectFirst([], ["scale" => $scale, "uid" => $uid, "profile" => 1]); - if ($photo===false) { + if ($photo === false) { $photo = MPhoto::createPhotoForSystemResource($default); } return $photo;