Status::show()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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