mirror of
https://github.com/NamelessMC/Nameless
synced 2026-08-18 06:29:04 -04:00
* 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>
23 lines
445 B
PHP
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;
|
|
}
|
|
}
|