mc-cms-namelessmc/core/classes/Events/Cancellable.php
tadhgboyle 0c80570609
Enable StyleCI (#3475)
* Create StyleCI config file

* Disable `phpdoc_separation`

* Apply fixes from StyleCI (#3476)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* style: styleci fixes

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Sam <samerton@users.noreply.github.com>
2024-03-09 11:19:55 +00:00

23 lines
445 B
PHP

<?php
trait Cancellable
{
private bool $_cancelled = false;
private string $_reason = '';
public function setCancelled(bool $cancelled, string $reason = ''): void
{
$this->_cancelled = $cancelled;
$this->_reason = $reason;
}
public function isCancelled(): bool
{
return $this->_cancelled;
}
public function getCancelledReason(): string
{
return $this->_reason;
}
}