NotificationService::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Aosmak\Laravel\Layer\Sdk\Services\Subservices;
4
5
use Aosmak\Laravel\Layer\Sdk\Models\ResponseInterface;
6
use Aosmak\Laravel\Layer\Sdk\Services\Subservices\Interfaces\NotificationServiceInterface;
7
8
/**
9
 * Class NotificationService
10
 * @package namespace Aosmak\Laravel\Layer\Sdk\Services\Subservices
11
 */
12
class NotificationService extends BaseService implements NotificationServiceInterface
13
{
14
    /**
15
     * Create a notification
16
     *
17
     * @param array $data notification data
18
     *
19
     * @return \Aosmak\Laravel\Layer\Sdk\Models\ResponseInterface
20
     */
21 2
    public function create(array $data): ResponseInterface
22
    {
23 2
        return $this->getRequestService()->makePostRequest($this->getRouter()->getShortUrl('notifications'), $data);
24
    }
25
}
26