| 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 BadMethodCallException as BaseBadMethodCallException; |
| 17 |
use Throwable; |
| 18 |
|
| 19 |
class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException |
| 20 |
{ |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
protected $setter; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 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 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
public function getSetter(): string |
| 48 |
{ |
| 49 |
return $this->setter; |
| 50 |
} |
| 51 |
} |