@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * SQL query via Doctrine prepare(), needs to be execute()'d! |
61 | 61 | */ |
62 | - public static function prepare($query , $limit = null, $offset = null, $isManipulation = null) { |
|
62 | + public static function prepare($query, $limit = null, $offset = null, $isManipulation = null) { |
|
63 | 63 | $connection = \OC::$server->getDatabaseConnection(); |
64 | 64 | |
65 | 65 | if ($isManipulation === null) { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | return true; |
104 | 104 | } |
105 | 105 | |
106 | - \OC::$server->getLogger()->logException(new \Exception('Can not detect if query is manipulating: ' . $sql)); |
|
106 | + \OC::$server->getLogger()->logException(new \Exception('Can not detect if query is manipulating: '.$sql)); |
|
107 | 107 | |
108 | 108 | return false; |
109 | 109 | } |
@@ -131,14 +131,14 @@ discard block |
||
131 | 131 | } |
132 | 132 | if (is_array($stmt)) { |
133 | 133 | // convert to prepared statement |
134 | - if (! array_key_exists('sql', $stmt)) { |
|
134 | + if (!array_key_exists('sql', $stmt)) { |
|
135 | 135 | $message = 'statement array must at least contain key \'sql\''; |
136 | 136 | throw new \OC\DatabaseException($message); |
137 | 137 | } |
138 | - if (! array_key_exists('limit', $stmt)) { |
|
138 | + if (!array_key_exists('limit', $stmt)) { |
|
139 | 139 | $stmt['limit'] = null; |
140 | 140 | } |
141 | - if (! array_key_exists('limit', $stmt)) { |
|
141 | + if (!array_key_exists('limit', $stmt)) { |
|
142 | 142 | $stmt['offset'] = null; |
143 | 143 | } |
144 | 144 | $stmt = self::prepare($stmt['sql'], $stmt['limit'], $stmt['offset']); |
@@ -149,9 +149,9 @@ discard block |
||
149 | 149 | self::raiseExceptionOnError($result, 'Could not execute statement'); |
150 | 150 | } else { |
151 | 151 | if (is_object($stmt)) { |
152 | - $message = 'Expected a prepared statement or array got ' . get_class($stmt); |
|
152 | + $message = 'Expected a prepared statement or array got '.get_class($stmt); |
|
153 | 153 | } else { |
154 | - $message = 'Expected a prepared statement or array got ' . gettype($stmt); |
|
154 | + $message = 'Expected a prepared statement or array got '.gettype($stmt); |
|
155 | 155 | } |
156 | 156 | throw new \OC\DatabaseException($message); |
157 | 157 | } |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | if ($message === null) { |
222 | 222 | $message = self::getErrorMessage(); |
223 | 223 | } else { |
224 | - $message .= ', Root cause:' . self::getErrorMessage(); |
|
224 | + $message .= ', Root cause:'.self::getErrorMessage(); |
|
225 | 225 | } |
226 | 226 | throw new \OC\DatabaseException($message); |
227 | 227 | } |