ShipmentCompany   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 28
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getShipmentCompanies() 0 3 1
1
<?php
2
3
4
namespace Onurkacmaz\LaravelN11\Models;
5
6
use Onurkacmaz\LaravelN11\Exceptions\N11Exception;
7
use Onurkacmaz\LaravelN11\Interfaces\ShipmentCompanyInterface;
8
use Onurkacmaz\LaravelN11\Service;
9
use SoapClient;
10
11
class ShipmentCompany extends Service implements ShipmentCompanyInterface
12
{
13
14
    /**
15
     * @var SoapClient|null
16
     */
17
    private $_client;
18
19
    /**
20
     * Shipment Company Service constructor
21
     * @throws N11Exception|\SoapFault
22
     */
23
    public function __construct()
24
    {
25
        parent::__construct();
26
        $this->_client = $this->setEndPoint(self::END_POINT);
27
    }
28
29
    /**
30
     * @return mixed
31
     * @description Sistemde tanımlı olan tüm kargo şirketlerini listeler.
32
     * Genel kullanıma açık bir servis olduğu için servisin kullanımı sırasında herhangi bir güvenlik kontrolü yapılmamaktadır.
33
     */
34
    public function getShipmentCompanies(): object {
35
        return $this->_client->GetShipmentCompanies();
36
    }
37
38
}
39