Passed
Push — main ( 05c548...9f0ffd )
by Usama
02:27
created

Daftravel   A

Complexity

Total Complexity 34

Size/Duplication

Total Lines 174
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 34
eloc 38
c 1
b 0
f 1
dl 0
loc 174
rs 9.68

34 Methods

Rating   Name   Duplication   Size   Complexity  
A journals() 0 3 1
A purchaseRefunds() 0 3 1
A taxes() 0 3 1
A priceLists() 0 3 1
A customers() 0 3 1
A clientPayments() 0 3 1
A currencies() 0 3 1
A refundReceipts() 0 3 1
A users() 0 3 1
A invoices() 0 3 1
A appointments() 0 3 1
A workOrders() 0 3 1
A siteInfo() 0 3 1
A clientAttendance() 0 3 1
A expenses() 0 3 1
A incomes() 0 3 1
A inventory() 0 3 1
A notes() 0 3 1
A stores() 0 3 1
A creditNotes() 0 3 1
A categories() 0 3 1
A getClient() 0 3 1
A reports() 0 3 1
A treasuries() 0 3 1
A purchases() 0 3 1
A followUps() 0 3 1
A payments() 0 3 1
A stockTransactions() 0 3 1
A transactions() 0 3 1
A listings() 0 3 1
A timeTracking() 0 3 1
A products() 0 3 1
A __construct() 0 4 1
A suppliers() 0 3 1
1
<?php
2
3
namespace UsamamuneerChaudhary\Daftravel;
4
5
use UsamamuneerChaudhary\Daftravel\Http\Client;
6
use UsamamuneerChaudhary\Daftravel\Services\ProductService;
7
use UsamamuneerChaudhary\Daftravel\Services\CategoryService;
8
use UsamamuneerChaudhary\Daftravel\Services\CustomerService;
9
use UsamamuneerChaudhary\Daftravel\Services\SupplierService;
10
11
use UsamamuneerChaudhary\Daftravel\Services\InvoiceService;
12
use UsamamuneerChaudhary\Daftravel\Services\PurchaseService;
13
use UsamamuneerChaudhary\Daftravel\Services\PaymentService;
14
use UsamamuneerChaudhary\Daftravel\Services\ExpenseService;
15
use UsamamuneerChaudhary\Daftravel\Services\ReportService;
16
use UsamamuneerChaudhary\Daftravel\Services\UserService;
17
use UsamamuneerChaudhary\Daftravel\Services\TaxService;
18
use UsamamuneerChaudhary\Daftravel\Services\CurrencyService;
19
use UsamamuneerChaudhary\Daftravel\Services\PriceListService;
20
use UsamamuneerChaudhary\Daftravel\Services\InventoryService;
21
use UsamamuneerChaudhary\Daftravel\Services\TransactionService;
22
use UsamamuneerChaudhary\Daftravel\Services\AppointmentService;
23
use UsamamuneerChaudhary\Daftravel\Services\FollowUpService;
24
use UsamamuneerChaudhary\Daftravel\Services\NoteService;
25
use UsamamuneerChaudhary\Daftravel\Services\TimeTrackingService;
26
use UsamamuneerChaudhary\Daftravel\Services\WorkOrderService;
27
use UsamamuneerChaudhary\Daftravel\Services\CreditNoteService;
28
use UsamamuneerChaudhary\Daftravel\Services\RefundReceiptService;
29
use UsamamuneerChaudhary\Daftravel\Services\ClientPaymentService;
30
use UsamamuneerChaudhary\Daftravel\Services\JournalService;
31
use UsamamuneerChaudhary\Daftravel\Services\IncomeService;
32
use UsamamuneerChaudhary\Daftravel\Services\PurchaseRefundService;
33
use UsamamuneerChaudhary\Daftravel\Services\StockTransactionService;
34
use UsamamuneerChaudhary\Daftravel\Services\StoreService;
35
use UsamamuneerChaudhary\Daftravel\Services\TreasuryService;
36
use UsamamuneerChaudhary\Daftravel\Services\ClientAttendanceService;
37
use UsamamuneerChaudhary\Daftravel\Services\SiteInfoService;
38
use UsamamuneerChaudhary\Daftravel\Services\ListingService;
39
40
class Daftravel
41
{
42
    protected Client $client;
43
    protected array $config;
44
45
    public function __construct(array $config)
46
    {
47
        $this->config = $config;
48
        $this->client = new Client($config);
49
    }
50
51
    public function products(): ProductService
52
    {
53
        return new ProductService($this->client, $this->config);
54
    }
55
56
    public function categories(): CategoryService
57
    {
58
        return new CategoryService($this->client, $this->config);
59
    }
60
61
    public function customers(): CustomerService
62
    {
63
        return new CustomerService($this->client, $this->config);
64
    }
65
66
    public function suppliers(): SupplierService
67
    {
68
        return new SupplierService($this->client, $this->config);
69
    }
70
71
    public function invoices(): InvoiceService
72
    {
73
        return new InvoiceService($this->client, $this->config);
74
    }
75
76
    public function purchases(): PurchaseService
77
    {
78
        return new PurchaseService($this->client, $this->config);
79
    }
80
81
    public function payments(): PaymentService
82
    {
83
        return new PaymentService($this->client, $this->config);
84
    }
85
86
    public function expenses(): ExpenseService
87
    {
88
        return new ExpenseService($this->client, $this->config);
89
    }
90
91
    public function reports(): ReportService
92
    {
93
        return new ReportService($this->client, $this->config);
94
    }
95
96
    public function users(): UserService
97
    {
98
        return new UserService($this->client, $this->config);
99
    }
100
101
    public function taxes(): TaxService
102
    {
103
        return new TaxService($this->client, $this->config);
104
    }
105
106
    public function currencies(): CurrencyService
107
    {
108
        return new CurrencyService($this->client, $this->config);
109
    }
110
111
    public function priceLists(): PriceListService
112
    {
113
        return new PriceListService($this->client, $this->config);
114
    }
115
116
    public function inventory(): InventoryService
117
    {
118
        return new InventoryService($this->client, $this->config);
119
    }
120
121
    public function transactions(): TransactionService
122
    {
123
        return new TransactionService($this->client, $this->config);
124
    }
125
126
    public function appointments(): AppointmentService
127
    {
128
        return new AppointmentService($this->client, $this->config);
129
    }
130
131
    public function followUps(): FollowUpService
132
    {
133
        return new FollowUpService($this->client, $this->config);
134
    }
135
136
    public function notes(): NoteService
137
    {
138
        return new NoteService($this->client, $this->config);
139
    }
140
141
    public function timeTracking(): TimeTrackingService
142
    {
143
        return new TimeTrackingService($this->client, $this->config);
144
    }
145
146
    public function workOrders(): WorkOrderService
147
    {
148
        return new WorkOrderService($this->client, $this->config);
149
    }
150
151
    public function creditNotes(): CreditNoteService
152
    {
153
        return new CreditNoteService($this->client, $this->config);
154
    }
155
156
    public function refundReceipts(): RefundReceiptService
157
    {
158
        return new RefundReceiptService($this->client, $this->config);
159
    }
160
161
    public function clientPayments(): ClientPaymentService
162
    {
163
        return new ClientPaymentService($this->client, $this->config);
164
    }
165
166
    public function journals(): JournalService
167
    {
168
        return new JournalService($this->client, $this->config);
169
    }
170
171
    public function incomes(): IncomeService
172
    {
173
        return new IncomeService($this->client, $this->config);
174
    }
175
176
    public function purchaseRefunds(): PurchaseRefundService
177
    {
178
        return new PurchaseRefundService($this->client, $this->config);
179
    }
180
181
    public function stockTransactions(): StockTransactionService
182
    {
183
        return new StockTransactionService($this->client, $this->config);
184
    }
185
186
    public function stores(): StoreService
187
    {
188
        return new StoreService($this->client, $this->config);
189
    }
190
191
    public function treasuries(): TreasuryService
192
    {
193
        return new TreasuryService($this->client, $this->config);
194
    }
195
196
    public function clientAttendance(): ClientAttendanceService
197
    {
198
        return new ClientAttendanceService($this->client, $this->config);
199
    }
200
201
    public function siteInfo(): SiteInfoService
202
    {
203
        return new SiteInfoService($this->client, $this->config);
204
    }
205
206
    public function listings(): ListingService
207
    {
208
        return new ListingService($this->client, $this->config);
209
    }
210
211
    public function getClient(): Client
212
    {
213
        return $this->client;
214
    }
215
}
216