Completed
Push — master ( 01716a...87843a )
by Xu
07:15
created

ApplicationTrait::getFilesystem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @link http://www.tintsoft.com/
4
 * @copyright Copyright (c) 2012 TintSoft Technology Co. Ltd.
5
 * @license http://www.tintsoft.com/license/
6
 */
7
8
namespace yuncms\base;
9
10
use yii\authclient\Collection;
11
use yuncms\components\Settings;
12
use yuncms\filesystem\Filesystem;
13
14
/**
15
 * Trait ApplicationTrait
16
 * @property \yuncms\components\Settings $settings The settings manager component
17
 * @property \yii\authclient\Collection $authClientCollection The authClient Collection component
18
 * @property \yii\queue\Queue $queue The queue component
19
 * @property \yuncms\notifications\NotificationManager $notifications The notifications component
20
 * @property \yii\redis\Connection $redis The redis component
21
 * @property \yuncms\filesystem\Filesystem $filesystem The filesystem component
22
 */
23
trait ApplicationTrait
24
{
25
    /**
26
     * Returns the settings component.
27
     * @return \yuncms\filesystem\Filesystem the filesystem connection.
28
     */
29
    public function getFilesystem(): Filesystem
30
    {
31
        return $this->get('filesystem');
0 ignored issues
show
Bug introduced by
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 ignore-call  annotation

31
        return $this->/** @scrutinizer ignore-call */ get('filesystem');
Loading history...
32
    }
33
34
    /**
35
     * Returns the settings component.
36
     * @return \yuncms\components\Settings the settings connection.
37
     */
38
    public function getSettings(): Settings
39
    {
40
        return $this->get('settings');
41
    }
42
43
    /**
44
     * Returns the queue component.
45
     * @return \yii\queue\Queue the queue connection.
46
     */
47
    public function getQueue()
48
    {
49
        return $this->get('queue');
50
    }
51
52
    /**
53
     * Returns the notifications component.
54
     * @return \yuncms\notifications\NotificationManager the notifications connection.
55
     */
56
    public function getNotifications()
57
    {
58
        return $this->get('notifications');
59
    }
60
61
    /**
62
     * Returns the authClientCollection component.
63
     * @return \yii\authclient\Collection the authClientCollection connection.
64
     */
65
    public function getAuthClientCollection(): Collection
66
    {
67
        return $this->get('authClientCollection');
68
    }
69
}