| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
namespace Carbon\Exceptions; |
| 15 |
|
| 16 |
use InvalidArgumentException as BaseInvalidArgumentException; |
| 17 |
use Throwable; |
| 18 |
|
| 19 |
class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException |
| 20 |
{ |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
public function __construct($object, $code = 0, ?Throwable $previous = null) |
| 29 |
{ |
| 30 |
$dump = \is_object($object) ? \get_class($object) : \gettype($object); |
| 31 |
|
| 32 |
parent::__construct("$dump does neither implements Symfony\Contracts\Translation\LocaleAwareInterface nor getLocale() method.", $code, $previous); |
| 33 |
} |
| 34 |
} |