Total Complexity | 10 |
Total Lines | 228 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class SalesforceContactLog extends DataObject |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * create contact log |
||
10 | * @param string $type |
||
11 | * @param array $fieldsSent |
||
12 | * @param array $filters |
||
13 | * |
||
14 | * @return SalesforceContactLog |
||
15 | */ |
||
16 | public static function create_contact_log($type, array $fieldsSent, array $filters) : SalesforceContactLog |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * returns true if the contact update was successful |
||
34 | * @param mixed $response |
||
35 | * |
||
36 | * @return bool |
||
37 | */ |
||
38 | public function confirmContactLog($response) : bool |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * Singular name for CMS |
||
69 | * @var string |
||
70 | */ |
||
71 | private static $singular_name = 'Sales Force Contact Log'; |
||
1 ignored issue
–
show
|
|||
72 | |||
73 | /** |
||
74 | * Plural name for CMS |
||
75 | * @var string |
||
76 | */ |
||
77 | private static $plural_name = 'Sales Force Contact Log Entries'; |
||
1 ignored issue
–
show
|
|||
78 | |||
79 | /** |
||
80 | * SS4 prep! |
||
81 | * @var string |
||
82 | */ |
||
83 | private static $table_name = 'SalesforceContactLog'; |
||
1 ignored issue
–
show
|
|||
84 | |||
85 | private static $db = [ |
||
1 ignored issue
–
show
|
|||
86 | 'SalesforceIdentifier' => 'Varchar(40)', |
||
87 | 'Type' => 'Enum("Created,Updated")', |
||
88 | 'Executed' => 'Boolean', |
||
89 | 'FieldsSent' => 'Text', |
||
90 | 'Filters' => 'Text', |
||
91 | 'HasError' => 'Boolean', |
||
92 | 'Errors' => 'Text', |
||
93 | ]; |
||
94 | |||
95 | |||
96 | private static $default_sort = [ |
||
1 ignored issue
–
show
|
|||
97 | 'ID' => 'DESC' |
||
98 | ]; |
||
99 | |||
100 | /** |
||
101 | * Defines a default list of filters for the search context |
||
102 | * @var array |
||
103 | */ |
||
104 | private static $searchable_fields = [ |
||
1 ignored issue
–
show
|
|||
105 | 'Type' => 'ExactMatchFilter', |
||
106 | 'Executed' => 'ExactMatchFilter', |
||
107 | 'HasError' => 'ExactMatchFilter', |
||
108 | 'SalesforceIdentifier' => 'PartialMatchField', |
||
109 | 'FieldsSent' => 'PartialMatchField', |
||
110 | 'Filters' => 'PartialMatchField', |
||
111 | 'Errors' => 'PartialMatchField', |
||
112 | ]; |
||
113 | |||
114 | /** |
||
115 | * Defines summary fields commonly used in table columns |
||
116 | * as a quick overview of the data for this dataobject |
||
117 | * @var array |
||
118 | */ |
||
119 | private static $summary_fields = [ |
||
1 ignored issue
–
show
|
|||
120 | 'Created.Nice' => 'Created', |
||
121 | 'SalesforceIdentifier' => 'SF ID', |
||
122 | 'Type' => 'Type', |
||
123 | 'Executed.Nice' => 'Executed', |
||
124 | 'Type' => 'Type', |
||
125 | 'HasError.Nice' => 'Errors', |
||
126 | 'Errors' => 'Errors', |
||
127 | ]; |
||
128 | |||
129 | private static $indexes = [ |
||
1 ignored issue
–
show
|
|||
130 | 'SalesforceIdentifier' => true |
||
131 | ]; |
||
132 | |||
133 | /** |
||
134 | * CMS Fields |
||
135 | * @return FieldList |
||
136 | */ |
||
137 | public function getCMSFields() |
||
191 | } |
||
192 | |||
193 | /** |
||
194 | * DataObject create permissions |
||
195 | * @param Member $member |
||
196 | * @return bool |
||
197 | */ |
||
198 | public function canCreate($member = null) |
||
199 | { |
||
200 | return false; |
||
201 | } |
||
202 | |||
203 | /** |
||
204 | * DataObject edit permissions |
||
205 | * @param Member $member |
||
206 | * @return bool |
||
207 | */ |
||
208 | public function canEdit($member = null) |
||
209 | { |
||
210 | return false; |
||
211 | } |
||
212 | |||
213 | /** |
||
214 | * DataObject delete permissions |
||
215 | * @param Member $member |
||
216 | * @return bool |
||
217 | */ |
||
218 | public function canDelete($member = null) |
||
219 | { |
||
220 | return false; |
||
221 | } |
||
222 | |||
223 | /** |
||
224 | * |
||
225 | * @param string $serializedString (serialised data) |
||
226 | * @return string (html) |
||
227 | */ |
||
228 | protected function serializedToHTML($serializedString) |
||
233 | } |
||
234 | |||
235 | } |
||
236 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.