Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | public static function create($user) |
||
41 | { |
||
42 | $model = new static; |
||
43 | $model->setAttributes([ |
||
44 | 'user_id' => $user->id, |
||
45 | 'token' => \str_replace('=', '', Base32::encode(\random_bytes(64))), |
||
46 | 'expires_at' => \strtotime(static::TOKEN_EXPIRATION_TIME) |
||
47 | ], false); |
||
48 | |||
49 | if ($model->save()) { |
||
50 | return $model->token; |
||
51 | } |
||
52 | |||
53 | throw new \yii\base\Exception(Yii::t('yrc', 'Refresh token failed to generate.')); |
||
54 | } |
||
56 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths