mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:40:17 +00:00
Merge pull request #14581 from Art4/phpstan-level-1-in-addons
PHPStan level 1 in addons
This commit is contained in:
commit
955c8a18f0
4 changed files with 247 additions and 244 deletions
|
@ -3,7 +3,7 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
parameters:
|
||||
level: 0
|
||||
level: 1
|
||||
|
||||
paths:
|
||||
- addon/
|
||||
|
@ -13,6 +13,7 @@ parameters:
|
|||
analyse:
|
||||
- addon/*/lang/*
|
||||
- addon/*/vendor/*
|
||||
- addon/pumpio/oauth/*
|
||||
|
||||
scanDirectories:
|
||||
- mod
|
||||
|
|
|
@ -174,7 +174,6 @@ class Actor
|
|||
return $contact;
|
||||
}
|
||||
|
||||
if (empty($contact)) {
|
||||
$fields = [
|
||||
'uid' => $contact_uid,
|
||||
'network' => Protocol::BLUESKY,
|
||||
|
@ -191,10 +190,8 @@ class Actor
|
|||
'addr' => $did,
|
||||
'rel' => Contact::NOTHING,
|
||||
];
|
||||
|
||||
$cid = Contact::insert($fields);
|
||||
} else {
|
||||
$cid = $contact['id'];
|
||||
}
|
||||
|
||||
$this->updateContactByDID($did);
|
||||
|
||||
|
|
|
@ -125,6 +125,8 @@ class Processor
|
|||
|
||||
public function createPost(stdClass $data, array $uids, bool $dont_fetch)
|
||||
{
|
||||
$parent = '';
|
||||
|
||||
if (!empty($data->commit->record->reply)) {
|
||||
$root = $this->getUri($data->commit->record->reply->root);
|
||||
$parent = $this->getUri($data->commit->record->reply->parent);
|
||||
|
@ -166,7 +168,7 @@ class Processor
|
|||
return;
|
||||
}
|
||||
}
|
||||
$item = $this->addMedia($post->thread->post->embed, $item, 0, 0, 0);
|
||||
$item = $this->addMedia($post->thread->post->embed, $item, 0);
|
||||
}
|
||||
|
||||
$id = Item::insert($item);
|
||||
|
@ -295,7 +297,7 @@ class Processor
|
|||
}
|
||||
|
||||
if (!empty($post->embed)) {
|
||||
$item = $this->addMedia($post->embed, $item, $uid, $level);
|
||||
$item = $this->addMedia($post->embed, $item, $level);
|
||||
}
|
||||
|
||||
$item['restrictions'] = $this->getRestrictionsForUser($post, $item, $post_reason);
|
||||
|
@ -819,7 +821,7 @@ class Processor
|
|||
}
|
||||
|
||||
$elements = explode(':', $uri);
|
||||
if (empty($elements) || ($elements[0] != 'at')) {
|
||||
if ($elements[0] !== 'at') {
|
||||
$post = Post::selectFirstPost(['extid'], ['uri' => $uri]);
|
||||
return $this->getUriClass($post['extid'] ?? '');
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue