ApiResource   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getResourceName() 0 3 1
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