@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | /** @noinspection OnlyWritesOnParameterInspection */ |
| 151 | 151 | /** @noinspection PhpUnusedLocalVariableInspection */ |
| 152 | 152 | $data = $this->data; // for eval |
| 153 | - $buffer .= eval('return ' . $val['value']); |
|
| 153 | + $buffer .= eval('return '.$val['value']); |
|
| 154 | 154 | break; |
| 155 | 155 | |
| 156 | 156 | default: |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | - $result .= (strlen($buffer) ? $buffer : ' ') . Html::closeTag('dd'); |
|
| 164 | + $result .= (strlen($buffer) ? $buffer : ' ').Html::closeTag('dd'); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | echo $result, Html::closeTag('dl'); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | public function init() |
| 128 | 128 | { |
| 129 | 129 | if (!file_exists($this->pathView)) { |
| 130 | - throw new Exception('View path not valid: ' . $this->pathView); |
|
| 130 | + throw new Exception('View path not valid: '.$this->pathView); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | $this->rowsCount = count($this->rows); |
@@ -162,8 +162,8 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | protected function getCounter() |
| 164 | 164 | { |
| 165 | - return Html::openTag('div', $this->attributesCounter) . |
|
| 166 | - $this->counterText . $this->totalCount . Html::closeTag('div'); |
|
| 165 | + return Html::openTag('div', $this->attributesCounter). |
|
| 166 | + $this->counterText.$this->totalCount.Html::closeTag('div'); |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | /** |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | protected function getElements() |
| 177 | 177 | { |
| 178 | 178 | if (!$this->rows) { |
| 179 | - return Html::openTag('div', $this->attributesEmpty) . $this->emptyText . Html::closeTag('div'); |
|
| 179 | + return Html::openTag('div', $this->attributesEmpty).$this->emptyText.Html::closeTag('div'); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | ob_start(); |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | if ($this->totalPages > 0) { |
| 91 | 91 | for ($i = 1; $i <= $this->totalPages; $i++) { |
| 92 | 92 | $items[] = [ |
| 93 | - 'text' => Html::href($i, $this->url . ($i - 1), $this->attributesLink), |
|
| 93 | + 'text' => Html::href($i, $this->url.($i - 1), $this->attributesLink), |
|
| 94 | 94 | 'attr' => array_merge( |
| 95 | 95 | $this->attributesElement, |
| 96 | 96 | ($i === (int)$this->currentPage + 1 ? ['class' => 'active'] : []) |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | $query = new Query($this->container->db); |
| 95 | 95 | $query->select = '*'; |
| 96 | 96 | $query->table = 'acl_user'; |
| 97 | - $query->addWhere('`user`=' . $userId); |
|
| 97 | + $query->addWhere('`user`='.$userId); |
|
| 98 | 98 | $query->single = false; |
| 99 | 99 | |
| 100 | 100 | return $query->run(); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $query->distinct = true; |
| 151 | 151 | $query->select = '`role` AS `name`'; |
| 152 | 152 | $query->table = '`rbac_user`'; |
| 153 | - $query->addWhere('`user`=' . $userId); |
|
| 153 | + $query->addWhere('`user`='.$userId); |
|
| 154 | 154 | $query->single = false; |
| 155 | 155 | |
| 156 | 156 | return $query->run(\PDO::FETCH_ASSOC); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | } else { |
| 202 | 202 | extract($data, EXTR_OVERWRITE); |
| 203 | 203 | |
| 204 | - return eval('return ' . $role['data']); |
|
| 204 | + return eval('return '.$role['data']); |
|
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $query->addJoin('`acl_role_perm` AS `arp`', '`arp`.`role` = `au`.`role`'); |
| 81 | 81 | $query->addJoin('`acl_perm` AS `ap1`', '`ap1`.`id` = `arp`.`perm`'); |
| 82 | 82 | |
| 83 | - $query->addWhere('`au`.`user`=' . $userId); |
|
| 83 | + $query->addWhere('`au`.`user`='.$userId); |
|
| 84 | 84 | $query->addWhere('`ap`.`name`=:perm OR `ap1`.`name`=:perm'); |
| 85 | 85 | |
| 86 | 86 | $query->limit = 1; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $query = new Query($this->container->db); |
| 171 | 171 | $query->select = '*'; |
| 172 | 172 | $query->table = 'acl_role_perm'; |
| 173 | - $query->addWhere('role=' . $role); |
|
| 173 | + $query->addWhere('role='.$role); |
|
| 174 | 174 | $query->single = false; |
| 175 | 175 | |
| 176 | 176 | return $query->run(); |
@@ -238,9 +238,9 @@ discard block |
||
| 238 | 238 | public function forbidPrivilege($userId, $privilege = null, $asRole = true) |
| 239 | 239 | { |
| 240 | 240 | if ($asRole) { |
| 241 | - $this->container->db->delete('acl_user', '`user`="' . $userId . '" AND `role`="' . $privilege . '"'); |
|
| 241 | + $this->container->db->delete('acl_user', '`user`="'.$userId.'" AND `role`="'.$privilege.'"'); |
|
| 242 | 242 | } else { |
| 243 | - $this->container->db->delete('acl_user', '`user`="' . $userId . '" AND `perm`="' . $privilege . '"'); |
|
| 243 | + $this->container->db->delete('acl_user', '`user`="'.$userId.'" AND `perm`="'.$privilege.'"'); |
|
| 244 | 244 | } |
| 245 | 245 | } |
| 246 | 246 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $this->from = !empty($params['from']) ? $params['from'] : getenv('SERVER_ADMIN'); |
| 41 | 41 | $this->to = !empty($params['to']) ? $params['to'] : $this->from; |
| 42 | - $this->subject = $params['subject'] ?: getenv('SERVER_NAME') . ' log message'; |
|
| 42 | + $this->subject = $params['subject'] ?: getenv('SERVER_NAME').' log message'; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $mail = new Message($this->from); |
| 51 | 51 | |
| 52 | 52 | $mail->setTo($this->to); |
| 53 | - $mail->setText(ucfirst($level) . ': ' . $message, $this->type); |
|
| 53 | + $mail->setText(ucfirst($level).': '.$message, $this->type); |
|
| 54 | 54 | |
| 55 | 55 | $this->container->mail->send($mail); |
| 56 | 56 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | if (is_writable($params['filename']) || is_writable(dirname($params['filename']))) { |
| 44 | 44 | $this->connect = fopen($params['filename'], 'a+'); |
| 45 | 45 | } else { |
| 46 | - throw new Exception('Directory or file "' . $params['filename'] . '" is read-only'); |
|
| 46 | + throw new Exception('Directory or file "'.$params['filename'].'" is read-only'); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | public function sendMessage($level, $message) |
| 54 | 54 | { |
| 55 | 55 | if (is_resource($this->connect)) { |
| 56 | - fwrite($this->connect, '[' . date('H:i:s d.m.Y') . '] ' . ucfirst($level) . ": {$message}\n"); |
|
| 56 | + fwrite($this->connect, '['.date('H:i:s d.m.Y').'] '.ucfirst($level).": {$message}\n"); |
|
| 57 | 57 | } else { |
| 58 | 58 | throw new Exception('Error write log in file.'); |
| 59 | 59 | } |
@@ -82,6 +82,6 @@ |
||
| 82 | 82 | |
| 83 | 83 | $s->csrf = array_merge(is_array($s->csrf) ? $s->csrf : [], [md5($gen)]); |
| 84 | 84 | |
| 85 | - return $matches[1] . '<input type="hidden" name="csrf" value="' . $gen . '" />' . $matches[2] . $matches[3]; |
|
| 85 | + return $matches[1].'<input type="hidden" name="csrf" value="'.$gen.'" />'.$matches[2].$matches[3]; |
|
| 86 | 86 | } |
| 87 | 87 | } |