This commit is contained in:
2021-03-02 17:25:00 +08:00
parent 1d2ee758fb
commit 5474447ca4
+2 -15
View File
@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace Snowflake\Abstracts;
use Exception;
/**
* Class Listener
* @package Snowflake\Abstracts
@@ -12,20 +14,5 @@ namespace Snowflake\Abstracts;
abstract class Listener extends Component implements IListener
{
protected string $trigger = '';
/**
* @return string
* @throws \Exception
*/
public function getName(): string
{
if (empty($this->trigger)) {
throw new \Exception('Listener name con\'t empty.');
}
return $this->trigger;
}
}