nystudio107 /
craft-cookies
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * Cookies plugin for Craft CMS |
||||
| 4 | * |
||||
| 5 | * @link https://nystudio107.com/ |
||||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||||
| 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\cookies\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]>"
Loading history...
|
|||||
| 16 | * @package Cookies |
||||
|
0 ignored issues
–
show
|
|||||
| 17 | * @since 1.1.16 |
||||
|
0 ignored issues
–
show
|
|||||
| 18 | * |
||||
| 19 | * @property CookiesService $cookies |
||||
| 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 | 'cookies' => CookiesService::class, |
||||
| 34 | ], |
||||
| 35 | ]; |
||||
| 36 | } |
||||
| 37 | |||||
| 38 | // Public Methods |
||||
| 39 | // ========================================================================= |
||||
| 40 | |||||
| 41 | /** |
||||
| 42 | * Returns the cookies service |
||||
| 43 | * |
||||
| 44 | * @return CookiesService The cookies service |
||||
| 45 | * @throws InvalidConfigException |
||||
| 46 | */ |
||||
| 47 | public function getCookies(): CookiesService |
||||
| 48 | { |
||||
| 49 | return $this->get('cookies'); |
||||
|
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
Loading history...
|
|||||
| 50 | } |
||||
| 51 | } |
||||
| 52 |