| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function init() |
||
| 17 | { |
||
| 18 | if (\Yii::$app->request instanceof Request && \Yii::$app->request->checksumIsEnabled()) { |
||
| 19 | if (!$this->form->canGetProperty('_checksumInit')) { |
||
| 20 | $this->form->attachBehavior('caronoChecksumBehavior', ActiveFormBehavior::className()); |
||
|
|
|||
| 21 | \Yii::$app->request->clearStack($this->form->id); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | parent::init(); |
||
| 25 | } |
||
| 26 | |||
| 38 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: