PluginProbe
Metricool – Social media and site statistics / 2.1.1
Metricool – Social media and site statistics v2.1.1
2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
metricool / vendor / _scoped / nesbot / carbon / src / Carbon / Exceptions / ImmutableException.php

ImmutableException.php in Metricool – Social media and site statistics 2.1.1, at vendor/_scoped/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php

45 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * This file is part of the Carbon package.
5 *
6 * (c) Brian Nesbitt <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11 namespace Metricool\Vendor\Carbon\Exceptions;
12
13 use RuntimeException as BaseRuntimeException;
14 use Throwable;
15 class ImmutableException extends BaseRuntimeException implements RuntimeException
16 {
17 /**
18 * The value.
19 *
20 * @var string
21 */
22 protected $value;
23 /**
24 * Constructor.
25 *
26 * @param string $value the immutable type/value
27 * @param int $code
28 * @param Throwable|null $previous
29 */
30 public function __construct($value, $code = 0, ?Throwable $previous = null)
31 {
32 $this->value = $value;
33 parent::__construct("{$value} is immutable.", $code, $previous);
34 }
35 /**
36 * Get the value.
37 *
38 * @return string
39 */
40 public function getValue(): string
41 {
42 return $this->value;
43 }
44 }
45