1 | <?php |
||||
2 | /** |
||||
3 | * Minify plugin for Craft CMS |
||||
4 | * |
||||
5 | * @link https://nystudio107.com/ |
||||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||||
6 | * @copyright Copyright (c) nystudio107 |
||||
0 ignored issues
–
show
|
|||||
7 | * @license MIT License https://opensource.org/licenses/MIT |
||||
8 | */ |
||||
0 ignored issues
–
show
|
|||||
9 | |||||
10 | namespace nystudio107\minify\services; |
||||
11 | |||||
12 | use yii\base\InvalidConfigException; |
||||
13 | |||||
14 | /** |
||||
0 ignored issues
–
show
|
|||||
15 | * @author nystudio107 |
||||
0 ignored issues
–
show
Content of the @author tag must be in the form "Display Name <[email protected]>"
![]() |
|||||
16 | * @package Minify |
||||
0 ignored issues
–
show
|
|||||
17 | * @since 5.0.0 |
||||
0 ignored issues
–
show
|
|||||
18 | * |
||||
19 | * @property MinifyService $minify |
||||
0 ignored issues
–
show
|
|||||
20 | */ |
||||
0 ignored issues
–
show
|
|||||
21 | trait ServicesTrait |
||||
22 | { |
||||
23 | // Public Static Methods |
||||
24 | // ========================================================================= |
||||
25 | |||||
26 | /** |
||||
0 ignored issues
–
show
|
|||||
27 | * @inheritdoc |
||||
28 | */ |
||||
0 ignored issues
–
show
|
|||||
29 | public static function config(): array |
||||
30 | { |
||||
31 | return [ |
||||
32 | 'components' => [ |
||||
33 | 'minify' => MinifyService::class, |
||||
34 | ], |
||||
35 | ]; |
||||
36 | } |
||||
37 | |||||
38 | // Public Methods |
||||
39 | // ========================================================================= |
||||
40 | |||||
41 | /** |
||||
42 | * Returns the helper service |
||||
43 | * |
||||
44 | * @return MinifyService The minify service |
||||
45 | * @throws InvalidConfigException |
||||
46 | */ |
||||
47 | public function getMinify(): MinifyService |
||||
48 | { |
||||
49 | return $this->get('minify'); |
||||
0 ignored issues
–
show
It seems like
get() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
50 | } |
||||
51 | } |
||||
52 |