Page MenuHomeWickedGov Phorge

ParameterKeyTypeException.php
No OneTemporary

Size
906 B
Referenced Files
None
Subscribers
None

ParameterKeyTypeException.php

<?php
namespace Wikimedia\Assert;
/**
* Exception indicating that a parameter key type assertion failed.
* This generally means a disagreement between the caller and the implementation of a function.
*
* @since 0.3.0
*
* @license MIT
* @author Daniel Kinzler
* @author Thiemo Kreuz
* @copyright Wikimedia Deutschland e.V.
*/
class ParameterKeyTypeException extends ParameterAssertionException {
/**
* @var string
*/
private $type;
/**
* @param string $parameterName
* @param string $type
*
* @throws ParameterTypeException
*/
public function __construct( $parameterName, $type ) {
if ( !is_string( $type ) ) {
throw new ParameterTypeException( 'type', 'string' );
}
parent::__construct( $parameterName, "all elements must have $type keys" );
$this->type = $type;
}
/**
* @return string
*/
public function getType(): string {
return $this->type;
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 19 2026, 20:11 (7 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
02/f3/4c30d7a07029cc37e6720763df99
Default Alt Text
ParameterKeyTypeException.php (906 B)

Event Timeline