AnnouncementService   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
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\BaseServiceInterface;
7
use Aosmak\Laravel\Layer\Sdk\Services\Subservices\Interfaces\AnnouncementServiceInterface;
8
9
/**
10
 * Class AnnouncementService
11
 * @package namespace Aosmak\Laravel\Layer\Sdk\Services\Subservices
12
 */
13
class AnnouncementService extends BaseService implements AnnouncementServiceInterface
14
{
15
    /**
16
     * Create an announcement
17
     *
18
     * @param array $data announcement data
19
     *
20
     * @return \Aosmak\Laravel\Layer\Sdk\Models\ResponseInterface
21 2
     */
22
    public function create(array $data): ResponseInterface
23 2
    {
24
        return $this->getRequestService()->makePostRequest($this->getRouter()->getShortUrl('announcements'), $data);
25
    }
26
}
27