Test Failed
Pull Request — master (#70)
by Rafael
05:48
created

System   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 19
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A assemble() 0 8 1
1
<?php
2
3
namespace Gewaer\Notifications\Mobile;
4
5
use Namshi\Notificator\Notification;
6
use Gewaer\Contracts\PushNotifications as PushNotificationsContract;
7
use Gewaer\Models\Notifications;
8
use Gewaer\Notifications\Mobile\Mobile;
9
use Gewaer\Traits\NotificationsTrait;
10
11
class System extends Mobile implements PushNotificationsContract
12
{
13
    /**
14
     * Notifications Trait
15
     */
16
    use NotificationsTrait;
17
18
    /**
19
     * Assemble an Apps Push Notification
20
     * @todo Create specific assembler for apps push notifications
21
     */
22
    public function assemble()
23
    {
24
        /**
25
         * Create a new database record
26
         */
27
        self::create($this->user, $this->content, Notifications::SYSTEM, $this->systemModule);
0 ignored issues
show
Bug introduced by
$this->user of type Gewaer\Traits\Users is incompatible with the type array expected by parameter $user of Gewaer\Notifications\Mobile\System::create(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

27
        self::create(/** @scrutinizer ignore-type */ $this->user, $this->content, Notifications::SYSTEM, $this->systemModule);
Loading history...
28
29
        return $this->content . " From System";
30
    }
31
}
32