Debian Codegraph @

lib/3rdParty/composer/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.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 BadMethodCallException as BaseBadMethodCallException;
17 use Throwable;
18
19 class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException
20 {
21 /**
22 * The setter.
23 *
24 * @var string
25 */
26 protected $setter;
27
28 /**
29 * Constructor.
30 *
31 * @param string $setter
32 * @param int $code
33 * @param Throwable|null $previous
34 */
35 public function __construct($setter, $code = 0, ?Throwable $previous = null)
36 {
37 $this->setter = $setter;
38
39 parent::__construct(\sprintf("Unknown fluent setter '%s'", $setter), $code, $previous);
40 }
41
42 /**
43 * Get the setter.
44 *
45 * @return string
46 */
47 public function getSetter(): string
48 {
49 return $this->setter;
50 }
51 }