@@ 105-107 (lines=3) @@ | ||
102 | */ |
|
103 | public static function silent($callback, $types = null, $captureExceptions = true) |
|
104 | { |
|
105 | if (!is_callable($callback)) { |
|
106 | throw new \InvalidArgumentException(get_called_class() . '::' . __METHOD__ . '() expects parameter 1 to be callable, ' . gettype($callback) . ' given'); |
|
107 | } |
|
108 | if ($types !== null && !is_numeric($types)) { |
|
109 | throw new \InvalidArgumentException(get_called_class() . '::' . __METHOD__ . '() expects parameter 2 to be integer, ' . gettype($types) . ' given'); |
|
110 | } |
|
@@ 108-110 (lines=3) @@ | ||
105 | if (!is_callable($callback)) { |
|
106 | throw new \InvalidArgumentException(get_called_class() . '::' . __METHOD__ . '() expects parameter 1 to be callable, ' . gettype($callback) . ' given'); |
|
107 | } |
|
108 | if ($types !== null && !is_numeric($types)) { |
|
109 | throw new \InvalidArgumentException(get_called_class() . '::' . __METHOD__ . '() expects parameter 2 to be integer, ' . gettype($types) . ' given'); |
|
110 | } |
|
111 | ||
112 | $dummyException = new \Exception; |
|
113 | try { |