MRepair   A
last analyzed

Complexity

Total Complexity 27

Size/Duplication

Total Lines 110
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 110
c 0
b 0
f 0
wmc 27
lcom 1
cbo 1
rs 10

27 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getOptions() 0 3 1
A getOption() 0 3 1
A generateRepairReference() 0 4 1
A implodeAddress() 0 4 1
A getRepairStatuses() 0 4 1
A getAppointmentTypes() 0 4 1
A ticketAttendees() 0 4 1
A getTicketAttachemnts() 0 4 1
A getTicketResponseBody() 0 4 1
A getTicketDiagnosis() 0 4 1
A getRepairTicket() 0 4 1
A getRepairTickets() 0 4 1
A getClientRepairTickets() 0 4 1
A getTicketAdditionalEmailsToNotify() 0 4 1
A getTicketCannedResponses() 0 4 1
A getTicketCannedResponsesCategories() 0 4 1
A getTicketsAppointments() 0 4 1
A getRepairMessages() 0 4 1
A getRepairTotalCharges() 0 4 1
A getTicketResponseCategoryId() 0 4 1
A booleanToYesNo() 0 4 1
A getTicketIssueTypes() 0 4 1
A ticketNotificationEmails() 0 4 1
A renderRepairDiagnosisKey() 0 4 1
A renderRepairDiagnosisValue() 0 4 1
A searchRepairByReference() 0 4 1
1
<?php
2
3
/**
4
 * m'Manager | Invoices Management System
5
 * 
6
 * This content is released under the Proprietary License (Proprietary)
7
 *
8
 * Copyright (c) 2017, Eric Claver AKAFFOU - All Rights Reserved
9
 * Unauthorized copying of this file, via any medium is strictly prohibited
10
 * Proprietary and confidential
11
 * 
12
 * @package m'Manager
13
 * @author  Eric Claver AKAFFOU
14
 * @copyright   Copyright (c) 2017, on'Eric Computing, Inc. (https://www.onericcomputing.com/)
15
 * @license https://www.mmanager.fr  Proprietary License
16
 * @link    https://codecanyon.net/item/mmanager-invoices-management-system/19866435?s_rank=1
17
 * @since   Version 1.0.0
18
 * @filesource
19
 */
20
21
namespace Mmanager\Extensions\Mrepair;
22
23
use Mmanager\Extensions\Mrepair\Functions;
24
use Mmanager\Domain\Factory\QuoteFactory as Quote;
25
/**
26
 * MRepair Entity
27
 */
28
class MRepair {
29
	protected $fn;
30
	public function __construct() {
31
		$this->fn = new Functions();
32
		$this->fn->createTables();
33
	}
34
	
35
	public function getOptions() {
36
		return $this->fn->getOptions();
37
	}
38
	public function getOption($option_name) {
39
		return $this->fn->getOption($option_name);
40
	}
41
	public static function generateRepairReference() {
42
		$fn = new Functions();
43
		return $fn->generateRepairReference();
44
	}
45
	public static function implodeAddress($id = null, $context) {
46
		$fn = new Functions();
47
		return $fn->implodeAddress($id, $context);
48
	}
49
	public static function getRepairStatuses($id = null, $str = false) {
50
		$fn = new Functions();
51
		return $fn->getRepairStatuses($id, $str);
52
	}
53
	public static function getAppointmentTypes($id = null, $str = false) {
54
		$fn = new Functions();
55
		return $fn->getAppointmentTypes($id, $str);
56
	}
57
	public static function ticketAttendees($id) {
58
		$fn = new Functions();
59
		return $fn->ticketAttendees($id);
60
	}
61
	public static function getTicketAttachemnts($id) {
62
		$fn = new Functions();
63
		return $fn->getTicketAttachemnts($id);
64
	}
65
	public static function getTicketResponseBody($id) {
66
		$fn = new Functions();
67
		return $fn->getTicketResponseBody($id);
68
	}
69
	public static function getTicketDiagnosis($id = null, $var = null, $context = null) {
70
		$fn = new Functions();
71
		return $fn->getTicketDiagnosis($id, $var, $context);
72
	}
73
	public static function getRepairTicket($id, $var = null) {
74
		$fn = new Functions();
75
		return $fn->getRepairTicket($id, $var);
76
	}
77
	public static function getRepairTickets() {
78
		$fn = new Functions();
79
		return $fn->getRepairTickets();
80
	}
81
	public static function getClientRepairTickets($client_id) {
82
		$fn = new Functions();
83
		return $fn->getClientRepairTickets($client_id);
84
	}
85
	public static function getTicketAdditionalEmailsToNotify() {
86
		$fn = new Functions();
87
		return $fn->getTicketAdditionalEmailsToNotify();
88
	}
89
	public static function getTicketCannedResponses() {
90
		$fn = new Functions();
91
		return $fn->getTicketCannedResponses();
92
	}
93
	public static function getTicketCannedResponsesCategories() {
94
		$fn = new Functions();
95
		return $fn->getTicketCannedResponsesCategories();
96
	}
97
	public static function getTicketsAppointments() {
98
		$fn = new Functions();
99
		return $fn->getTicketsAppointments();
100
	}
101
	public static function getRepairMessages($id) {
102
		$fn = new Functions();
103
		return $fn->getRepairMessages($id);
104
	}
105
	public static function getRepairTotalCharges($id) {
106
		$quote = new Quote();
107
		return $quote->getCustomer($id, 'client_email');
108
	}
109
	public static function getTicketResponseCategoryId($name) {
110
		$fn = new Functions();
111
		return $fn->getTicketResponseCategoryId($name);
112
	}
113
	public static function booleanToYesNo($int) {
114
		$fn = new Functions();
115
		return $fn->booleanToYesNo($int);
116
	}
117
	public static function getTicketIssueTypes($id = null) {
118
		$fn = new Functions();
119
		return $fn->getTicketIssueTypes($id);
120
	}
121
	public static function ticketNotificationEmails($id = null) {
122
		$fn = new Functions();
123
		return $fn->ticketNotificationEmails($id);
124
	}
125
	public static function renderRepairDiagnosisKey($key) {
126
		$fn = new Functions();
127
		return $fn->renderRepairDiagnosisKey($key);
128
	}
129
	public static function renderRepairDiagnosisValue($val) {
130
		$fn = new Functions();
131
		return $fn->renderRepairDiagnosisValue($val);
132
	}
133
	public static function searchRepairByReference($ref) {
134
		$fn = new Functions();
135
		return $fn->searchRepairByReference($ref);
136
	}
137
}