1 | <?php |
||
21 | class ZendSentry |
||
22 | { |
||
23 | /** |
||
24 | * @var RavenClient $ravenClient |
||
25 | */ |
||
26 | private $ravenClient; |
||
27 | |||
28 | /** |
||
29 | * @var RavenErrorHandler $ravenErrorHandler |
||
30 | */ |
||
31 | private $ravenErrorHandler; |
||
32 | |||
33 | /** |
||
34 | * @var string $nonce |
||
35 | */ |
||
36 | private static $nonce; |
||
37 | |||
38 | /** |
||
39 | * @param RavenClient $ravenClient |
||
40 | * @param RavenErrorHandler $ravenErrorHandler |
||
41 | */ |
||
42 | public function __construct(RavenClient $ravenClient, RavenErrorHandler $ravenErrorHandler = null) |
||
47 | |||
48 | /** |
||
49 | * @param bool $callExistingHandler |
||
50 | * @param int $errorReporting |
||
51 | * |
||
52 | * @return ZendSentry |
||
53 | */ |
||
54 | public function registerErrorHandler($callExistingHandler = true, $errorReporting = E_ALL): ZendSentry |
||
59 | |||
60 | /** |
||
61 | * @param bool $callExistingHandler |
||
62 | * @return ZendSentry |
||
63 | */ |
||
64 | public function registerExceptionHandler($callExistingHandler = true): ZendSentry |
||
69 | |||
70 | /** |
||
71 | * @param int $reservedMemorySize |
||
72 | * @return ZendSentry |
||
73 | */ |
||
74 | public function registerShutdownFunction($reservedMemorySize = 10): ZendSentry |
||
79 | |||
80 | /** |
||
81 | * @param null|RavenErrorHandler $ravenErrorHandler |
||
82 | */ |
||
83 | private function setOrLoadRavenErrorHandler($ravenErrorHandler): void |
||
91 | |||
92 | /** |
||
93 | * @param string $nonce |
||
94 | */ |
||
95 | public static function setCSPNonce(string $nonce): void |
||
99 | |||
100 | /** |
||
101 | * @return null|string |
||
102 | */ |
||
103 | public function getCSPNonce(): ?string |
||
107 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: