Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5977336
ParameterTypeException.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
947 B
Referenced Files
None
Subscribers
None
ParameterTypeException.php
View Options
<?php
namespace
Wikimedia\Assert
;
/**
* Exception indicating that a parameter type assertion failed.
* This generally means a disagreement between the caller and the implementation of a function.
*
* @since 0.1.0
*
* @license MIT
* @author Daniel Kinzler
* @copyright Wikimedia Deutschland e.V.
*/
class
ParameterTypeException
extends
ParameterAssertionException
{
/**
* @var string
*/
private
$parameterType
;
/**
* @param string $parameterName
* @param string $parameterType
*
* @throws ParameterTypeException
*/
public
function
__construct
(
$parameterName
,
$parameterType
)
{
if
(
!
is_string
(
$parameterType
)
)
{
throw
new
ParameterTypeException
(
'parameterType'
,
'string'
);
}
parent
::
__construct
(
$parameterName
,
"must be a $parameterType"
);
$this
->
parameterType
=
$parameterType
;
}
/**
* @return string
*/
public
function
getParameterType
():
string
{
return
$this
->
parameterType
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 19:51 (3 d, 56 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
54/81/2b6640d9fca7fbea8c81b5c5f7b2
Default Alt Text
ParameterTypeException.php (947 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment