| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 15 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 30 | public function testBool() | ||
| 31 |     { | ||
| 32 | $model = new BooleanBehaviorMock(); | ||
| 33 | $model->boolValue = '1'; | ||
| 34 | $model->validate(); | ||
| 35 | $this->assertTrue($model->boolValue); | ||
| 36 | |||
| 37 | $model->boolValue = 1; | ||
| 38 | $model->validate(); | ||
| 39 | $this->assertTrue($model->boolValue); | ||
| 40 | |||
| 41 | $model->boolValue = 'true'; | ||
| 42 | $model->validate(); | ||
| 43 | $this->assertTrue($model->boolValue); | ||
| 44 | } | ||
| 45 | } | 
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.