Passed
Push — master ( e80252...a999dd )
by Nikolay
32:05 queued 14:50
created
www/admin-cabinet/app/forms/ExtensionEditForm.php 4 patches
Indentation   +203 added lines, -203 removed lines patch added patch discarded remove patch
@@ -20,234 +20,234 @@
 block discarded – undo
20 20
 
21 21
 
22 22
 class ExtensionEditForm extends Form {
23
-	public function initialize($entity = NULL, $options = NULL) {
23
+    public function initialize($entity = NULL, $options = NULL) {
24 24
 
25
-		// EXTENSION
25
+        // EXTENSION
26 26
 
27
-		// ID
28
-		$this->add(new Hidden('id'));
27
+        // ID
28
+        $this->add(new Hidden('id'));
29 29
 
30
-		// Number
31
-		$this->add(new Text('number', [
32
-			"data-inputmask" => "'mask': '" . $options["internalextension_mask"] . "'",
33
-		]));
30
+        // Number
31
+        $this->add(new Text('number', [
32
+            "data-inputmask" => "'mask': '" . $options["internalextension_mask"] . "'",
33
+        ]));
34 34
 
35
-		// Type
36
-		$this->add(new Hidden('type'));
35
+        // Type
36
+        $this->add(new Hidden('type'));
37 37
 
38
-		// Is_general_user_number
39
-		$this->add(new Hidden('is_general_user_number'));
38
+        // Is_general_user_number
39
+        $this->add(new Hidden('is_general_user_number'));
40 40
 
41
-		// Show_in_phonebook
42
-		$cheskarr = ['value' => NULL];
43
-		if ($entity->show_in_phonebook) {
44
-			$cheskarr = ['checked' => 'checked', 'value' => NULL];
45
-		}
41
+        // Show_in_phonebook
42
+        $cheskarr = ['value' => NULL];
43
+        if ($entity->show_in_phonebook) {
44
+            $cheskarr = ['checked' => 'checked', 'value' => NULL];
45
+        }
46 46
 
47
-		$this->add(new Check('show_in_phonebook', $cheskarr));
47
+        $this->add(new Check('show_in_phonebook', $cheskarr));
48 48
 
49
-		// Public_access
50
-		$cheskarr = ['value' => NULL];
51
-		if ($entity->public_access) {
52
-			$cheskarr = ['checked' => 'checked', 'value' => NULL];
53
-		}
49
+        // Public_access
50
+        $cheskarr = ['value' => NULL];
51
+        if ($entity->public_access) {
52
+            $cheskarr = ['checked' => 'checked', 'value' => NULL];
53
+        }
54 54
 
55
-		$this->add(new Check('public_access', $cheskarr));
55
+        $this->add(new Check('public_access', $cheskarr));
56 56
 
57
-		// USER
58
-		// ID
59
-		$this->add(new Hidden('user_id', ["value" => $entity->Users->id]));
57
+        // USER
58
+        // ID
59
+        $this->add(new Hidden('user_id', ["value" => $entity->Users->id]));
60 60
 
61
-		// User role
62
-		$this->add(new Hidden('user_role', ["value" => $entity->Users->role]));
61
+        // User role
62
+        $this->add(new Hidden('user_role', ["value" => $entity->Users->role]));
63 63
 
64
-		// Username
65
-		$this->add(new Text('user_username', ["value" => $entity->Users->username]));
64
+        // Username
65
+        $this->add(new Text('user_username', ["value" => $entity->Users->username]));
66 66
 
67
-		// Email
68
-		$this->add(new Text('user_email', [
69
-			"value" => $entity->Users->email,
70
-		]));
67
+        // Email
68
+        $this->add(new Text('user_email', [
69
+            "value" => $entity->Users->email,
70
+        ]));
71 71
 
72
-		// Language
73
-		$language = new Select('user_language',
74
-			[
75
-				'ru-ru' => $this->translation->_("ex_Russian"),
76
-				'en-ru' => $this->translation->_("ex_English"),
77
-				'de-de'=>$this->translation->_("ex_Deutsch")
78
-			]
79
-			, [
80
-				'using'    => [
81
-					'id',
82
-					'name',
83
-				],
84
-				'value'    => $entity->Users->language,
85
-				'useEmpty' => FALSE,
86
-				'class'    => 'ui selection dropdown language-select',
87
-			]);
88
-		$this->add($language);
72
+        // Language
73
+        $language = new Select('user_language',
74
+            [
75
+                'ru-ru' => $this->translation->_("ex_Russian"),
76
+                'en-ru' => $this->translation->_("ex_English"),
77
+                'de-de'=>$this->translation->_("ex_Deutsch")
78
+            ]
79
+            , [
80
+                'using'    => [
81
+                    'id',
82
+                    'name',
83
+                ],
84
+                'value'    => $entity->Users->language,
85
+                'useEmpty' => FALSE,
86
+                'class'    => 'ui selection dropdown language-select',
87
+            ]);
88
+        $this->add($language);
89 89
 
90 90
 
91
-		// Picture
92
-		$this->add(new Hidden('user_avatar', ["value" => $entity->Users->avatar]));
91
+        // Picture
92
+        $this->add(new Hidden('user_avatar', ["value" => $entity->Users->avatar]));
93 93
 
94 94
 
95
-		// SIP
96
-		$this->add(new Hidden('sip_id', ["value" => $entity->Sip->id]));
95
+        // SIP
96
+        $this->add(new Hidden('sip_id', ["value" => $entity->Sip->id]));
97 97
 
98
-		// Disabled
99
-		$this->add(new Hidden('sip_disabled', ["value" => $entity->Sip->disabled]));
98
+        // Disabled
99
+        $this->add(new Hidden('sip_disabled', ["value" => $entity->Sip->disabled]));
100 100
 
101
-		// Extension
102
-		$this->add(new Hidden('sip_extension', ["value" => $entity->Sip->extension]));
101
+        // Extension
102
+        $this->add(new Hidden('sip_extension', ["value" => $entity->Sip->extension]));
103 103
 
104
-		// ID
105
-		$this->add(new Hidden('sip_id', ["value" => $entity->Sip->id]));
104
+        // ID
105
+        $this->add(new Hidden('sip_id', ["value" => $entity->Sip->id]));
106 106
 
107
-		// Uniqid
108
-		$this->add(new Hidden('sip_uniqid', ["value" => $entity->Sip->uniqid]));
107
+        // Uniqid
108
+        $this->add(new Hidden('sip_uniqid', ["value" => $entity->Sip->uniqid]));
109 109
 
110
-		// Type
111
-		$this->add(new Hidden('sip_type', ["value" => $entity->Sip->type]));
110
+        // Type
111
+        $this->add(new Hidden('sip_type', ["value" => $entity->Sip->type]));
112 112
 
113
-		// Secret
114
-		$this->add(new Text('sip_secret', [
115
-			"value" => $entity->Sip->secret,
116
-		]));
113
+        // Secret
114
+        $this->add(new Text('sip_secret', [
115
+            "value" => $entity->Sip->secret,
116
+        ]));
117 117
 
118
-		// Busylevel
119
-		$this->add(new Numeric('sip_busylevel', ["value" => $entity->Sip->busylevel]));
118
+        // Busylevel
119
+        $this->add(new Numeric('sip_busylevel', ["value" => $entity->Sip->busylevel]));
120 120
 
121
-		// Dtmfmode
122
-		$arrDTMFType = [
123
-			'auto'    => $this->translation->_('auto'),
124
-			'inband'  => $this->translation->_('inband'),
125
-			'info'    => $this->translation->_('info'),
126
-			'rfc4733' => $this->translation->_('rfc4733'),
121
+        // Dtmfmode
122
+        $arrDTMFType = [
123
+            'auto'    => $this->translation->_('auto'),
124
+            'inband'  => $this->translation->_('inband'),
125
+            'info'    => $this->translation->_('info'),
126
+            'rfc4733' => $this->translation->_('rfc4733'),
127 127
             'auto_info'    => $this->translation->_('auto_info'),
128
-		];
129
-
130
-		$dtmfmode = new Select('sip_dtmfmode', $arrDTMFType, [
131
-			'using'    => [
132
-				'id',
133
-				'name',
134
-			],
135
-			'useEmpty' => FALSE,
136
-			'value'    => $entity->Sip->dtmfmode,
137
-			'class'    => 'ui selection dropdown dtmf-mode-select',
138
-		]);
139
-		$this->add($dtmfmode);
140
-
141
-		// Networkfilterid
142
-		$networkfilterid = new Select('sip_networkfilterid', $options['network_filters'], [
143
-			'using'    => [
144
-				'id',
145
-				'name',
146
-			],
147
-			'useEmpty' => FALSE,
148
-			'value'    => $entity->Sip->networkfilterid,
149
-			'class'    => 'ui selection dropdown network-filter-select',
150
-		]);
151
-		$this->add($networkfilterid);
152
-
153
-
154
-		// Nat
155
-		$arrNatType = [
156
-			'force_rport,comedia' => 'force_rport, comedia',
157
-			'force_rport'         => 'force_rport',
158
-			'comedia'             => 'comedia',
159
-			'auto_force_rport'    => 'auto_force_rport',
160
-			'no'                  => 'no',
161
-		];
162
-
163
-		$nat = new Select('nat', $arrNatType, [
164
-			'using'    => [
165
-				'id',
166
-				'name',
167
-			],
168
-			'useEmpty' => FALSE,
169
-			'value'    => $entity->Sip->nat,
170
-			'class'    => 'ui selection dropdown protocol-select',
171
-		]);
172
-		$this->add($nat);
173
-
174
-		// Qualify
175
-		$cheskarr = ['value' => NULL];
176
-		if ($entity->Sip->qualify) {
177
-			$cheskarr = ['checked' => 'checked', 'value' => NULL];
178
-		}
179
-
180
-		$this->add(new Check('qualify', $cheskarr));
181
-
182
-		// Qualifyfreq
183
-		$this->add(new Numeric('qualifyfreq', ["value" => $entity->Sip->qualifyfreq]));
184
-
185
-		// Manualattributes
186
-		$rows = max(round(strlen($entity->Sip->manualattributes) / 95),
187
-			2);
188
-		$this->add(new TextArea('sip_manualattributes',
189
-			["value" => $entity->Sip->manualattributes, "rows" => $rows]));
190
-
191
-		// Description
192
-		$this->add(new Text('sip_description', ["value" => $entity->Sip->description]));
193
-
194
-		// EXTERNAL
195
-		// Extension
196
-		// // TODO: Для корректной конвертации удалим 8 и добавим 7 в номер
197
-		// $tempNumber = $options['external_extension']->number;
198
-		// if (substr($tempNumber,0,1)=='8' and strlen($tempNumber)==11){
199
-		// 	$lastSymbols = substr($tempNumber,1,10);
200
-		// 	$tempNumber = "7{$lastSymbols}";
201
-		// }
202
-		$this->add(new Text('mobile_number', ["value" => $options['external_extension']->number]));
203
-		// Uniqid
204
-		$this->add(new Hidden('mobile_uniqid', ["value" => $options['external_extension']->ExternalPhones->uniqid]));
205
-		// Disabled
206
-		$this->add(new Hidden('mobile_disabled', ["value" => $options['external_extension']->ExternalPhones->disabled]));
207
-		// Dialstring
208
-		$this->add(new Text('mobile_dialstring', ["value" => $options['external_extension']->ExternalPhones->dialstring]));
209
-
210
-
211
-		// Routing
212
-		// Forwarding
213
-		$this->add(new Select('fwd_forwarding', $options['forwarding_extensions'], [
214
-			'using'    => [
215
-				'id',
216
-				'name',
217
-			],
218
-			'useEmpty' => TRUE,
219
-			'value'    => $entity->ExtensionForwardingRights->forwarding,
220
-			'class'    => 'ui selection dropdown search forwarding-select',
221
-		]));
222
-		// Forwardingonbusy
223
-		$this->add(new Select('fwd_forwardingonbusy', $options['forwarding_extensions'], [
224
-			'using'    => [
225
-				'id',
226
-				'name',
227
-			],
228
-			'useEmpty' => TRUE,
229
-			'value'    => $entity->ExtensionForwardingRights->forwardingonbusy,
230
-			'class'    => 'ui selection dropdown search forwarding-select',
231
-		]));
232
-		// Forwardingonunavailable
233
-		$this->add(new Select('fwd_forwardingonunavailable', $options['forwarding_extensions'], [
234
-			'using'    => [
235
-				'id',
236
-				'name',
237
-			],
238
-			'useEmpty' => TRUE,
239
-			'value'    => $entity->ExtensionForwardingRights->forwardingonunavailable,
240
-			'class'    => 'ui selection dropdown search forwarding-select',
241
-		]));
242
-		// Ringlength
243
-		$ringlength = $entity->ExtensionForwardingRights->ringlength;
244
-		$this->add(new Numeric('fwd_ringlength', [
245
-			"maxlength"    => 2,
246
-			"style"        => "width: 80px;",
247
-			"defaultValue" => 120,
248
-			"value"        => ($ringlength > 0) ? $ringlength : '',
249
-		]));
250
-
251
-
252
-	}
128
+        ];
129
+
130
+        $dtmfmode = new Select('sip_dtmfmode', $arrDTMFType, [
131
+            'using'    => [
132
+                'id',
133
+                'name',
134
+            ],
135
+            'useEmpty' => FALSE,
136
+            'value'    => $entity->Sip->dtmfmode,
137
+            'class'    => 'ui selection dropdown dtmf-mode-select',
138
+        ]);
139
+        $this->add($dtmfmode);
140
+
141
+        // Networkfilterid
142
+        $networkfilterid = new Select('sip_networkfilterid', $options['network_filters'], [
143
+            'using'    => [
144
+                'id',
145
+                'name',
146
+            ],
147
+            'useEmpty' => FALSE,
148
+            'value'    => $entity->Sip->networkfilterid,
149
+            'class'    => 'ui selection dropdown network-filter-select',
150
+        ]);
151
+        $this->add($networkfilterid);
152
+
153
+
154
+        // Nat
155
+        $arrNatType = [
156
+            'force_rport,comedia' => 'force_rport, comedia',
157
+            'force_rport'         => 'force_rport',
158
+            'comedia'             => 'comedia',
159
+            'auto_force_rport'    => 'auto_force_rport',
160
+            'no'                  => 'no',
161
+        ];
162
+
163
+        $nat = new Select('nat', $arrNatType, [
164
+            'using'    => [
165
+                'id',
166
+                'name',
167
+            ],
168
+            'useEmpty' => FALSE,
169
+            'value'    => $entity->Sip->nat,
170
+            'class'    => 'ui selection dropdown protocol-select',
171
+        ]);
172
+        $this->add($nat);
173
+
174
+        // Qualify
175
+        $cheskarr = ['value' => NULL];
176
+        if ($entity->Sip->qualify) {
177
+            $cheskarr = ['checked' => 'checked', 'value' => NULL];
178
+        }
179
+
180
+        $this->add(new Check('qualify', $cheskarr));
181
+
182
+        // Qualifyfreq
183
+        $this->add(new Numeric('qualifyfreq', ["value" => $entity->Sip->qualifyfreq]));
184
+
185
+        // Manualattributes
186
+        $rows = max(round(strlen($entity->Sip->manualattributes) / 95),
187
+            2);
188
+        $this->add(new TextArea('sip_manualattributes',
189
+            ["value" => $entity->Sip->manualattributes, "rows" => $rows]));
190
+
191
+        // Description
192
+        $this->add(new Text('sip_description', ["value" => $entity->Sip->description]));
193
+
194
+        // EXTERNAL
195
+        // Extension
196
+        // // TODO: Для корректной конвертации удалим 8 и добавим 7 в номер
197
+        // $tempNumber = $options['external_extension']->number;
198
+        // if (substr($tempNumber,0,1)=='8' and strlen($tempNumber)==11){
199
+        // 	$lastSymbols = substr($tempNumber,1,10);
200
+        // 	$tempNumber = "7{$lastSymbols}";
201
+        // }
202
+        $this->add(new Text('mobile_number', ["value" => $options['external_extension']->number]));
203
+        // Uniqid
204
+        $this->add(new Hidden('mobile_uniqid', ["value" => $options['external_extension']->ExternalPhones->uniqid]));
205
+        // Disabled
206
+        $this->add(new Hidden('mobile_disabled', ["value" => $options['external_extension']->ExternalPhones->disabled]));
207
+        // Dialstring
208
+        $this->add(new Text('mobile_dialstring', ["value" => $options['external_extension']->ExternalPhones->dialstring]));
209
+
210
+
211
+        // Routing
212
+        // Forwarding
213
+        $this->add(new Select('fwd_forwarding', $options['forwarding_extensions'], [
214
+            'using'    => [
215
+                'id',
216
+                'name',
217
+            ],
218
+            'useEmpty' => TRUE,
219
+            'value'    => $entity->ExtensionForwardingRights->forwarding,
220
+            'class'    => 'ui selection dropdown search forwarding-select',
221
+        ]));
222
+        // Forwardingonbusy
223
+        $this->add(new Select('fwd_forwardingonbusy', $options['forwarding_extensions'], [
224
+            'using'    => [
225
+                'id',
226
+                'name',
227
+            ],
228
+            'useEmpty' => TRUE,
229
+            'value'    => $entity->ExtensionForwardingRights->forwardingonbusy,
230
+            'class'    => 'ui selection dropdown search forwarding-select',
231
+        ]));
232
+        // Forwardingonunavailable
233
+        $this->add(new Select('fwd_forwardingonunavailable', $options['forwarding_extensions'], [
234
+            'using'    => [
235
+                'id',
236
+                'name',
237
+            ],
238
+            'useEmpty' => TRUE,
239
+            'value'    => $entity->ExtensionForwardingRights->forwardingonunavailable,
240
+            'class'    => 'ui selection dropdown search forwarding-select',
241
+        ]));
242
+        // Ringlength
243
+        $ringlength = $entity->ExtensionForwardingRights->ringlength;
244
+        $this->add(new Numeric('fwd_ringlength', [
245
+            "maxlength"    => 2,
246
+            "style"        => "width: 80px;",
247
+            "defaultValue" => 120,
248
+            "value"        => ($ringlength > 0) ? $ringlength : '',
249
+        ]));
250
+
251
+
252
+    }
253 253
 }
254 254
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
 		// Number
31 31
 		$this->add(new Text('number', [
32
-			"data-inputmask" => "'mask': '" . $options["internalextension_mask"] . "'",
32
+			"data-inputmask" => "'mask': '".$options["internalextension_mask"]."'",
33 33
 		]));
34 34
 
35 35
 		// Type
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,10 @@
 block discarded – undo
19 19
 use Phalcon\Forms\Element\TextArea;
20 20
 
21 21
 
22
-class ExtensionEditForm extends Form {
23
-	public function initialize($entity = NULL, $options = NULL) {
22
+class ExtensionEditForm extends Form
23
+{
24
+	public function initialize($entity = NULL, $options = NULL)
25
+	{
24 26
 
25 27
 		// EXTENSION
26 28
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 
22 22
 class ExtensionEditForm extends Form {
23
-	public function initialize($entity = NULL, $options = NULL) {
23
+	public function initialize($entity = null, $options = null) {
24 24
 
25 25
 		// EXTENSION
26 26
 
@@ -39,17 +39,17 @@  discard block
 block discarded – undo
39 39
 		$this->add(new Hidden('is_general_user_number'));
40 40
 
41 41
 		// Show_in_phonebook
42
-		$cheskarr = ['value' => NULL];
42
+		$cheskarr = ['value' => null];
43 43
 		if ($entity->show_in_phonebook) {
44
-			$cheskarr = ['checked' => 'checked', 'value' => NULL];
44
+			$cheskarr = ['checked' => 'checked', 'value' => null];
45 45
 		}
46 46
 
47 47
 		$this->add(new Check('show_in_phonebook', $cheskarr));
48 48
 
49 49
 		// Public_access
50
-		$cheskarr = ['value' => NULL];
50
+		$cheskarr = ['value' => null];
51 51
 		if ($entity->public_access) {
52
-			$cheskarr = ['checked' => 'checked', 'value' => NULL];
52
+			$cheskarr = ['checked' => 'checked', 'value' => null];
53 53
 		}
54 54
 
55 55
 		$this->add(new Check('public_access', $cheskarr));
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 					'name',
83 83
 				],
84 84
 				'value'    => $entity->Users->language,
85
-				'useEmpty' => FALSE,
85
+				'useEmpty' => false,
86 86
 				'class'    => 'ui selection dropdown language-select',
87 87
 			]);
88 88
 		$this->add($language);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 				'id',
133 133
 				'name',
134 134
 			],
135
-			'useEmpty' => FALSE,
135
+			'useEmpty' => false,
136 136
 			'value'    => $entity->Sip->dtmfmode,
137 137
 			'class'    => 'ui selection dropdown dtmf-mode-select',
138 138
 		]);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 				'id',
145 145
 				'name',
146 146
 			],
147
-			'useEmpty' => FALSE,
147
+			'useEmpty' => false,
148 148
 			'value'    => $entity->Sip->networkfilterid,
149 149
 			'class'    => 'ui selection dropdown network-filter-select',
150 150
 		]);
@@ -165,16 +165,16 @@  discard block
 block discarded – undo
165 165
 				'id',
166 166
 				'name',
167 167
 			],
168
-			'useEmpty' => FALSE,
168
+			'useEmpty' => false,
169 169
 			'value'    => $entity->Sip->nat,
170 170
 			'class'    => 'ui selection dropdown protocol-select',
171 171
 		]);
172 172
 		$this->add($nat);
173 173
 
174 174
 		// Qualify
175
-		$cheskarr = ['value' => NULL];
175
+		$cheskarr = ['value' => null];
176 176
 		if ($entity->Sip->qualify) {
177
-			$cheskarr = ['checked' => 'checked', 'value' => NULL];
177
+			$cheskarr = ['checked' => 'checked', 'value' => null];
178 178
 		}
179 179
 
180 180
 		$this->add(new Check('qualify', $cheskarr));
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 				'id',
216 216
 				'name',
217 217
 			],
218
-			'useEmpty' => TRUE,
218
+			'useEmpty' => true,
219 219
 			'value'    => $entity->ExtensionForwardingRights->forwarding,
220 220
 			'class'    => 'ui selection dropdown search forwarding-select',
221 221
 		]));
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 				'id',
226 226
 				'name',
227 227
 			],
228
-			'useEmpty' => TRUE,
228
+			'useEmpty' => true,
229 229
 			'value'    => $entity->ExtensionForwardingRights->forwardingonbusy,
230 230
 			'class'    => 'ui selection dropdown search forwarding-select',
231 231
 		]));
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 				'id',
236 236
 				'name',
237 237
 			],
238
-			'useEmpty' => TRUE,
238
+			'useEmpty' => true,
239 239
 			'value'    => $entity->ExtensionForwardingRights->forwardingonunavailable,
240 240
 			'class'    => 'ui selection dropdown search forwarding-select',
241 241
 		]));
Please login to merge, or discard this patch.
www/admin-cabinet/app/forms/SoundFilesEditForm.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
             switch ($key){
22 22
 
23 23
                 case "id":
24
-	            case "path":
25
-	            case "***ALL HIDDEN ABOVE***":
24
+                case "path":
25
+                case "***ALL HIDDEN ABOVE***":
26 26
                     $this->add(new Hidden($key));
27 27
                     break;
28 28
                 default:
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
 {
18 18
     public function initialize($entity = null, $options = null)
19 19
     {
20
-        foreach ($entity as $key=>$value){
21
-            switch ($key){
20
+        foreach ($entity as $key=>$value) {
21
+            switch ($key) {
22 22
 
23 23
                 case "id":
24 24
 	            case "path":
Please login to merge, or discard this patch.
www/admin-cabinet/app/forms/SipProviderEditForm.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -136,15 +136,15 @@
 block discarded – undo
136 136
         }
137 137
         $this->add(new Check('disablefromuser',$cheskarr));
138 138
 
139
-	    // Receive_calls_without_auth
140
-	    $cheskarr=array('value'=>null);
141
-	    if ($entity->receive_calls_without_auth) {
142
-		    $cheskarr = array('checked' => 'checked','value'=>null);
143
-	    }
144
-	    $this->add(new Check('receive_calls_without_auth',$cheskarr));
139
+        // Receive_calls_without_auth
140
+        $cheskarr=array('value'=>null);
141
+        if ($entity->receive_calls_without_auth) {
142
+            $cheskarr = array('checked' => 'checked','value'=>null);
143
+        }
144
+        $this->add(new Check('receive_calls_without_auth',$cheskarr));
145 145
 
146 146
         // Manualattributes
147
-	    $rows = max( round( strlen( $entity->manualattributes ) / 95 ), 2 );
148
-	    $this->add( new TextArea( 'manualattributes', [ "rows" => $rows ] ) );
147
+        $rows = max( round( strlen( $entity->manualattributes ) / 95 ), 2 );
148
+        $this->add( new TextArea( 'manualattributes', [ "rows" => $rows ] ) );
149 149
     }
150 150
 }
151 151
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         // Networkfilterid
29 29
 
30 30
         // ProviderType
31
-        $this->add(new Hidden('providerType',['value'=>'SIP']));
31
+        $this->add(new Hidden('providerType', ['value'=>'SIP']));
32 32
 
33 33
         // Disabled
34 34
         $this->add(new Hidden('disabled'));
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $this->add(new Numeric('port'));
81 81
 
82 82
         // Nat
83
-        $arrNatType=array(
83
+        $arrNatType = array(
84 84
             'force_rport,comedia'=>'force_rport, comedia',
85 85
             'force_rport'=>'force_rport',
86 86
             'comedia'=>'comedia',
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
         $this->add($nat);
101 101
 
102 102
         // Qualify
103
-        $cheskarr=array('value'=>null);
103
+        $cheskarr = array('value'=>null);
104 104
         if ($entity->qualify) {
105
-            $cheskarr = array('checked' => 'checked','value'=>null);
105
+            $cheskarr = array('checked' => 'checked', 'value'=>null);
106 106
         }
107 107
 
108
-        $this->add(new Check('qualify',$cheskarr));
108
+        $this->add(new Check('qualify', $cheskarr));
109 109
 
110 110
         // Qualifyfreq
111 111
         $this->add(new Numeric('qualifyfreq'));
@@ -120,31 +120,31 @@  discard block
 block discarded – undo
120 120
         $this->add(new Text('fromdomain'));
121 121
 
122 122
         // Noregister
123
-        $cheskarr=array('value'=>null);
123
+        $cheskarr = array('value'=>null);
124 124
         if ($entity->noregister) {
125
-            $cheskarr = array('checked' => 'checked','value'=>null);
125
+            $cheskarr = array('checked' => 'checked', 'value'=>null);
126 126
         }
127
-        $this->add(new Check('noregister',$cheskarr));
127
+        $this->add(new Check('noregister', $cheskarr));
128 128
 
129 129
         // Manualregister
130 130
         $this->add(new Text('manualregister'));
131 131
 
132 132
         // Disablefromuser
133
-        $cheskarr=array('value'=>null);
133
+        $cheskarr = array('value'=>null);
134 134
         if ($entity->disablefromuser) {
135
-            $cheskarr = array('checked' => 'checked','value'=>null);
135
+            $cheskarr = array('checked' => 'checked', 'value'=>null);
136 136
         }
137
-        $this->add(new Check('disablefromuser',$cheskarr));
137
+        $this->add(new Check('disablefromuser', $cheskarr));
138 138
 
139 139
 	    // Receive_calls_without_auth
140
-	    $cheskarr=array('value'=>null);
140
+	    $cheskarr = array('value'=>null);
141 141
 	    if ($entity->receive_calls_without_auth) {
142
-		    $cheskarr = array('checked' => 'checked','value'=>null);
142
+		    $cheskarr = array('checked' => 'checked', 'value'=>null);
143 143
 	    }
144
-	    $this->add(new Check('receive_calls_without_auth',$cheskarr));
144
+	    $this->add(new Check('receive_calls_without_auth', $cheskarr));
145 145
 
146 146
         // Manualattributes
147
-	    $rows = max( round( strlen( $entity->manualattributes ) / 95 ), 2 );
148
-	    $this->add( new TextArea( 'manualattributes', [ "rows" => $rows ] ) );
147
+	    $rows = max(round(strlen($entity->manualattributes) / 95), 2);
148
+	    $this->add(new TextArea('manualattributes', ["rows" => $rows]));
149 149
     }
150 150
 }
151 151
\ No newline at end of file
Please login to merge, or discard this patch.
www/admin-cabinet/app/forms/CallDetailRecordsFilterForm.php 4 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
 
18 18
 class CallDetailRecordsFilterForm extends Form {
19 19
 
20
-	public function initialize( $entity = NULL, $options = NULL ) {
20
+    public function initialize( $entity = NULL, $options = NULL ) {
21 21
 
22
-		$this->add( new Text( 'extension',
23
-			[ 'value' => $options['extension'] ] ) );
24
-		$this->add( new Text( 'date_from',
25
-			[ 'value' => $options['date_from'] ] ) );
26
-		$this->add( new Text( 'date_to', [ 'value' => $options['date_to'] ] ) );
22
+        $this->add( new Text( 'extension',
23
+            [ 'value' => $options['extension'] ] ) );
24
+        $this->add( new Text( 'date_from',
25
+            [ 'value' => $options['date_from'] ] ) );
26
+        $this->add( new Text( 'date_to', [ 'value' => $options['date_to'] ] ) );
27 27
 
28
-	}
28
+    }
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
 
18 18
 class CallDetailRecordsFilterForm extends Form {
19 19
 
20
-	public function initialize( $entity = NULL, $options = NULL ) {
20
+	public function initialize($entity = NULL, $options = NULL) {
21 21
 
22
-		$this->add( new Text( 'extension',
23
-			[ 'value' => $options['extension'] ] ) );
24
-		$this->add( new Text( 'date_from',
25
-			[ 'value' => $options['date_from'] ] ) );
26
-		$this->add( new Text( 'date_to', [ 'value' => $options['date_to'] ] ) );
22
+		$this->add(new Text('extension',
23
+			['value' => $options['extension']]));
24
+		$this->add(new Text('date_from',
25
+			['value' => $options['date_from']]));
26
+		$this->add(new Text('date_to', ['value' => $options['date_to']]));
27 27
 
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,11 @@
 block discarded – undo
15 15
 use Phalcon\Forms\Element\TextArea;
16 16
 
17 17
 
18
-class CallDetailRecordsFilterForm extends Form {
18
+class CallDetailRecordsFilterForm extends Form
19
+{
19 20
 
20
-	public function initialize( $entity = NULL, $options = NULL ) {
21
+	public function initialize( $entity = NULL, $options = NULL )
22
+	{
21 23
 
22 24
 		$this->add( new Text( 'extension',
23 25
 			[ 'value' => $options['extension'] ] ) );
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
 class CallDetailRecordsFilterForm extends Form {
19 19
 
20
-	public function initialize( $entity = NULL, $options = NULL ) {
20
+	public function initialize( $entity = null, $options = null ) {
21 21
 
22 22
 		$this->add( new Text( 'extension',
23 23
 			[ 'value' => $options['extension'] ] ) );
Please login to merge, or discard this patch.
www/admin-cabinet/app/forms/MailSettingsEditForm.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 {
20 20
     public function initialize($entity = null, $options = null)
21 21
     {
22
-         foreach ($options as $key=>$value) {
22
+            foreach ($options as $key=>$value) {
23 23
             switch ($key){
24 24
                 case 'MailEnableNotifications' :
25 25
                 case 'MailSMTPUseTLS' :
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
                 case 'MailTplMissedCallBody' :
35 35
                 case 'MailTplVoicemailBody' :
36
-				case 'MailTplMissedCallFooter' :
36
+                case 'MailTplMissedCallFooter' :
37 37
 
38 38
                     $this->add(new TextArea($key, array(
39 39
                         'value' => $value
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
     public function initialize($entity = null, $options = null)
21 21
     {
22 22
          foreach ($options as $key=>$value) {
23
-            switch ($key){
23
+            switch ($key) {
24 24
                 case 'MailEnableNotifications' :
25 25
                 case 'MailSMTPUseTLS' :
26 26
                 case 'MailSMTPCertCheck' :
27
-                    $cheskarr=array('value'=>null);
27
+                    $cheskarr = array('value'=>null);
28 28
                     if ($value) {
29
-                        $cheskarr = array('checked' => 'checked','value'=>null);
29
+                        $cheskarr = array('checked' => 'checked', 'value'=>null);
30 30
                     }
31 31
                     $this->add(new Check($key, $cheskarr));
32 32
                     break;
Please login to merge, or discard this patch.
www/admin-cabinet/app/forms/OutgoingRouteEditForm.php 3 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -16,43 +16,43 @@
 block discarded – undo
16 16
 
17 17
 
18 18
 class OutgoingRouteEditForm extends Form {
19
-	public function initialize($entity = NULL, $options = NULL) {
19
+    public function initialize($entity = NULL, $options = NULL) {
20 20
 
21
-		// ID
22
-		$this->add(new Hidden('id'));
21
+        // ID
22
+        $this->add(new Hidden('id'));
23 23
 
24
-		// Priority
25
-		$this->add(new Hidden('priority'));
24
+        // Priority
25
+        $this->add(new Hidden('priority'));
26 26
 
27
-		// Rulename
28
-		$this->add(new Text('rulename'));
27
+        // Rulename
28
+        $this->add(new Text('rulename'));
29 29
 
30
-		// Note
31
-		$rows = max(round(strlen($entity->note) / 95), 2);
32
-		$this->add(new TextArea('note', ["rows" => $rows]));
30
+        // Note
31
+        $rows = max(round(strlen($entity->note) / 95), 2);
32
+        $this->add(new TextArea('note', ["rows" => $rows]));
33 33
 
34
-		// Numberbeginswith
35
-		$this->add(new Text('numberbeginswith'));
34
+        // Numberbeginswith
35
+        $this->add(new Text('numberbeginswith'));
36 36
 
37
-		// Prepend
38
-		$this->add(new Text('prepend'));
37
+        // Prepend
38
+        $this->add(new Text('prepend'));
39 39
 
40
-		// Restnumbers
41
-		$this->add(new Numeric('restnumbers', ["maxlength" => 2, "style" => "width: 80px;", 'min' => 0]));
40
+        // Restnumbers
41
+        $this->add(new Numeric('restnumbers', ["maxlength" => 2, "style" => "width: 80px;", 'min' => 0]));
42 42
 
43
-		// Trimfrombegin
44
-		$this->add(new Text('trimfrombegin', ["maxlength" => 2, "style" => "width: 80px;", 'min' => 0]));
43
+        // Trimfrombegin
44
+        $this->add(new Text('trimfrombegin', ["maxlength" => 2, "style" => "width: 80px;", 'min' => 0]));
45 45
 
46
-		// Providers
47
-		$providers = new Select('providerid', $options, [
48
-			'using'    => [
49
-				'id',
50
-				'name',
51
-			],
52
-			'useEmpty' => FALSE,
53
-			'class'    => 'ui selection dropdown providerselect',
54
-		]);
55
-		$this->add($providers);
46
+        // Providers
47
+        $providers = new Select('providerid', $options, [
48
+            'using'    => [
49
+                'id',
50
+                'name',
51
+            ],
52
+            'useEmpty' => FALSE,
53
+            'class'    => 'ui selection dropdown providerselect',
54
+        ]);
55
+        $this->add($providers);
56 56
 
57
-	}
57
+    }
58 58
 }
59 59
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,10 @@
 block discarded – undo
15 15
 use Phalcon\Forms\Element\Numeric;
16 16
 
17 17
 
18
-class OutgoingRouteEditForm extends Form {
19
-	public function initialize($entity = NULL, $options = NULL) {
18
+class OutgoingRouteEditForm extends Form
19
+{
20
+	public function initialize($entity = NULL, $options = NULL)
21
+	{
20 22
 
21 23
 		// ID
22 24
 		$this->add(new Hidden('id'));
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 
18 18
 class OutgoingRouteEditForm extends Form {
19
-	public function initialize($entity = NULL, $options = NULL) {
19
+	public function initialize($entity = null, $options = null) {
20 20
 
21 21
 		// ID
22 22
 		$this->add(new Hidden('id'));
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 				'id',
50 50
 				'name',
51 51
 			],
52
-			'useEmpty' => FALSE,
52
+			'useEmpty' => false,
53 53
 			'class'    => 'ui selection dropdown providerselect',
54 54
 		]);
55 55
 		$this->add($providers);
Please login to merge, or discard this patch.
www/admin-cabinet/app/forms/BackupCreateForm.php 4 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@
 block discarded – undo
18 18
 
19 19
 class BackupCreateForm extends Form {
20 20
 
21
-	public function initialize( $entity = NULL, $options = NULL ) {
22
-		foreach ( $options as $name => $value ) {
23
-			$cheskarr = [ 'value' => NULL ];
24
-			if ( $value ) {
25
-				$cheskarr = [ 'checked' => 'checked', 'value' => NULL ];
26
-			}
27
-			$this->add( new Check( $name, $cheskarr ) );
28
-		}
21
+    public function initialize( $entity = NULL, $options = NULL ) {
22
+        foreach ( $options as $name => $value ) {
23
+            $cheskarr = [ 'value' => NULL ];
24
+            if ( $value ) {
25
+                $cheskarr = [ 'checked' => 'checked', 'value' => NULL ];
26
+            }
27
+            $this->add( new Check( $name, $cheskarr ) );
28
+        }
29 29
 
30
-	}
30
+    }
31 31
 }
32 32
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
18 18
 
19 19
 class BackupCreateForm extends Form {
20 20
 
21
-	public function initialize( $entity = NULL, $options = NULL ) {
22
-		foreach ( $options as $name => $value ) {
23
-			$cheskarr = [ 'value' => NULL ];
24
-			if ( $value ) {
25
-				$cheskarr = [ 'checked' => 'checked', 'value' => NULL ];
21
+	public function initialize($entity = NULL, $options = NULL) {
22
+		foreach ($options as $name => $value) {
23
+			$cheskarr = ['value' => NULL];
24
+			if ($value) {
25
+				$cheskarr = ['checked' => 'checked', 'value' => NULL];
26 26
 			}
27
-			$this->add( new Check( $name, $cheskarr ) );
27
+			$this->add(new Check($name, $cheskarr));
28 28
 		}
29 29
 
30 30
 	}
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,11 @@
 block discarded – undo
16 16
 use Phalcon\Forms\Element\Check;
17 17
 
18 18
 
19
-class BackupCreateForm extends Form {
19
+class BackupCreateForm extends Form
20
+{
20 21
 
21
-	public function initialize( $entity = NULL, $options = NULL ) {
22
+	public function initialize( $entity = NULL, $options = NULL )
23
+	{
22 24
 		foreach ( $options as $name => $value ) {
23 25
 			$cheskarr = [ 'value' => NULL ];
24 26
 			if ( $value ) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
 
19 19
 class BackupCreateForm extends Form {
20 20
 
21
-	public function initialize( $entity = NULL, $options = NULL ) {
21
+	public function initialize( $entity = null, $options = null ) {
22 22
 		foreach ( $options as $name => $value ) {
23
-			$cheskarr = [ 'value' => NULL ];
23
+			$cheskarr = [ 'value' => null ];
24 24
 			if ( $value ) {
25
-				$cheskarr = [ 'checked' => 'checked', 'value' => NULL ];
25
+				$cheskarr = [ 'checked' => 'checked', 'value' => null ];
26 26
 			}
27 27
 			$this->add( new Check( $name, $cheskarr ) );
28 28
 		}
Please login to merge, or discard this patch.
www/admin-cabinet/app/forms/LicensingChangeLicenseKeyForm.php 4 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 class LicensingChangeLicenseKeyForm extends Form {
14 14
 
15
-	public function initialize( $entity = NULL, $options = NULL ) {
16
-		$this->add( new Text( 'licKey', [ "value" => $options['licKey'] ] ) );
17
-	}
15
+    public function initialize( $entity = NULL, $options = NULL ) {
16
+        $this->add( new Text( 'licKey', [ "value" => $options['licKey'] ] ) );
17
+    }
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 class LicensingChangeLicenseKeyForm extends Form {
14 14
 
15
-	public function initialize( $entity = NULL, $options = NULL ) {
16
-		$this->add( new Text( 'licKey', [ "value" => $options['licKey'] ] ) );
15
+	public function initialize($entity = NULL, $options = NULL) {
16
+		$this->add(new Text('licKey', ["value" => $options['licKey']]));
17 17
 	}
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,9 +10,11 @@
 block discarded – undo
10 10
 use Phalcon\Forms\Form;
11 11
 use Phalcon\Forms\Element\Text;
12 12
 
13
-class LicensingChangeLicenseKeyForm extends Form {
13
+class LicensingChangeLicenseKeyForm extends Form
14
+{
14 15
 
15
-	public function initialize( $entity = NULL, $options = NULL ) {
16
+	public function initialize( $entity = NULL, $options = NULL )
17
+	{
16 18
 		$this->add( new Text( 'licKey', [ "value" => $options['licKey'] ] ) );
17 19
 	}
18 20
 }
19 21
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 class LicensingChangeLicenseKeyForm extends Form {
14 14
 
15
-	public function initialize( $entity = NULL, $options = NULL ) {
15
+	public function initialize( $entity = null, $options = null ) {
16 16
 		$this->add( new Text( 'licKey', [ "value" => $options['licKey'] ] ) );
17 17
 	}
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
www/admin-cabinet/app/forms/LoginForm.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
 {
16 16
     public function initialize($entity = null, $options = null)
17 17
     {
18
-	    $login = new Text( 'login' );
19
-	    $this->add( $login );
18
+        $login = new Text( 'login' );
19
+        $this->add( $login );
20 20
 
21 21
         // Password
22 22
         $password = new Password('password');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
 {
16 16
     public function initialize($entity = null, $options = null)
17 17
     {
18
-	    $login = new Text( 'login' );
19
-	    $this->add( $login );
18
+	    $login = new Text('login');
19
+	    $this->add($login);
20 20
 
21 21
         // Password
22 22
         $password = new Password('password');
Please login to merge, or discard this patch.