Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
90.91% covered (success)
90.91%
10 / 11
90.91% covered (success)
90.91%
10 / 11
CRAP
0.00% covered (danger)
0.00%
0 / 1
ObjStoreCluster
90.91% covered (success)
90.91%
10 / 11
90.91% covered (success)
90.91%
10 / 11
11.09
0.00% covered (danger)
0.00%
0 / 1
 getId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getRegion
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setRegion
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getHostname
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setHostname
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isDeployed
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getDeploy
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDeploy
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getModelExceptionClass
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getResponseName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Vultr\VultrPhp\Services\ObjectStorage;
6
7use Vultr\VultrPhp\Util\Model;
8
9/**
10 * Holds object storage cluster information.
11 */
12class ObjStoreCluster extends Model
13{
14    protected int $id;
15    protected string $region;
16    protected string $hostname;
17    protected string $deploy;
18
19    public function getId() : int
20    {
21        return $this->id;
22    }
23
24    public function setId(int $id) : void
25    {
26        $this->id = $id;
27    }
28
29    public function getRegion() : string
30    {
31        return $this->region;
32    }
33
34    public function setRegion(string $region) : void
35    {
36        $this->region = $region;
37    }
38
39    public function getHostname() : string
40    {
41        return $this->hostname;
42    }
43
44    public function setHostname(string $hostname) : void
45    {
46        $this->hostname = $hostname;
47    }
48
49    public function isDeployed() : bool
50    {
51        return $this->getDeploy() === 'yes';
52    }
53
54    public function getDeploy() : string
55    {
56        return $this->deploy;
57    }
58
59    public function setDeploy(string $deploy) : void
60    {
61        $this->deploy = $deploy;
62    }
63
64    public function getModelExceptionClass() : string
65    {
66        return str_replace('ObjStoreClusterException', 'ObjectStorageException', parent::getModelExceptionClass());
67    }
68
69    public function getResponseName() : string
70    {
71        return 'cluster';
72    }
73}
74