@@ 142-144 (lines=3) @@ | ||
139 | */ |
|
140 | public static function silent($callback, $types = null, $captureExceptions = true) |
|
141 | { |
|
142 | if (!is_callable($callback)) { |
|
143 | throw new \InvalidArgumentException(get_called_class() . '::' . __METHOD__ . '() expects parameter 1 to be callable, ' . gettype($callback) . ' given'); |
|
144 | } |
|
145 | if ($types !== null && !is_numeric($types)) { |
|
146 | throw new \InvalidArgumentException(get_called_class() . '::' . __METHOD__ . '() expects parameter 2 to be integer, ' . gettype($types) . ' given'); |
|
147 | } |
|
@@ 145-147 (lines=3) @@ | ||
142 | if (!is_callable($callback)) { |
|
143 | throw new \InvalidArgumentException(get_called_class() . '::' . __METHOD__ . '() expects parameter 1 to be callable, ' . gettype($callback) . ' given'); |
|
144 | } |
|
145 | if ($types !== null && !is_numeric($types)) { |
|
146 | throw new \InvalidArgumentException(get_called_class() . '::' . __METHOD__ . '() expects parameter 2 to be integer, ' . gettype($types) . ' given'); |
|
147 | } |
|
148 | ||
149 | $dummyException = new \Exception; |
|
150 | try { |