@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | if(\strpos($entity, PFC_TESTS_NS) === 0){ |
| 68 | 68 | $path = PFC_TESTS_DIR . \str_replace(str_replace('\\', '/', PFC_TESTS_NS), '', $entityPath) . '.' . PFC_PHP_EXT; |
| 69 | - }else{ |
|
| 69 | + } else{ |
|
| 70 | 70 | $path = PFC_LIB_DIR . $entityPath . '.' . PFC_PHP_EXT; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -110,8 +110,7 @@ |
||
| 110 | 110 | } elseif (unlink($realpath) === false) { |
| 111 | 111 | return false; |
| 112 | 112 | } |
| 113 | - } |
|
| 114 | - else{ |
|
| 113 | + } else{ |
|
| 115 | 114 | return false; |
| 116 | 115 | } |
| 117 | 116 | } |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | break; |
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | - }else{ |
|
| 109 | + } else{ |
|
| 110 | 110 | while (isset($tokens[++$i][1])) { |
| 111 | 111 | if (\in_array($tokens[$i][0], [T_STRING, T_NS_SEPARATOR], true)) { |
| 112 | 112 | $namespace .= $tokens[$i][1]; |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | if($this->getConfig()->isUseStaticItemCaching()){ |
| 68 | 68 | $stat->setData(implode(', ', \array_keys($this->itemInstances))); |
| 69 | - }else{ |
|
| 69 | + } else{ |
|
| 70 | 70 | $stat->setData('No data available since static item caching option (useStaticItemCaching) is disabled.'); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -227,7 +227,7 @@ |
||
| 227 | 227 | $item->expiresAfter(abs((int)$this->getConfig()['defaultTtl'])); |
| 228 | 228 | } |
| 229 | 229 | } |
| 230 | - }else{ |
|
| 230 | + } else{ |
|
| 231 | 231 | $item = $this->itemInstances[$key]; |
| 232 | 232 | } |
| 233 | 233 | |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | try{ |
| 80 | 80 | $content = $this->readFile($file_path); |
| 81 | - }catch (PhpfastcacheIOException $e){ |
|
| 81 | + } catch (PhpfastcacheIOException $e){ |
|
| 82 | 82 | return null; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -24,8 +24,7 @@ discard block |
||
| 24 | 24 | // before we close the session. |
| 25 | 25 | if (isset($_SESSION["lang"])) { |
| 26 | 26 | $session_lang = $_SESSION["lang"]; |
| 27 | - } |
|
| 28 | - else { |
|
| 27 | + } else { |
|
| 29 | 28 | $session_lang = LANG; |
| 30 | 29 | } |
| 31 | 30 | |
@@ -62,8 +61,7 @@ discard block |
||
| 62 | 61 | // Return a HTTP 503 error so the client can act upon this event correctly. |
| 63 | 62 | header('HTTP/1.1 503 Service unavailable'); |
| 64 | 63 | header("X-grommunio-Hresult: " . get_mapi_error_name(WebAppAuthentication::getErrorCode())); |
| 65 | - } |
|
| 66 | - else { |
|
| 64 | + } else { |
|
| 67 | 65 | // The session expired, or the user is otherwise not logged on. |
| 68 | 66 | // Return a HTTP 401 error so the client can act upon this event correctly. |
| 69 | 67 | header('HTTP/1.1 401 Unauthorized'); |
@@ -145,8 +143,7 @@ discard block |
||
| 145 | 143 | // Execute the request |
| 146 | 144 | try { |
| 147 | 145 | $json = $request->execute($json); |
| 148 | - } |
|
| 149 | - catch (Exception $e) { |
|
| 146 | + } catch (Exception $e) { |
|
| 150 | 147 | // invalid requestdata exception |
| 151 | 148 | dump($e); |
| 152 | 149 | } |
@@ -160,8 +157,7 @@ discard block |
||
| 160 | 157 | // Set the correct header and compress the response |
| 161 | 158 | header("Content-Encoding: gzip"); |
| 162 | 159 | echo gzencode($json); |
| 163 | - } |
|
| 164 | - else { |
|
| 160 | + } else { |
|
| 165 | 161 | echo $json; |
| 166 | 162 | } |
| 167 | 163 | |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | case 'form': |
| 61 | 61 | if (isset($_GET['backend'])) { |
| 62 | 62 | $backend = urldecode($_GET["backend"]); |
| 63 | - } |
|
| 64 | - else { |
|
| 63 | + } else { |
|
| 65 | 64 | $backend = ''; |
| 66 | 65 | } |
| 67 | 66 | $backendstore = Files\Backend\BackendStore::getInstance(); |
@@ -47,11 +47,9 @@ discard block |
||
| 47 | 47 | default: |
| 48 | 48 | $this->handleUnknownActionType($actionType); |
| 49 | 49 | } |
| 50 | - } |
|
| 51 | - catch (MAPIException $e) { |
|
| 50 | + } catch (MAPIException $e) { |
|
| 52 | 51 | $this->sendFeedback(false, $this->errorDetailsFromException($e)); |
| 53 | - } |
|
| 54 | - catch (AccountException $e) { |
|
| 52 | + } catch (AccountException $e) { |
|
| 55 | 53 | $this->sendFeedback(false, [ |
| 56 | 54 | 'type' => ERROR_GENERAL, |
| 57 | 55 | 'info' => [ |
@@ -60,8 +58,7 @@ discard block |
||
| 60 | 58 | 'display_message' => $e->getMessage(), |
| 61 | 59 | ], |
| 62 | 60 | ]); |
| 63 | - } |
|
| 64 | - catch (BackendException $e) { |
|
| 61 | + } catch (BackendException $e) { |
|
| 65 | 62 | $this->sendFeedback(false, [ |
| 66 | 63 | 'type' => ERROR_GENERAL, |
| 67 | 64 | 'info' => [ |
@@ -71,8 +68,7 @@ discard block |
||
| 71 | 68 | 'code' => $e->getCode(), |
| 72 | 69 | ], |
| 73 | 70 | ]); |
| 74 | - } |
|
| 75 | - catch (Exception $e) { |
|
| 71 | + } catch (Exception $e) { |
|
| 76 | 72 | $this->sendFeedback(false, [ |
| 77 | 73 | 'type' => ERROR_GENERAL, |
| 78 | 74 | 'info' => [ |
@@ -172,8 +168,7 @@ discard block |
||
| 172 | 168 | } |
| 173 | 169 | |
| 174 | 170 | $this->sendFeedback(true); |
| 175 | - } |
|
| 176 | - else { |
|
| 171 | + } else { |
|
| 177 | 172 | $nodeId = $actionData['folder_id']; |
| 178 | 173 | $relNodeId = substr($nodeId, strpos($nodeId, '/')); |
| 179 | 174 | |
@@ -185,8 +180,7 @@ discard block |
||
| 185 | 180 | |
| 186 | 181 | try { |
| 187 | 182 | $initializedBackend->delete($relNodeId); |
| 188 | - } |
|
| 189 | - catch (\Files\Backend\Exception $e) { |
|
| 183 | + } catch (\Files\Backend\Exception $e) { |
|
| 190 | 184 | // TODO: this might fails because the file was already deleted. |
| 191 | 185 | // fire error message if any other error occurred. |
| 192 | 186 | // Logger::debug(self::LOG_CONTEXT, "deleted a directory that was no longer available"); |