Brand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace TarfinLabs\Iys;
4
5
class Brand
6
{
7
    protected $endpoint;
8
    protected $config;
9
10
    public function __construct()
11
    {
12
        $this->config = config('laravel-iys');
13
        $this->endpoint = "/sps/{$this->config['iys_code']}/brands";
14
    }
15
16
    /**
17
     * Hizmet sağlayıcı hesabınızın altında bulunan markalarınızını listeler.
18
     *
19
     * Doc: https://dev.iys.org.tr/api-metotlar/marka-yonetimi/marka-listeleme/
20
     *
21
     * @return array|mixed
22
     */
23
    public function all()
24
    {
25
        return app(Client::class)->getJson($this->endpoint);
26
    }
27
}
28