code: public function match($needle)
      {
          $word = null;
          $distance = ceil(\strlen($needle) * 0.35);
  
          foreach ($this->candidates as $candidate) {
              $candidateDistance = levenshtein($needle, $candidate);
  
              if ($candidateDistance < $distance) {
                  $word = $candidate;
                  $distance = $candidateDistance;
              }
          }
  
          return $word;
      }
docs: @param string $needle
  
  @return null|string