UnexpectedTypeException.php 327 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<?php

namespace MongoDB\Exception;

class UnexpectedTypeException extends InvalidArgumentException
{
    public function __construct($value, $expectedType)
    {
        parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, is_object($value) ? get_class($value) : gettype($value)));
    }
}