AnnouncementService::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 1
cts 1
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\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