| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function prepareBigPipeNoJsCookie() |
||
| 20 | { |
||
| 21 | try { |
||
| 22 | // Check if JavaScript can be executed by Driver. |
||
| 23 | $this->getSession()->getDriver()->executeScript('true'); |
||
| 24 | } catch (UnsupportedDriverActionException $e) { |
||
| 25 | // Set NOJS cookie. |
||
| 26 | $this |
||
| 27 | ->getSession() |
||
| 28 | ->setCookie(BigPipeStrategy::NOJS_COOKIE, true); |
||
|
|
|||
| 29 | } catch (\Exception $e) { |
||
| 30 | // Mute exceptions. |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
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: