@@ -74,7 +74,7 @@ |
||
74 | 74 | ], |
75 | 75 | ], |
76 | 76 | ]; |
77 | - $query = $di->get('modelsManager')->createBuilder($parameters)->getQuery(); |
|
77 | + $query = $di->get('modelsManager')->createBuilder($parameters)->getQuery(); |
|
78 | 78 | |
79 | 79 | return $query->execute(); |
80 | 80 | } |
@@ -32,19 +32,19 @@ |
||
32 | 32 | |
33 | 33 | foreach ($options['array_of_checkboxes'] as $checkBox) { |
34 | 34 | $cheskarr = []; |
35 | - $this->add(new Check($checkBox . '_main', $cheskarr)); |
|
35 | + $this->add(new Check($checkBox.'_main', $cheskarr)); |
|
36 | 36 | |
37 | 37 | if (strpos($entity->$checkBox, 'read') !== false) { |
38 | 38 | $cheskarr = ['checked' => 'checked', 'value' => null]; |
39 | 39 | } |
40 | - $this->add(new Check($checkBox . '_read', $cheskarr)); |
|
40 | + $this->add(new Check($checkBox.'_read', $cheskarr)); |
|
41 | 41 | |
42 | 42 | if (strpos($entity->$checkBox, 'write') !== false) { |
43 | 43 | $cheskarr = ['checked' => 'checked', 'value' => null]; |
44 | 44 | } else { |
45 | 45 | $cheskarr = ['value' => null]; |
46 | 46 | } |
47 | - $this->add(new Check($checkBox . '_write', $cheskarr)); |
|
47 | + $this->add(new Check($checkBox.'_write', $cheskarr)); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // Networkfilterid |
@@ -333,13 +333,13 @@ discard block |
||
333 | 333 | if (array_key_exists('submenu', $groupparams)) { |
334 | 334 | $resultHtml .= '<div class="item">'; |
335 | 335 | $resultHtml .= '<div class="header">'; |
336 | - if (array_key_exists('iconclass', $groupparams) && ! empty($groupparams['iconclass'])) { |
|
336 | + if (array_key_exists('iconclass', $groupparams) && !empty($groupparams['iconclass'])) { |
|
337 | 337 | $resultHtml .= "<i class='{$groupparams['iconclass']} icon'></i>"; |
338 | 338 | } |
339 | - $resultHtml .= $this->translation->_($groupparams['caption']) . '</div>'; |
|
339 | + $resultHtml .= $this->translation->_($groupparams['caption']).'</div>'; |
|
340 | 340 | $resultHtml .= "<div class='menu' data-group='{$group}'>"; |
341 | 341 | foreach ($groupparams['submenu'] as $controller => $option) { |
342 | - $link = $this->url->get($controller . '/' . $option['action'] . '/' . $option['param']); |
|
342 | + $link = $this->url->get($controller.'/'.$option['action'].'/'.$option['param']); |
|
343 | 343 | $caption = $this->translation->_($option['caption']); |
344 | 344 | $resultHtml .= "<a class='item {$option['style']}' href='{$link}'> |
345 | 345 | <i class='{$option['iconclass']} icon'></i>{$caption} |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | $resultHtml .= '</div>'; |
349 | 349 | $resultHtml .= '</div>'; |
350 | 350 | } else { |
351 | - $link = $this->url->get($group . '/' . $groupparams['action'] . '/' . $groupparams['param']); |
|
351 | + $link = $this->url->get($group.'/'.$groupparams['action'].'/'.$groupparams['param']); |
|
352 | 352 | $caption = $this->translation->_($groupparams['caption']); |
353 | 353 | $resultHtml .= "<a class='item {$groupparams['style']}' href='{$link}'> |
354 | 354 | <i class='{$groupparams['iconclass']} icon'></i>{$caption} |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | foreach ($this->_headerMenu as $index => $group) { |
373 | 373 | if ($index === $uncamelizeControllerName |
374 | 374 | && array_key_exists('iconclass', $group[$uncamelizeControllerName]) |
375 | - && ! empty($group[$uncamelizeControllerName]['iconclass']) |
|
375 | + && !empty($group[$uncamelizeControllerName]['iconclass']) |
|
376 | 376 | ) { |
377 | 377 | $result = "<i class='{$group[$uncamelizeControllerName]['iconclass']} icon'></i>"; |
378 | 378 | break; |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | if (array_key_exists('submenu', $group)) { |
381 | 381 | foreach ($group['submenu'] as $index2 => $submenu) { |
382 | 382 | if ($index2 === $uncamelizeControllerName |
383 | - && ! empty($submenu['iconclass'])) { |
|
383 | + && !empty($submenu['iconclass'])) { |
|
384 | 384 | $result = "<i class='{$submenu['iconclass']} icon'></i>"; |
385 | 385 | break; |
386 | 386 | } |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | $result = []; |
402 | 402 | foreach ($this->_headerMenu as $group => $groupparams) { |
403 | 403 | if (array_key_exists('submenu', $groupparams)) { |
404 | - $result[(string)($group)] = $this->translation->_($groupparams['caption']); |
|
404 | + $result[(string) ($group)] = $this->translation->_($groupparams['caption']); |
|
405 | 405 | } |
406 | 406 | } |
407 | 407 |
@@ -23,9 +23,9 @@ |
||
23 | 23 | { |
24 | 24 | $this->flushCache(); |
25 | 25 | $this->view->NameFromSettings |
26 | - = PbxSettings::getValueByKey('Name'); |
|
26 | + = PbxSettings::getValueByKey('Name'); |
|
27 | 27 | $this->view->DescriptionFromSettings |
28 | - = PbxSettings::getValueByKey('Description'); |
|
28 | + = PbxSettings::getValueByKey('Description'); |
|
29 | 29 | $this->view->form = new LoginForm(); |
30 | 30 | } |
31 | 31 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function startAction(): void |
52 | 52 | { |
53 | - if ( ! $this->request->isPost()) { |
|
53 | + if (!$this->request->isPost()) { |
|
54 | 54 | $this->forward('session/index'); |
55 | 55 | } |
56 | 56 | $loginFromUser = $this->request->getPost('login'); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | private function updateSystemLanguage(): void |
93 | 93 | { |
94 | 94 | $newLanguage = $this->session->get('WebAdminLanguage'); |
95 | - if ( ! isset($newLanguage)) { |
|
95 | + if (!isset($newLanguage)) { |
|
96 | 96 | return; |
97 | 97 | } |
98 | 98 | $languageSettings = PbxSettings::findFirstByKey('WebAdminLanguage'); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function saveAction(): void |
62 | 62 | { |
63 | - if ( ! $this->request->isPost()) { |
|
63 | + if (!$this->request->isPost()) { |
|
64 | 64 | return; |
65 | 65 | } |
66 | 66 | $data = $this->request->getPost(); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $record->value = ($data[$key] == 'on') ? "1" : "0"; |
83 | 83 | break; |
84 | 84 | default: |
85 | - if ( ! array_key_exists($key, $data)) { |
|
85 | + if (!array_key_exists($key, $data)) { |
|
86 | 86 | continue 2; |
87 | 87 | } |
88 | 88 | $record->value = $data[$key]; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function saveAction(): void |
56 | 56 | { |
57 | - if ( ! $this->request->isPost()) { |
|
57 | + if (!$this->request->isPost()) { |
|
58 | 58 | return; |
59 | 59 | } |
60 | 60 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $customFile->setContent($data[$name]); |
75 | 75 | break; |
76 | 76 | default: |
77 | - if ( ! array_key_exists($name, $data)) { |
|
77 | + if (!array_key_exists($name, $data)) { |
|
78 | 78 | continue 2; |
79 | 79 | } |
80 | 80 | $customFile->$name = $data[$name]; |
@@ -47,7 +47,7 @@ |
||
47 | 47 | [key] |
48 | 48 | ) |
49 | 49 | ) |
50 | -EOF; |
|
50 | +eof; |
|
51 | 51 | try { |
52 | 52 | $this->db->exec('PRAGMA journal_mode=WAL;'); |
53 | 53 | $this->db->exec($sql); |
@@ -86,7 +86,7 @@ |
||
86 | 86 | if ($result === true || $this->db === null) { |
87 | 87 | return $result; |
88 | 88 | } |
89 | - $sql = "INSERT" . " OR REPLACE INTO astdb (key, value) VALUES ('/{$family}/{$key}', '{$value}')"; |
|
89 | + $sql = "INSERT"." OR REPLACE INTO astdb (key, value) VALUES ('/{$family}/{$key}', '{$value}')"; |
|
90 | 90 | try { |
91 | 91 | $result = $this->db->exec($sql); |
92 | 92 | } catch (\Exception $e) { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | public static function init(): void |
21 | 21 | { |
22 | - require __DIR__ . '/functions.php'; |
|
22 | + require __DIR__.'/functions.php'; |
|
23 | 23 | require appPath('vendor/autoload.php'); |
24 | 24 | |
25 | 25 | $di = Di::getDefault(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | { |
92 | 92 | $content = $this->getContent(); |
93 | 93 | $timestamp = date('c'); |
94 | - $hash = sha1($timestamp . $content); |
|
94 | + $hash = sha1($timestamp.$content); |
|
95 | 95 | $eTag = sha1($content); |
96 | 96 | |
97 | 97 | /** @var array $content */ |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | 'version' => '1.0', |
102 | 102 | ], |
103 | 103 | ]; |
104 | - $meta = [ |
|
104 | + $meta = [ |
|
105 | 105 | 'meta' => [ |
106 | 106 | 'timestamp' => $timestamp, |
107 | 107 | 'hash' => $hash, |