@@ -516,8 +516,7 @@ |
||
| 516 | 516 | if(isset($options['relative-path']) && $options['relative-path'] === true) |
| 517 | 517 | { |
| 518 | 518 | $finder->setPathmodeRelative(); |
| 519 | - } |
|
| 520 | - else if(isset($options['absolute-path']) && $options['absolute-path'] === true) |
|
| 519 | + } else if(isset($options['absolute-path']) && $options['absolute-path'] === true) |
|
| 521 | 520 | { |
| 522 | 521 | $finder->setPathmodeAbsolute(); |
| 523 | 522 | } |
@@ -35,8 +35,7 @@ |
||
| 35 | 35 | try |
| 36 | 36 | { |
| 37 | 37 | return $this->render(); |
| 38 | - } |
|
| 39 | - catch (Throwable $e) |
|
| 38 | + } catch (Throwable $e) |
|
| 40 | 39 | { |
| 41 | 40 | return sprintf( |
| 42 | 41 | 'Exception while rendering [%s]: %s', |
@@ -35,8 +35,7 @@ |
||
| 35 | 35 | try |
| 36 | 36 | { |
| 37 | 37 | return $this->render(); |
| 38 | - } |
|
| 39 | - catch (Throwable $e) |
|
| 38 | + } catch (Throwable $e) |
|
| 40 | 39 | { |
| 41 | 40 | return sprintf( |
| 42 | 41 | 'Exception while rendering [%s]: %s', |
@@ -372,8 +372,7 @@ |
||
| 372 | 372 | if(!in_array($extension, $include, true)) { |
| 373 | 373 | return false; |
| 374 | 374 | } |
| 375 | - } |
|
| 376 | - else if(!empty($exclude) && in_array($extension, $exclude, true)) |
|
| 375 | + } else if(!empty($exclude) && in_array($extension, $exclude, true)) |
|
| 377 | 376 | { |
| 378 | 377 | return false; |
| 379 | 378 | } |
@@ -475,8 +475,7 @@ |
||
| 475 | 475 | try |
| 476 | 476 | { |
| 477 | 477 | $data = json_decode($value, $assoc, 512, JSON_THROW_ON_ERROR); |
| 478 | - } |
|
| 479 | - catch (JsonException $e) |
|
| 478 | + } catch (JsonException $e) |
|
| 480 | 479 | { |
| 481 | 480 | return array(); |
| 482 | 481 | } |
@@ -101,8 +101,7 @@ discard block |
||
| 101 | 101 | 512, |
| 102 | 102 | JSON_THROW_ON_ERROR |
| 103 | 103 | ); |
| 104 | - } |
|
| 105 | - catch (JsonException $e) |
|
| 104 | + } catch (JsonException $e) |
|
| 106 | 105 | { |
| 107 | 106 | throw new FileHelper_Exception( |
| 108 | 107 | 'Cannot decode json data', |
@@ -162,8 +161,7 @@ discard block |
||
| 162 | 161 | $this->putContents($json); |
| 163 | 162 | |
| 164 | 163 | return $this; |
| 165 | - } |
|
| 166 | - catch (JsonException $e) |
|
| 164 | + } catch (JsonException $e) |
|
| 167 | 165 | { |
| 168 | 166 | throw new FileHelper_Exception( |
| 169 | 167 | 'An error occurred while encoding a data set to JSON.', |
@@ -42,8 +42,7 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $info->delete(); |
| 44 | 44 | return true; |
| 45 | - } |
|
| 46 | - catch (FileHelper_Exception $e) |
|
| 45 | + } catch (FileHelper_Exception $e) |
|
| 47 | 46 | { |
| 48 | 47 | // Ignore the exception, since we're returning false instead. |
| 49 | 48 | } |
@@ -78,8 +77,7 @@ discard block |
||
| 78 | 77 | try |
| 79 | 78 | { |
| 80 | 79 | FileHelper::deleteFile($item); |
| 81 | - } |
|
| 82 | - catch (FileHelper_Exception $e) |
|
| 80 | + } catch (FileHelper_Exception $e) |
|
| 83 | 81 | { |
| 84 | 82 | return false; |
| 85 | 83 | } |
@@ -125,8 +123,7 @@ discard block |
||
| 125 | 123 | if ($item->isFolder()) |
| 126 | 124 | { |
| 127 | 125 | self::copy($item, $target . '/' . $item->getName()); |
| 128 | - } |
|
| 129 | - else if($item->isFile()) |
|
| 126 | + } else if($item->isFile()) |
|
| 130 | 127 | { |
| 131 | 128 | $item |
| 132 | 129 | ->requireIsFile() |
@@ -148,14 +148,12 @@ |
||
| 148 | 148 | if ($diff > 0) |
| 149 | 149 | { |
| 150 | 150 | $diff = 1; |
| 151 | - } |
|
| 152 | - else |
|
| 151 | + } else |
|
| 153 | 152 | { |
| 154 | 153 | if ($diff < 0) |
| 155 | 154 | { |
| 156 | 155 | $diff = -1; |
| 157 | - } |
|
| 158 | - else |
|
| 156 | + } else |
|
| 159 | 157 | { |
| 160 | 158 | /* tie-breaker: first listed item wins */ |
| 161 | 159 | $diff = $a->getPosition() - $b->getPosition(); |