Improved quality of docblock comments
This commit is contained in:
@ -9,17 +9,33 @@ class SignalTrap
|
||||
|
||||
protected $trapped = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param integer $signo
|
||||
*/
|
||||
public function __construct(int $signo)
|
||||
{
|
||||
$this->signal = new Signal($signo);
|
||||
$this->signal->setHandler([ $this, "onSignal" ]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Signal handler callback
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function onSignal()
|
||||
{
|
||||
$this->trapped = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the signal has been received
|
||||
*
|
||||
* @param boolean $reset
|
||||
* @return boolean
|
||||
*/
|
||||
public function isTrapped($reset=true):bool
|
||||
{
|
||||
if ($this->trapped) {
|
||||
|
Reference in New Issue
Block a user