/** * @param string $message */ public function __construct($message = null) { if ($message !== null) { $message = 'The promise has been cancelled'; } parent::__construct($this, $message); }
public function __construct($msg, array $reasons) { parent::__construct($reasons, sprintf('%s; %d rejected promises', $msg, count($reasons))); }