| Conditions | 3 | 
| Paths | 2 | 
| Total Lines | 13 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 7 | 
| CRAP Score | 3.0175 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php  | 
            ||
| 29 | 5 | public static function write($path, $content)  | 
            |
| 30 |     { | 
            ||
| 31 | 5 | $path = Yii::getAlias($path);  | 
            |
| 32 | 5 |         if (!is_file($path) || file_get_contents($path) !== $content) { | 
            |
| 33 | 5 | static::mkdir(dirname($path));  | 
            |
| 34 | 5 | file_put_contents($path, $content);  | 
            |
| 35 | 5 |             Yii::warning('Written file: ' . $path, 'file'); | 
            |
| 36 | |||
| 37 | 5 | return true;  | 
            |
| 38 | }  | 
            ||
| 39 | |||
| 40 | return false;  | 
            ||
| 41 | }  | 
            ||
| 42 | |||
| 63 |