Passed
Push — master ( b0aadc...3b2e67 )
by Scrutinizer
02:03 queued 17s
created

PropertiesTrait   A

Complexity

Total Complexity 16

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 25
c 1
b 0
f 0
dl 0
loc 90
rs 10
wmc 16

16 Methods

Rating   Name   Duplication   Size   Complexity  
A setUrlApiInstance() 0 3 1
A setTtlCache() 0 3 1
A setIdHashSelf() 0 3 1
A getTtlCache() 0 3 1
A setEndpointApiInstance() 0 3 1
A setAccessToken() 0 3 1
A getUrlHost() 0 3 1
A setInfoInstance() 0 3 1
A getInfoInstance() 0 3 1
A getAccessToken() 0 3 1
A getEndpointApiInstance() 0 3 1
A getUrlApiInstance() 0 3 1
A setFlagUseCache() 0 3 1
A setUrlHost() 0 3 1
A getIdHashSelf() 0 3 1
A getFlagUseCache() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of the keinos/mastodon-streaming-api-config package.
5
 *
6
 * - Authors, copyright, license, usage and etc.:
7
 *   - See: https://github.com/KEINOS/Mastodon_StreamingAPI_Config/
8
 */
9
10
declare(strict_types=1);
11
12
namespace KEINOS\MSTDN_TOOLS\Config;
13
14
trait PropertiesTrait
15
{
16
    /** @var string */
17
    protected $access_token;
18
    public function setAccessToken(string $access_token): void
19
    {
20
        $this->access_token = $access_token;
21
    }
22
    public function getAccessToken(): string
23
    {
24
        return $this->access_token;
25
    }
26
27
    /** @var string */
28
    protected $endpoint_api_instance;
29
    public function setEndpointApiInstance(string $path): void
30
    {
31
        $this->endpoint_api_instance = $path;
32
    }
33
    public function getEndpointApiInstance(): string
34
    {
35
        return $this->endpoint_api_instance;
36
    }
37
38
    /** @var bool */
39
    protected $flag_use_cache;
40
    public function setFlagUseCache(bool $flag): void
41
    {
42
        $this->flag_use_cache = $flag;
43
    }
44
    public function getFlagUseCache(): bool
45
    {
46
        return $this->flag_use_cache;
47
    }
48
49
    /** @var string */
50
    protected $id_hash_self;
51
    public function setIdHashSelf(string $id_hash_self): void
52
    {
53
        $this->id_hash_self = $id_hash_self;
54
    }
55
    public function getIdHashSelf(): string
56
    {
57
        return $this->id_hash_self;
58
    }
59
60
    /** @var array<mixed,mixed> */
61
    protected $info_instance;
62
    /** @param  array<mixed,mixed> $info_instance */
63
    public function setInfoInstance(array $info_instance): void
64
    {
65
        $this->info_instance = $info_instance;
66
    }
67
    /** @return array<mixed,mixed> */
68
    public function getInfoInstance(): array
69
    {
70
        return $this->info_instance;
71
    }
72
73
    /** @var int */
74
    protected $ttl_cache;
75
    public function setTtlCache(int $ttl): void
76
    {
77
        $this->ttl_cache = $ttl;
78
    }
79
    public function getTtlCache(): int
80
    {
81
        return $this->ttl_cache;
82
    }
83
84
    /** @var string */
85
    protected $url_host;
86
    public function setUrlHost(string $url_host): void
87
    {
88
        $this->url_host = $url_host;
89
    }
90
    public function getUrlHost(): string
91
    {
92
        return $this->url_host;
93
    }
94
95
    /** @var string */
96
    protected $url_api_instance;
97
    public function setUrlApiInstance(string $url_api_instance): void
98
    {
99
        $this->url_api_instance = $url_api_instance;
100
    }
101
    public function getUrlApiInstance(): string
102
    {
103
        return $this->url_api_instance;
104
    }
105
}
106