@@ -15,6 +15,9 @@ |
||
| 15 | 15 | return $error; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | + /** |
|
| 19 | + * @return callable |
|
| 20 | + */ |
|
| 18 | 21 | protected function getErrorHandler() |
| 19 | 22 | { |
| 20 | 23 | if (!$this->errorHandler) { |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | protected function getErrorHandler() |
| 19 | 19 | { |
| 20 | 20 | if (!$this->errorHandler) { |
| 21 | - $this->errorHandler = function ($severity, $message, $file = '', $line = 0, $context = array()) { |
|
| 21 | + $this->errorHandler = function($severity, $message, $file = '', $line = 0, $context = array()) { |
|
| 22 | 22 | restore_error_handler(); |
| 23 | 23 | $code = 0; |
| 24 | 24 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | foreach ($patterns as $pattern) { |
| 27 | 27 | preg_match($pattern, $message, $matches); |
| 28 | 28 | if (is_array($matches) && array_key_exists(1, $matches)) { |
| 29 | - $code = (int)$matches[1]; |
|
| 29 | + $code = (int) $matches[1]; |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | public function getClientMayorVersion() |
| 105 | 105 | { |
| 106 | 106 | $clientVersion = $this->getClientVersion(); |
| 107 | - return (int)substr($clientVersion, 0, strpos($clientVersion, '.')); |
|
| 107 | + return (int) substr($clientVersion, 0, strpos($clientVersion, '.')); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | public function getClientVersion() |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | public function getServerMayorVersion() |
| 140 | 140 | { |
| 141 | 141 | preg_match('/\\d+(:?\\.\\d+)+/', $this->getServerVersion(), $matches); |
| 142 | - return (int)substr($matches[0], 0, strpos($matches[0], '.')); |
|
| 142 | + return (int) substr($matches[0], 0, strpos($matches[0], '.')); |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | public function getServerVersion() |