daveearley/cli.fyi

View on GitHub

Showing 3 of 4 total issues

Method create has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function create(string $handlerName): AbstractHandler
    {
        switch ($handlerName) {
            case EmailHandler::class:
                return new EmailHandler(
Severity: Major
Found in src/Factory/HandlerFactory.php - About 2 hrs to fix

    Method processSearchTerm has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function processSearchTerm(SearchTerm $searchTerm): array
        {
            return [
                'IP Address Query' =>  [
                    'example' => 'https://cli.fyi/8.8.8.8'
    Severity: Minor
    Found in src/Handler/HelpHandler.php - About 1 hr to fix

      Method getExtractedValues has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function getExtractedValues(): array
          {
              if ($this->extractedData::check($this->extractedData->getResponse())) {
                  return [
                      'title' => $this->extractedData->title,
      Severity: Minor
      Found in src/Service/Media/MediaExtractor.php - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language