Completed
Push — 3.x ( e32815...7c4255 )
by Ryota
10:41 queued 09:27
created

My   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 4
dl 0
loc 35
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A status() 0 4 1
A tasks() 0 4 1
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
     * @param array $options
43
     *
44
     * @return Tasks
45
     */
46
    public function tasks(array $options = []): Tasks
0 ignored issues
show
Unused Code introduced by
The parameter $options is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
47
    {
48
        return new My\Tasks($this->client, new TaskFactory());
49
    }
50
}
51