Skip to content

Commit e10cfbe

Browse files
AHN-131: removed unused CannotReassignException::getField() method
1 parent a0ef586 commit e10cfbe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Exception/CannotReassignException.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111
namespace hiqdev\php\billing\Exception;
1212

1313
use Exception;
14+
use hidev\exception\HasContext;
15+
use hidev\exception\HasContextInterface;
1416
use hiqdev\php\billing\ExceptionInterface;
1517
use Throwable;
1618

1719
/**
1820
* @author Andrii Vasyliev <[email protected]>
1921
*/
20-
class CannotReassignException extends Exception implements ExceptionInterface
22+
class CannotReassignException extends Exception implements ExceptionInterface, HasContextInterface
2123
{
24+
use HasContext;
25+
2226
private $field;
2327

2428
public function __construct(string $message, int $code = 0, Throwable $previous = null)
2529
{
26-
$this->field = $message;
27-
parent::__construct("cannot reassign $message", $code, $previous);
28-
}
30+
$this->addContext(['filed' => $message]);
2931

30-
public function getField()
31-
{
32-
return $this->field;
32+
parent::__construct("cannot reassign $message", $code, $previous);
3333
}
3434
}

0 commit comments

Comments
 (0)