My::status()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Polidog\Chatwork\Api;
6
7
use Polidog\Chatwork\Api\My\Status;
8
use Polidog\Chatwork\Api\My\Tasks;
9
use Polidog\Chatwork\Client\ClientInterface;
10
use Polidog\Chatwork\Entity\Factory\StatusFactory;
11
use Polidog\Chatwork\Entity\Factory\TaskFactory;
12
13
/**
14
 * Api /my.
15
 */
16
class My
17
{
18
    /**
19
     * @var ClientInterface
20
     */
21
    private $client;
22
23
    /**
24
     * M constructor.
25
     *
26
     * @param ClientInterface $client
27
     */
28
    public function __construct(ClientInterface $client)
29
    {
30
        $this->client = $client;
31
    }
32
33
    /**
34
     * @return Status
35
     */
36
    public function status(): Status
37
    {
38
        return new My\Status($this->client, new StatusFactory());
39
    }
40
41
    /**
42
     * @return Tasks
43
     */
44
    public function tasks(): Tasks
45
    {
46
        return new My\Tasks($this->client, new TaskFactory());
47
    }
48
}
49