Overview

Namespaces

  • PhpCommon
    • Comparison
      • Equivalence
      • Hasher

Interfaces

  • Comparable
  • Comparator
  • Equatable
  • Equivalence
  • Hashable
  • Hasher

Exceptions

  • IncomparableException
  • UnexpectedTypeException
  • Overview
  • Namespace
  • Class

Class UnexpectedTypeException

Thrown when a value does not match an expected type.

Exception
Extended by LogicException
Extended by InvalidArgumentException
Extended by PhpCommon\Comparison\UnexpectedTypeException
Namespace: PhpCommon\Comparison
Author: Marcos Passos marcos@croct.com
Located at UnexpectedTypeException.php
Methods summary
public static PhpCommon\Comparison\UnexpectedTypeException
# forType( string $type, mixed $value, integer $code = 0, Exception $cause = null )

Creates a new exception for the given value type.

Creates a new exception for the given value type.

Parameters

$type
The name of the expected type.
$value
The specified value.
$code
The exception code.
$cause
The exception that caused this exception.

Returns

PhpCommon\Comparison\UnexpectedTypeException
The new exception.
Methods inherited from Exception
__construct(), __toString(), getCode(), getFile(), getLine(), getMessage(), getPrevious(), getTrace(), getTraceAsString()
Properties inherited from Exception
$code, $file, $line, $message
PHPCommon Comparison API API documentation generated by ApiGen