Showing 12 of 39 total issues
Response
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class Response implements ResponseInterface{ /** * @var float The total time. */
Method validateAsync
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function validateAsync(Homo $homo): PromiseInterface { $url = $homo->getUrl(); if (!$url) { throw new \InvalidArgumentException('Invalid URL');
Method register
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
#[\Override] public function register() { $this->app->extend(AccessLog::class, fn (AccessLog $log) => $log->format($this->format)); $this->app->when(AccessLog::class)
Method register
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
#[\Override] public function register() { $this->app->singleton(RegistryInterface::class, CollectorRegistry::class); $this->app->when(CollectorRegistry::class)
Method register
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
#[\Override] public function register() { $this->app->singleton(WebFingerAction::class); $this->app->singleton(ActivityPubActorAction::class);
Method register
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
#[\Override] public function register() { $this->app->singleton('mastodon.client', function (Container $app) { $handler = HandlerStack::create();
Method createStatusAsync
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createStatusAsync(Homo $homo, ?callable $callback = null): PromiseInterface { return Coroutine::of(function () use ($homo, $callback) { $service = $homo->getService(); $screen_name = $homo->getScreenName();
Function validateAsync
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
private function validateAsync(Homo $homo): PromiseInterface { $url = $homo->getUrl(); if (!$url) { throw new \InvalidArgumentException('Invalid URL');
- Read upRead up
Method sign
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function sign(Request $request): Request { $requestTarget = strtolower($request->getMethod()) . ' ' . $request->getRequestTarget(); if (!$date = $request->getHeaderLine('Date')) { $date = (new \DateTimeImmutable())->format(\DateTimeImmutable::RFC7231);
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected ClientServiceContract $client, protected HomoServiceContract $homo, protected Counter $checkCounter, protected Counter $checkErrorCounter, protected Collection $profiles,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __invoke(Request $request, \Throwable $exception, bool $displayErrorDetails, bool $logErrors, bool $logErrorDetails): Response
Function createDisplayURL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
private function createDisplayURL(?string $url, bool $scheme = false): string { if (!$url) { return ''; }
- Read upRead up