Debian Codegraph @

lib/3rdParty/composer/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php

raw symbols SCIP
1 <?php
2
3 declare(strict_types=1);
4
5 /**
6 * This file is part of the Carbon package.
7 *
8 * (c) Brian Nesbitt <[email protected]>
9 *
10 * For the full copyright and license information, please view the LICENSE
11 * file that was distributed with this source code.
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 * Constructor.
23 *
24 * @param mixed $object
25 * @param int $code
26 * @param Throwable|null $previous
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 }