ApiResource::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Dolibarr\Client\Domain\Resource;
5
6
use Webmozart\Assert\Assert;
7
8
/**
9
 * @author Laurent De Coninck <[email protected]>
10
 */
11
class ApiResource
12
{
13
    /**
14
     * @var string
15
     */
16
    private $resourceName;
17
18
    /**
19
     * @param string $resourceName
20
     */
21
    public function __construct($resourceName)
22
    {
23
        Assert::stringNotEmpty($resourceName, 'resource is required');
24
25
        $this->resourceName = $resourceName;
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getResourceName()
32
    {
33
        return $this->resourceName;
34
    }
35
}
36