Improved quality of docblock comments

This commit is contained in:
2018-04-15 22:08:19 +02:00
parent 20b6f1d42c
commit 31634c5054
9 changed files with 132 additions and 7 deletions

View File

@ -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) {