Fix types in doc blocks/prototypes

This commit is contained in:
Hypolite Petovan
2019-01-21 16:51:59 -05:00
parent 5ea033db33
commit 64847e7cc8
14 changed files with 91 additions and 77 deletions

View File

@@ -11,6 +11,7 @@ use Friendica\Core\System;
use Friendica\Core\StorageManager;
use Friendica\Database\DBA;
use Friendica\Database\DBStructure;
use Friendica\Model\Storage\IStorage;
use Friendica\Object\Image;
use Friendica\Util\Security;
use Friendica\Util\DateTimeFormat;
@@ -186,6 +187,7 @@ class Attach extends BaseObject
$filesize = strlen($data);
}
/** @var IStorage $backend_class */
$backend_class = StorageManager::getBackend();
$backend_ref = '';
if ($backend_class !== '') {
@@ -265,6 +267,7 @@ class Attach extends BaseObject
$items = self::select(['backend-class','backend-ref'], $conditions);
foreach($items as $item) {
/** @var IStorage $backend_class */
$backend_class = (string)$item['backend-class'];
if ($backend_class !== '') {
$fields['backend-ref'] = $backend_class::put($img->asString(), $item['backend-ref']);
@@ -297,6 +300,7 @@ class Attach extends BaseObject
$items = self::select(['backend-class','backend-ref'], $conditions);
foreach($items as $item) {
/** @var IStorage $backend_class */
$backend_class = (string)$item['backend-class'];
if ($backend_class !== '') {
$backend_class::delete($item['backend-ref']);

View File

@@ -157,7 +157,7 @@ class Mail
}
/**
* @param string $recipient recipient, default empty
* @param array $recipient recipient, default empty
* @param string $body message body, default empty
* @param string $subject message subject, default empty
* @param string $replyto reply to, default empty
@@ -165,7 +165,7 @@ class Mail
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function sendWall($recipient = '', $body = '', $subject = '', $replyto = '')
public static function sendWall(array $recipient = [], $body = '', $subject = '', $replyto = '')
{
if (!$recipient) {
return -1;

View File

@@ -14,6 +14,7 @@ use Friendica\Core\System;
use Friendica\Core\StorageManager;
use Friendica\Database\DBA;
use Friendica\Database\DBStructure;
use Friendica\Model\Storage\IStorage;
use Friendica\Object\Image;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
@@ -268,6 +269,7 @@ class Photo extends BaseObject
$data = "";
$backend_ref = "";
/** @var IStorage $backend_class */
if (DBA::isResult($existing_photo)) {
$backend_ref = (string)$existing_photo["backend-ref"];
$backend_class = (string)$existing_photo["backend-class"];
@@ -334,6 +336,7 @@ class Photo extends BaseObject
$photos = self::select(["backend-class","backend-ref"], $conditions);
foreach($photos as $photo) {
/** @var IStorage $backend_class */
$backend_class = (string)$photo["backend-class"];
if ($backend_class !== "") {
$backend_class::delete($photo["backend-ref"]);
@@ -363,6 +366,7 @@ class Photo extends BaseObject
$photos = self::select(["backend-class","backend-ref"], $conditions);
foreach($photos as $photo) {
/** @var IStorage $backend_class */
$backend_class = (string)$photo["backend-class"];
if ($backend_class !== "") {
$fields["backend-ref"] = $backend_class::put($img->asString(), $photo["backend-ref"]);
@@ -479,7 +483,7 @@ class Photo extends BaseObject
}
/**
* @param string $exifCoord coordinate
* @param array $exifCoord coordinate
* @param string $hemi hemi
* @return float
*/