@@ -41,34 +41,34 @@ |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function md5($input) { |
| 44 | - return new QueryFunction('MD5(' . $this->helper->quoteColumnName($input) . ')'); |
|
| 44 | + return new QueryFunction('MD5('.$this->helper->quoteColumnName($input).')'); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public function concat($x, $y) { |
| 48 | - return new QueryFunction('CONCAT(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')'); |
|
| 48 | + return new QueryFunction('CONCAT('.$this->helper->quoteColumnName($x).', '.$this->helper->quoteColumnName($y).')'); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | public function substring($input, $start, $length = null) { |
| 52 | 52 | if ($length) { |
| 53 | - return new QueryFunction('SUBSTR(' . $this->helper->quoteColumnName($input) . ', ' . $this->helper->quoteColumnName($start) . ', ' . $this->helper->quoteColumnName($length) . ')'); |
|
| 53 | + return new QueryFunction('SUBSTR('.$this->helper->quoteColumnName($input).', '.$this->helper->quoteColumnName($start).', '.$this->helper->quoteColumnName($length).')'); |
|
| 54 | 54 | } else { |
| 55 | - return new QueryFunction('SUBSTR(' . $this->helper->quoteColumnName($input) . ', ' . $this->helper->quoteColumnName($start) . ')'); |
|
| 55 | + return new QueryFunction('SUBSTR('.$this->helper->quoteColumnName($input).', '.$this->helper->quoteColumnName($start).')'); |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | public function sum($field) { |
| 60 | - return new QueryFunction('SUM(' . $this->helper->quoteColumnName($field) . ')'); |
|
| 60 | + return new QueryFunction('SUM('.$this->helper->quoteColumnName($field).')'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | public function lower($field) { |
| 64 | - return new QueryFunction('LOWER(' . $this->helper->quoteColumnName($field) . ')'); |
|
| 64 | + return new QueryFunction('LOWER('.$this->helper->quoteColumnName($field).')'); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | public function add($x, $y) { |
| 68 | - return new QueryFunction($this->helper->quoteColumnName($x) . ' + ' . $this->helper->quoteColumnName($y)); |
|
| 68 | + return new QueryFunction($this->helper->quoteColumnName($x).' + '.$this->helper->quoteColumnName($y)); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | public function subtract($x, $y) { |
| 72 | - return new QueryFunction($this->helper->quoteColumnName($x) . ' - ' . $this->helper->quoteColumnName($y)); |
|
| 72 | + return new QueryFunction($this->helper->quoteColumnName($x).' - '.$this->helper->quoteColumnName($y)); |
|
| 73 | 73 | } |
| 74 | 74 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | } |
| 155 | 155 | $query = $this->connection->prepare('SELECT `lock` from `*PREFIX*file_locks` WHERE `key` = ?'); |
| 156 | 156 | $query->execute([$path]); |
| 157 | - $lockValue = (int)$query->fetchColumn(); |
|
| 157 | + $lockValue = (int) $query->fetchColumn(); |
|
| 158 | 158 | if ($type === self::LOCK_SHARED) { |
| 159 | 159 | if ($this->isLocallyLocked($path)) { |
| 160 | 160 | // if we have a shared lock we kept open locally but it's released we always have at least 1 shared lock in the db |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | // since we keep shared locks we need to manually clean those |
| 293 | 293 | $lockedPaths = array_keys($this->sharedLocks); |
| 294 | - $lockedPaths = array_filter($lockedPaths, function ($path) { |
|
| 294 | + $lockedPaths = array_filter($lockedPaths, function($path) { |
|
| 295 | 295 | return $this->sharedLocks[$path]; |
| 296 | 296 | }); |
| 297 | 297 | |