| Conditions | 6 |
| Paths | 6 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 49 | public function init() |
||
| 50 | { |
||
| 51 | if ($this->endpoint === null) { |
||
| 52 | throw new InvalidConfigException('The "endpoint" property must be set.'); |
||
| 53 | } |
||
| 54 | |||
| 55 | if ($this->username === null) { |
||
| 56 | throw new InvalidConfigException('The "username" property must be set.'); |
||
| 57 | } |
||
| 58 | |||
| 59 | if ($this->apiKey === null) { |
||
| 60 | throw new InvalidConfigException('The "apiKey" property must be set.'); |
||
| 61 | } |
||
| 62 | |||
| 63 | if ($this->region === null) { |
||
| 64 | throw new InvalidConfigException('The "region" property must be set.'); |
||
| 65 | } |
||
| 66 | |||
| 67 | if ($this->container === null) { |
||
| 68 | throw new InvalidConfigException('The "container" property must be set.'); |
||
| 69 | } |
||
| 70 | |||
| 71 | parent::init(); |
||
| 72 | } |
||
| 73 | |||
| 88 |
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: