Passed
Push — main ( d3b6ab...05c548 )
by Usama
02:26
created

ReportService::paginate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
namespace UsamamuneerChaudhary\Daftravel\Services;
4
5
/**
6
 * Report Service
7
 *
8
 * Handles all report-related operations via the Daftra API.
9
 * Endpoint: /reports
10
 *
11
 * Available methods (inherited from BaseService):
12
 *   - all(array $params = []) - Get all reports with optional filtering
13
 *   - find(int $id) - Find a specific report by ID
14
 *   - create(array $data) - Create a new report
15
 *   - update(int $id, array $data) - Update an existing report
16
 *   - delete(int $id) - Delete a report
17
 *   - paginate(int $page = 1, int $limit = 20, array $params = []) - Paginate reports
18
 *   - search(string $query, array $params = []) - Search reports
19
 *
20
 * Path parameters (for GET operations):
21
 *   - format (string, default: ".json") - Format of the output (GET /reports{format}, GET /reports/{id}{format})
22
 *
23
 * Common query parameters:
24
 *   - limit (integer [1..1000], default: 20) - Number of records per page
25
 *   - page (integer >= 1, default: 1) - Page number
26
 *
27
 * Report-specific parameters:
28
 *   - type (string) - Report type filter
29
 *   - date_from (string) - Start date for report filtering
30
 *   - date_to (string) - End date for report filtering
31
 *
32
 * For complete parameter documentation and endpoint-specific features,
33
 * see the official Daftra API documentation: https://azmart.daftra.com/api_docs/v2
34
 */
35
class ReportService extends BaseService
36
{
37
    protected ?string $endpoint = '/reports';
38
}
39