| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | public function testBasicTest() |
||
| 52 | { |
||
| 53 | // create String Helper |
||
| 54 | // $smartMeta = $this->app->make($this->PACKAGE_CLASSES); |
||
| 55 | |||
| 56 | $model = new class extends Model{ |
||
| 57 | use SmartMeta; |
||
| 58 | }; |
||
| 59 | |||
| 60 | $model->setId(1); |
||
| 61 | $model->setGlobalKey('test'.'_'.$model->getId()); |
||
| 62 | // $model->initCache(); |
||
| 63 | $this->assertTrue($model->getId() == 1); |
||
| 64 | |||
| 65 | // $this->assertTrue($model->initCache()->getId() == 1); |
||
| 66 | |||
| 67 | |||
| 68 | $this->assertTrue(true); |
||
| 69 | } |
||
| 70 | } |
||
| 71 |
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: