Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NoCandidateFoundException.php

function NoCandidateFoundException::stringify

File

vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php, line 35

Class

NoCandidateFoundException
When we have used a strategy but no candidates provided by that strategy could be used.

Namespace

Http\Discovery\Exception

Code

private function stringify($mixed) {
    if (is_string($mixed)) {
        return $mixed;
    }
    if (is_array($mixed) && 2 === count($mixed)) {
        return sprintf('%s::%s', $this->stringify($mixed[0]), $mixed[1]);
    }
    return is_object($mixed) ? get_class($mixed) : gettype($mixed);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal