[TOOLS] Continue raising PHPStan to level 6

This commit is contained in:
2022-10-19 22:39:17 +01:00
parent e6bb418fe6
commit c31f3d4997
25 changed files with 233 additions and 58 deletions

View File

@@ -7,14 +7,22 @@ namespace Component\Collection\Util\Controller;
use App\Core\Controller;
use App\Entity\Actor;
use App\Util\Common;
use Component\Collection\Collection as CollectionModule;
use Component\Collection\Collection as CollectionComponent;
/**
* @template T
*/
class Collection extends Controller
{
/**
* @param array<string, OrderByType> $note_order_by
* @param array<string, OrderByType> $actor_order_by
* @return array<T>
*/
public function query(string $query, ?string $locale = null, ?Actor $actor = null, array $note_order_by = [], array $actor_order_by = []): array
{
$actor ??= Common::actor();
$locale ??= Common::currentLanguage()->getLocale();
return CollectionModule::query($query, $this->int('page') ?? 1, $locale, $actor, $note_order_by, $actor_order_by);
return CollectionComponent::query($query, $this->int('page') ?? 1, $locale, $actor, $note_order_by, $actor_order_by);
}
}