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

Breadcrumb

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

class DuplicateKeyException

Hierarchy

  • class \Seld\JsonLint\ParsingException extends \Seld\JsonLint\Exception
    • class \Seld\JsonLint\DuplicateKeyException extends \Seld\JsonLint\ParsingException

Expanded class hierarchy of DuplicateKeyException

1 file declares its use of DuplicateKeyException
ConfigValidator.php in vendor/composer/composer/src/Composer/Util/ConfigValidator.php

File

vendor/seld/jsonlint/src/Seld/JsonLint/DuplicateKeyException.php, line 14

Namespace

Seld\JsonLint
View source
class DuplicateKeyException extends ParsingException {
    
    /**
     * @var array{key: string, line: int}
     */
    protected $details;
    
    /**
     * @param string $message
     * @param string $key
     * @phpstan-param array{line: int} $details
     */
    public function __construct($message, $key, array $details) {
        $details['key'] = $key;
        parent::__construct($message, $details);
    }
    
    /**
     * @return string
     */
    public function getKey() {
        return $this->details['key'];
    }
    
    /**
     * @phpstan-return array{key: string, line: int}
     */
    public function getDetails() {
        return $this->details;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
DuplicateKeyException::$details protected property Overrides ParsingException::$details
DuplicateKeyException::getDetails public function @phpstan-return array{key: string, line: int} Overrides ParsingException::getDetails
DuplicateKeyException::getKey public function
DuplicateKeyException::__construct public function @phpstan-param array{line: int} $details Overrides ParsingException::__construct

API Navigation

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