Passed
Push — 1.10.x ( 51b3f0...0b3bd8 )
by Yannick
116:33 queued 61:35
created
main/inc/lib/pear/Text/CAPTCHA/Driver/Numeral.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -241,17 +241,17 @@
 block discarded – undo
241 241
     {
242 242
         $this->_setOperation();
243 243
         switch ($this->_operator) {
244
-        case '+':
245
-            $this->_doAdd();
246
-            break;
247
-        case '-':
248
-            $this->_doSubtract();
249
-            break;
250
-        default:
251
-            $this->_operator = "+";
252
-            $this->_setOperation();
253
-            $this->_doAdd();
254
-            break;
244
+            case '+':
245
+                $this->_doAdd();
246
+                break;
247
+            case '-':
248
+                $this->_doSubtract();
249
+                break;
250
+            default:
251
+                $this->_operator = "+";
252
+                $this->_setOperation();
253
+                $this->_doAdd();
254
+                break;
255 255
         }
256 256
     }
257 257
 
Please login to merge, or discard this patch.
main/inc/lib/pear/Text/Password.php 1 patch
Switch Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
     function create($length = 10, $type = 'pronounceable', $chars = '')
56 56
     {
57 57
         switch ($type) {
58
-        case 'unpronounceable' :
59
-            return Text_Password::_createUnpronounceable($length, $chars);
58
+            case 'unpronounceable' :
59
+                return Text_Password::_createUnpronounceable($length, $chars);
60 60
 
61
-        case 'pronounceable' :
62
-        default :
63
-            return Text_Password::_createPronounceable($length);
61
+            case 'pronounceable' :
62
+            default :
63
+                return Text_Password::_createPronounceable($length);
64 64
         }
65 65
     }
66 66
 
@@ -110,35 +110,35 @@  discard block
 block discarded – undo
110 110
     function createFromLogin($login, $type, $key = 0)
111 111
     {
112 112
         switch ($type) {
113
-        case 'reverse':
114
-            return strrev($login);
113
+            case 'reverse':
114
+                return strrev($login);
115 115
 
116
-        case 'shuffle':
117
-            return Text_Password::_shuffle($login);
116
+            case 'shuffle':
117
+                return Text_Password::_shuffle($login);
118 118
 
119
-        case 'xor':
120
-            return Text_Password::_xor($login, $key);
119
+            case 'xor':
120
+                return Text_Password::_xor($login, $key);
121 121
 
122
-        case 'rot13':
123
-            return str_rot13($login);
122
+            case 'rot13':
123
+                return str_rot13($login);
124 124
 
125
-        case 'rotx':
126
-            return Text_Password::_rotx($login, $key);
125
+            case 'rotx':
126
+                return Text_Password::_rotx($login, $key);
127 127
 
128
-        case 'rotx++':
129
-            return Text_Password::_rotxpp($login, $key);
128
+            case 'rotx++':
129
+                return Text_Password::_rotxpp($login, $key);
130 130
 
131
-        case 'rotx--':
132
-            return Text_Password::_rotxmm($login, $key);
131
+            case 'rotx--':
132
+                return Text_Password::_rotxmm($login, $key);
133 133
 
134
-        case 'ascii_rotx':
135
-            return Text_Password::_asciiRotx($login, $key);
134
+            case 'ascii_rotx':
135
+                return Text_Password::_asciiRotx($login, $key);
136 136
 
137
-        case 'ascii_rotx++':
138
-            return Text_Password::_asciiRotxpp($login, $key);
137
+            case 'ascii_rotx++':
138
+                return Text_Password::_asciiRotxpp($login, $key);
139 139
 
140
-        case 'ascii_rotx--':
141
-            return Text_Password::_asciiRotxmm($login, $key);
140
+            case 'ascii_rotx--':
141
+                return Text_Password::_asciiRotxmm($login, $key);
142 142
         }
143 143
     }
144 144
 
@@ -320,11 +320,11 @@  discard block
 block discarded – undo
320 320
                 $next += 255;
321 321
             }
322 322
             switch ($next) { // delete white space
323
-            case 0x09:
324
-            case 0x20:
325
-            case 0x0A:
326
-            case 0x0D:
327
-                $next++;
323
+                case 0x09:
324
+                case 0x20:
325
+                case 0x0A:
326
+                case 0x0D:
327
+                    $next++;
328 328
             }
329 329
             $tmp .= chr($next);
330 330
         }
@@ -354,11 +354,11 @@  discard block
 block discarded – undo
354 354
                 $next += 255;
355 355
             }
356 356
             switch ($next) { // delete white space
357
-            case 0x09:
358
-            case 0x20:
359
-            case 0x0A:
360
-            case 0x0D:
361
-                $next++;
357
+                case 0x09:
358
+                case 0x20:
359
+                case 0x0A:
360
+                case 0x0D:
361
+                    $next++;
362 362
             }
363 363
             $tmp .= chr($next);
364 364
         }
@@ -388,11 +388,11 @@  discard block
 block discarded – undo
388 388
                 $next += 255;
389 389
             }
390 390
             switch ($next) { // delete white space
391
-            case 0x09:
392
-            case 0x20:
393
-            case 0x0A:
394
-            case 0x0D:
395
-                $next++;
391
+                case 0x09:
392
+                case 0x20:
393
+                case 0x0A:
394
+                case 0x0D:
395
+                    $next++;
396 396
             }
397 397
             $tmp .= chr($next);
398 398
         }
@@ -486,34 +486,34 @@  discard block
 block discarded – undo
486 486
          */
487 487
          switch($chars) {
488 488
 
489
-         case 'alphanumeric':
490
-             $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
491
-             $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 62;
492
-             break;
489
+             case 'alphanumeric':
490
+                 $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
491
+                 $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 62;
492
+                 break;
493 493
 
494
-         case 'alphabetical':
495
-             $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
496
-             $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 52;
497
-             break;
494
+             case 'alphabetical':
495
+                 $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
496
+                 $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 52;
497
+                 break;
498 498
 
499
-         case 'numeric':
500
-             $chars = '0123456789';
501
-             $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 10;
502
-             break;
499
+             case 'numeric':
500
+                 $chars = '0123456789';
501
+                 $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 10;
502
+                 break;
503 503
 
504
-         case '':
505
-             $chars = '_#@%&ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
506
-             $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 67;
507
-             break;
504
+             case '':
505
+                 $chars = '_#@%&ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
506
+                 $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 67;
507
+                 break;
508 508
 
509
-         default:
510
-             /**
509
+             default:
510
+                 /**
511 511
               * Some characters shouldn't be used
512 512
               */
513
-             $chars = trim($chars);
514
-             $chars = str_replace(array('+', '|', '$', '^', '/', '\\', ','), '', $chars);
513
+                 $chars = trim($chars);
514
+                 $chars = str_replace(array('+', '|', '$', '^', '/', '\\', ','), '', $chars);
515 515
 
516
-             $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = strlen($chars);
516
+                 $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = strlen($chars);
517 517
          }
518 518
 
519 519
          /**
Please login to merge, or discard this patch.
main/inc/lib/pear/Text/Diff/Renderer.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -149,21 +149,21 @@
 block discarded – undo
149 149
 
150 150
         foreach ($edits as $edit) {
151 151
             switch (strtolower(get_class($edit))) {
152
-            case 'text_diff_op_copy':
153
-                $output .= $this->_context($edit->orig);
154
-                break;
152
+                case 'text_diff_op_copy':
153
+                    $output .= $this->_context($edit->orig);
154
+                    break;
155 155
 
156
-            case 'text_diff_op_add':
157
-                $output .= $this->_added($edit->final);
158
-                break;
156
+                case 'text_diff_op_add':
157
+                    $output .= $this->_added($edit->final);
158
+                    break;
159 159
 
160
-            case 'text_diff_op_delete':
161
-                $output .= $this->_deleted($edit->orig);
162
-                break;
160
+                case 'text_diff_op_delete':
161
+                    $output .= $this->_deleted($edit->orig);
162
+                    break;
163 163
 
164
-            case 'text_diff_op_change':
165
-                $output .= $this->_changed($edit->orig, $edit->final);
166
-                break;
164
+                case 'text_diff_op_change':
165
+                    $output .= $this->_changed($edit->orig, $edit->final);
166
+                    break;
167 167
             }
168 168
         }
169 169
 
Please login to merge, or discard this patch.
main/inc/lib/pear/Text/Diff/Engine/xdiff.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -46,17 +46,17 @@
 block discarded – undo
46 46
                 continue;
47 47
             }
48 48
             switch ($line[0]) {
49
-            case ' ':
50
-                $edits[] = &new Text_Diff_Op_copy(array(substr($line, 1)));
51
-                break;
49
+                case ' ':
50
+                    $edits[] = &new Text_Diff_Op_copy(array(substr($line, 1)));
51
+                    break;
52 52
 
53
-            case '+':
54
-                $edits[] = &new Text_Diff_Op_add(array(substr($line, 1)));
55
-                break;
53
+                case '+':
54
+                    $edits[] = &new Text_Diff_Op_add(array(substr($line, 1)));
55
+                    break;
56 56
 
57
-            case '-':
58
-                $edits[] = &new Text_Diff_Op_delete(array(substr($line, 1)));
59
-                break;
57
+                case '-':
58
+                    $edits[] = &new Text_Diff_Op_delete(array(substr($line, 1)));
59
+                    break;
60 60
             }
61 61
         }
62 62
 
Please login to merge, or discard this patch.
main/inc/lib/pear/Text/Diff/Engine/shell.php 1 patch
Switch Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -93,29 +93,29 @@
 block discarded – undo
93 93
             }
94 94
 
95 95
             switch ($match[3]) {
96
-            case 'd':
97
-                // deleted lines
98
-                array_push($edits,
99
-                    new Text_Diff_Op_delete(
100
-                        $this->_getLines($from_lines, $from_line_no, $match[2])));
101
-                $to_line_no++;
102
-                break;
103
-
104
-            case 'c':
105
-                // changed lines
106
-                array_push($edits,
107
-                    new Text_Diff_Op_change(
108
-                        $this->_getLines($from_lines, $from_line_no, $match[2]),
109
-                        $this->_getLines($to_lines, $to_line_no, $match[5])));
110
-                break;
111
-
112
-            case 'a':
113
-                // added lines
114
-                array_push($edits,
115
-                    new Text_Diff_Op_add(
116
-                        $this->_getLines($to_lines, $to_line_no, $match[5])));
117
-                $from_line_no++;
118
-                break;
96
+                case 'd':
97
+                    // deleted lines
98
+                    array_push($edits,
99
+                        new Text_Diff_Op_delete(
100
+                            $this->_getLines($from_lines, $from_line_no, $match[2])));
101
+                    $to_line_no++;
102
+                    break;
103
+
104
+                case 'c':
105
+                    // changed lines
106
+                    array_push($edits,
107
+                        new Text_Diff_Op_change(
108
+                            $this->_getLines($from_lines, $from_line_no, $match[2]),
109
+                            $this->_getLines($to_lines, $to_line_no, $match[5])));
110
+                    break;
111
+
112
+                case 'a':
113
+                    // added lines
114
+                    array_push($edits,
115
+                        new Text_Diff_Op_add(
116
+                            $this->_getLines($to_lines, $to_line_no, $match[5])));
117
+                    $from_line_no++;
118
+                    break;
119 119
             }
120 120
         }
121 121
 
Please login to merge, or discard this patch.
main/inc/lib/pear/Image/Text.php 1 patch
Switch Indentation   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -346,19 +346,19 @@  discard block
 block discarded – undo
346 346
         }
347 347
         foreach ($option as $opt => $val) {
348 348
             switch ($opt) {
349
-            case 'color':
350
-                $this->setColors($val);
351
-                break;
352
-            case 'text':
353
-                if (is_array($val)) {
354
-                    $this->_text = implode('\n', $val);
355
-                } else {
356
-                    $this->_text = $val;
357
-                }
358
-                break;
359
-            default:
360
-                $this->_options[$opt] = $val;
361
-                break;
349
+                case 'color':
350
+                    $this->setColors($val);
351
+                    break;
352
+                case 'text':
353
+                    if (is_array($val)) {
354
+                        $this->_text = implode('\n', $val);
355
+                    } else {
356
+                        $this->_text = $val;
357
+                    }
358
+                    break;
359
+                default:
360
+                    $this->_options[$opt] = $val;
361
+                    break;
362 362
             }
363 363
             if (isset($reInits[$opt])) {
364 364
                 $this->_init = false;
@@ -511,45 +511,45 @@  discard block
 block discarded – undo
511 511
         $image_canvas = false;
512 512
         switch (true) {
513 513
 
514
-        case (empty($this->_options['canvas'])):
515
-            // Create new image from width && height of the clipping
516
-            $this->_img = imagecreatetruecolor(
517
-                $this->_options['width'], $this->_options['height']
518
-            );
519
-            if (!$this->_img) {
520
-                throw new Image_Text_Exception('Could not create image canvas.');
521
-            }
522
-            break;
514
+            case (empty($this->_options['canvas'])):
515
+                // Create new image from width && height of the clipping
516
+                $this->_img = imagecreatetruecolor(
517
+                    $this->_options['width'], $this->_options['height']
518
+                );
519
+                if (!$this->_img) {
520
+                    throw new Image_Text_Exception('Could not create image canvas.');
521
+                }
522
+                break;
523 523
 
524
-        case (is_resource($this->_options['canvas']) &&
525
-            get_resource_type($this->_options['canvas']) == 'gd'):
526
-            // The canvas is an image resource
527
-            $image_canvas = true;
528
-            $this->_img = $this->_options['canvas'];
529
-            break;
524
+            case (is_resource($this->_options['canvas']) &&
525
+                get_resource_type($this->_options['canvas']) == 'gd'):
526
+                // The canvas is an image resource
527
+                $image_canvas = true;
528
+                $this->_img = $this->_options['canvas'];
529
+                break;
530 530
 
531
-        case (is_array($this->_options['canvas']) &&
532
-            isset($this->_options['canvas']['width']) &&
533
-            isset($this->_options['canvas']['height'])):
531
+            case (is_array($this->_options['canvas']) &&
532
+                isset($this->_options['canvas']['width']) &&
533
+                isset($this->_options['canvas']['height'])):
534 534
 
535
-            // Canvas must be a width and height measure
536
-            $this->_img = imagecreatetruecolor(
537
-                $this->_options['canvas']['width'],
538
-                $this->_options['canvas']['height']
539
-            );
540
-            break;
535
+                // Canvas must be a width and height measure
536
+                $this->_img = imagecreatetruecolor(
537
+                    $this->_options['canvas']['width'],
538
+                    $this->_options['canvas']['height']
539
+                );
540
+                break;
541 541
 
542
-        case (is_array($this->_options['canvas']) &&
543
-            isset($this->_options['canvas']['size']) &&
544
-            ($this->_options['canvas']['size'] = 'auto')):
542
+            case (is_array($this->_options['canvas']) &&
543
+                isset($this->_options['canvas']['size']) &&
544
+                ($this->_options['canvas']['size'] = 'auto')):
545 545
 
546
-        case (is_string($this->_options['canvas']) &&
547
-            ($this->_options['canvas'] = 'auto')):
548
-            $this->_mode = 'auto';
549
-            break;
546
+            case (is_string($this->_options['canvas']) &&
547
+                ($this->_options['canvas'] = 'auto')):
548
+                $this->_mode = 'auto';
549
+                break;
550 550
 
551
-        default:
552
-            throw new Image_Text_Exception('Could not create image canvas.');
551
+            default:
552
+                throw new Image_Text_Exception('Could not create image canvas.');
553 553
         }
554 554
 
555 555
         if ($this->_img) {
@@ -889,19 +889,19 @@  discard block
 block discarded – undo
889 889
         $cosR = cos($radians);
890 890
 
891 891
         switch ($this->_options['valign']) {
892
-        case self::IMAGE_TEXT_ALIGN_TOP:
893
-            $valign_space = 0;
894
-            break;
895
-        case self::IMAGE_TEXT_ALIGN_MIDDLE:
896
-            $valign_space = ($this->_options['height']
897
-                    - $this->_realTextSize['height']) / 2;
898
-            break;
899
-        case self::IMAGE_TEXT_ALIGN_BOTTOM:
900
-            $valign_space = $this->_options['height']
901
-                - $this->_realTextSize['height'];
902
-            break;
903
-        default:
904
-            $valign_space = 0;
892
+            case self::IMAGE_TEXT_ALIGN_TOP:
893
+                $valign_space = 0;
894
+                break;
895
+            case self::IMAGE_TEXT_ALIGN_MIDDLE:
896
+                $valign_space = ($this->_options['height']
897
+                        - $this->_realTextSize['height']) / 2;
898
+                break;
899
+            case self::IMAGE_TEXT_ALIGN_BOTTOM:
900
+                $valign_space = $this->_options['height']
901
+                    - $this->_realTextSize['height'];
902
+                break;
903
+            default:
904
+                $valign_space = 0;
905 905
         }
906 906
 
907 907
         $space = (1 + $line_spacing) * $size;
@@ -932,18 +932,18 @@  discard block
 block discarded – undo
932 932
             // Calc the position using the block width, the current line width and
933 933
             // obviously the angle. That gives us the offset to slide the line.
934 934
             switch ($align) {
935
-            case self::IMAGE_TEXT_ALIGN_LEFT:
936
-                $hyp = 0;
937
-                break;
938
-            case self::IMAGE_TEXT_ALIGN_RIGHT:
939
-                $hyp = $block_width - $line_width - $left_margin;
940
-                break;
941
-            case self::IMAGE_TEXT_ALIGN_CENTER:
942
-                $hyp = ($block_width - $line_width) / 2 - $left_margin;
943
-                break;
944
-            default:
945
-                $hyp = 0;
946
-                break;
935
+                case self::IMAGE_TEXT_ALIGN_LEFT:
936
+                    $hyp = 0;
937
+                    break;
938
+                case self::IMAGE_TEXT_ALIGN_RIGHT:
939
+                    $hyp = $block_width - $line_width - $left_margin;
940
+                    break;
941
+                case self::IMAGE_TEXT_ALIGN_CENTER:
942
+                    $hyp = ($block_width - $line_width) / 2 - $left_margin;
943
+                    break;
944
+                default:
945
+                    $hyp = 0;
946
+                    break;
947 947
             }
948 948
 
949 949
             $posx = $new_posx + $cosR * $hyp;
@@ -997,17 +997,17 @@  discard block
 block discarded – undo
997 997
             throw new Image_Text_Exception('Header already sent.');
998 998
         }
999 999
         switch ($this->_options['image_type']) {
1000
-        case IMAGETYPE_PNG:
1001
-            $imgout = 'imagepng';
1002
-            break;
1003
-        case IMAGETYPE_JPEG:
1004
-            $imgout = 'imagejpeg';
1005
-            break;
1006
-        case IMAGETYPE_BMP:
1007
-            $imgout = 'imagebmp';
1008
-            break;
1009
-        default:
1010
-            throw new Image_Text_Exception('Unsupported image type.');
1000
+            case IMAGETYPE_PNG:
1001
+                $imgout = 'imagepng';
1002
+                break;
1003
+            case IMAGETYPE_JPEG:
1004
+                $imgout = 'imagejpeg';
1005
+                break;
1006
+            case IMAGETYPE_BMP:
1007
+                $imgout = 'imagebmp';
1008
+                break;
1009
+            default:
1010
+                throw new Image_Text_Exception('Unsupported image type.');
1011 1011
         }
1012 1012
         if ($save) {
1013 1013
             $imgout($this->_img);
@@ -1048,18 +1048,18 @@  discard block
 block discarded – undo
1048 1048
         }
1049 1049
 
1050 1050
         switch ($this->_options['image_type']) {
1051
-        case IMAGETYPE_PNG:
1052
-            $imgout = 'imagepng';
1053
-            break;
1054
-        case IMAGETYPE_JPEG:
1055
-            $imgout = 'imagejpeg';
1056
-            break;
1057
-        case IMAGETYPE_BMP:
1058
-            $imgout = 'imagebmp';
1059
-            break;
1060
-        default:
1061
-            throw new Image_Text_Exception('Unsupported image type.');
1062
-            break;
1051
+            case IMAGETYPE_PNG:
1052
+                $imgout = 'imagepng';
1053
+                break;
1054
+            case IMAGETYPE_JPEG:
1055
+                $imgout = 'imagejpeg';
1056
+                break;
1057
+            case IMAGETYPE_BMP:
1058
+                $imgout = 'imagebmp';
1059
+                break;
1060
+            default:
1061
+                throw new Image_Text_Exception('Unsupported image type.');
1062
+                break;
1063 1063
         }
1064 1064
 
1065 1065
         $res = $imgout($this->_img, $destFile);
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/pdf/dompdf.php 1 patch
Switch Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -104,61 +104,61 @@
 block discarded – undo
104 104
 
105 105
     switch ($_SERVER["argv"][$i]) {
106 106
 
107
-    case "--help":
108
-    case "-h":
109
-      $opts["h"] = true;
110
-      $i++;
111
-      break;
112
-
113
-    case "-l":
114
-      $opts["l"] = true;
115
-      $i++;
116
-      break;
117
-
118
-    case "-p":
119
-      if ( !isset($_SERVER["argv"][$i+1]) )
120
-        die("-p switch requires a size parameter\n");
121
-      $opts["p"] = $_SERVER["argv"][$i+1];
122
-      $i += 2;
123
-      break;
124
-
125
-    case "-o":
126
-      if ( !isset($_SERVER["argv"][$i+1]) )
127
-        die("-o switch requires an orientation parameter\n");
128
-      $opts["o"] = $_SERVER["argv"][$i+1];
129
-      $i += 2;
130
-      break;
131
-
132
-    case "-b":
133
-      if ( !isset($_SERVER["argv"][$i+1]) )
134
-        die("-b switch requires a path parameter\n");
135
-      $opts["b"] = $_SERVER["argv"][$i+1];
136
-      $i += 2;
137
-      break;
138
-
139
-    case "-f":
140
-      if ( !isset($_SERVER["argv"][$i+1]) )
141
-        die("-f switch requires a filename parameter\n");
142
-      $opts["f"] = $_SERVER["argv"][$i+1];
143
-      $i += 2;
144
-      break;
145
-
146
-    case "-v":
147
-      $opts["v"] = true;
148
-      $i++;
149
-      break;
150
-
151
-    case "-d":
152
-      $opts["d"] = true;
153
-      $i++;
154
-      break;
155
-
156
-    case "-t":
157
-      if ( !isset($_SERVER['argv'][$i + 1]) )
158
-        die("-t switch requires a comma separated list of types\n");
159
-      $opts["t"] = $_SERVER['argv'][$i+1];
160
-      $i += 2;
161
-      break;
107
+        case "--help":
108
+        case "-h":
109
+          $opts["h"] = true;
110
+          $i++;
111
+          break;
112
+
113
+        case "-l":
114
+          $opts["l"] = true;
115
+          $i++;
116
+          break;
117
+
118
+        case "-p":
119
+          if ( !isset($_SERVER["argv"][$i+1]) )
120
+            die("-p switch requires a size parameter\n");
121
+          $opts["p"] = $_SERVER["argv"][$i+1];
122
+          $i += 2;
123
+          break;
124
+
125
+        case "-o":
126
+          if ( !isset($_SERVER["argv"][$i+1]) )
127
+            die("-o switch requires an orientation parameter\n");
128
+          $opts["o"] = $_SERVER["argv"][$i+1];
129
+          $i += 2;
130
+          break;
131
+
132
+        case "-b":
133
+          if ( !isset($_SERVER["argv"][$i+1]) )
134
+            die("-b switch requires a path parameter\n");
135
+          $opts["b"] = $_SERVER["argv"][$i+1];
136
+          $i += 2;
137
+          break;
138
+
139
+        case "-f":
140
+          if ( !isset($_SERVER["argv"][$i+1]) )
141
+            die("-f switch requires a filename parameter\n");
142
+          $opts["f"] = $_SERVER["argv"][$i+1];
143
+          $i += 2;
144
+          break;
145
+
146
+        case "-v":
147
+          $opts["v"] = true;
148
+          $i++;
149
+          break;
150
+
151
+        case "-d":
152
+          $opts["d"] = true;
153
+          $i++;
154
+          break;
155
+
156
+        case "-t":
157
+          if ( !isset($_SERVER['argv'][$i + 1]) )
158
+            die("-t switch requires a comma separated list of types\n");
159
+          $opts["t"] = $_SERVER['argv'][$i+1];
160
+          $i += 2;
161
+          break;
162 162
 
163 163
    default:
164 164
       $opts["filename"] = $_SERVER["argv"][$i];
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/pdf/include/gd_adapter.cls.php 1 patch
Switch Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -489,21 +489,21 @@  discard block
 block discarded – undo
489 489
   function image($img_url, $img_type, $x, $y, $w, $h) {
490 490
 
491 491
     switch ($img_type) {
492
-    case "png":
493
-      $src = @imagecreatefrompng($img_url);
494
-      break;
492
+        case "png":
493
+          $src = @imagecreatefrompng($img_url);
494
+          break;
495 495
       
496
-    case "gif":
497
-      $src = @imagecreatefromgif($img_url);
498
-      break;
496
+        case "gif":
497
+          $src = @imagecreatefromgif($img_url);
498
+          break;
499 499
       
500
-    case "jpg":
501
-    case "jpeg":
502
-      $src = @imagecreatefromjpeg($img_url);
503
-      break;
500
+        case "jpg":
501
+        case "jpeg":
502
+          $src = @imagecreatefromjpeg($img_url);
503
+          break;
504 504
 
505
-    default:
506
-      break;
505
+        default:
506
+          break;
507 507
       
508 508
     }
509 509
 
@@ -658,20 +658,20 @@  discard block
 block discarded – undo
658 658
     
659 659
     switch ($type) {
660 660
 
661
-    case "jpg":
662
-    case "jpeg":
663
-      if ( !isset($options["quality"]) )
664
-        $options["quality"] = 75;
661
+        case "jpg":
662
+        case "jpeg":
663
+          if ( !isset($options["quality"]) )
664
+            $options["quality"] = 75;
665 665
       
666
-      header("Content-type: image/jpeg");
667
-      imagejpeg($dst, '', $options["quality"]);
668
-      break;
669
-
670
-    case "png":
671
-    default:
672
-      header("Content-type: image/png");
673
-      imagepng($dst);
674
-      break;
666
+          header("Content-type: image/jpeg");
667
+          imagejpeg($dst, '', $options["quality"]);
668
+          break;
669
+
670
+        case "png":
671
+        default:
672
+          header("Content-type: image/png");
673
+          imagepng($dst);
674
+          break;
675 675
     }
676 676
 
677 677
     if ( $this->_aa_factor != 1 ) 
@@ -706,18 +706,18 @@  discard block
 block discarded – undo
706 706
 
707 707
     switch ($type) {
708 708
 
709
-    case "jpg":
710
-    case "jpeg":
711
-      if ( !isset($options["quality"]) )
712
-        $options["quality"] = 75;
709
+        case "jpg":
710
+        case "jpeg":
711
+          if ( !isset($options["quality"]) )
712
+            $options["quality"] = 75;
713 713
       
714
-      imagejpeg($dst, '', $options["quality"]);
715
-      break;
714
+          imagejpeg($dst, '', $options["quality"]);
715
+          break;
716 716
 
717
-    case "png":
718
-    default:
719
-      imagepng($dst);
720
-      break;
717
+        case "png":
718
+        default:
719
+          imagepng($dst);
720
+          break;
721 721
     }
722 722
 
723 723
     $image = ob_get_contents();
Please login to merge, or discard this patch.
main/inc/lib/phpdocx/pdf/include/attribute_translator.cls.php 1 patch
Switch Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -345,29 +345,29 @@  discard block
 block discarded – undo
345 345
   static protected function _set_table_rules($node, $value) {
346 346
     $new_style = "; border-collapse: collapse;";
347 347
     switch ($value) {
348
-    case "none":
349
-      $new_style .= "border-style: none;";
350
-      break;
348
+        case "none":
349
+          $new_style .= "border-style: none;";
350
+          break;
351 351
 
352
-    case "groups":
353
-      // FIXME: unsupported
354
-      return;
352
+        case "groups":
353
+          // FIXME: unsupported
354
+          return;
355 355
 
356
-    case "rows":
357
-      $new_style .= "border-style: solid none solid none; border-width: 1px; ";
358
-      break;
356
+        case "rows":
357
+          $new_style .= "border-style: solid none solid none; border-width: 1px; ";
358
+          break;
359 359
 
360
-    case "cols":
361
-      $new_style .= "border-style: none solid none solid; border-width: 1px; ";
362
-      break;
360
+        case "cols":
361
+          $new_style .= "border-style: none solid none solid; border-width: 1px; ";
362
+          break;
363 363
 
364
-    case "all":
365
-      $new_style .= "border-style: solid; border-width: 1px; ";
366
-      break;
364
+        case "all":
365
+          $new_style .= "border-style: solid; border-width: 1px; ";
366
+          break;
367 367
       
368
-    default:
369
-      // Invalid value
370
-      return null;
368
+        default:
369
+          // Invalid value
370
+          return null;
371 371
     }
372 372
 
373 373
     $td_list = $node->getElementsByTagName("td");
@@ -390,20 +390,20 @@  discard block
 block discarded – undo
390 390
     $remainder = 100 - (double)rtrim($width, "% ");
391 391
     
392 392
     switch ($value) {
393
-    case "left":
394
-      $style .= "; margin-right: $remainder %;";
395
-      break;
393
+        case "left":
394
+          $style .= "; margin-right: $remainder %;";
395
+          break;
396 396
 
397
-    case "right":
398
-      $style .= "; margin-left: $remainder %;";
399
-      break;
397
+        case "right":
398
+          $style .= "; margin-left: $remainder %;";
399
+          break;
400 400
 
401
-    case "center":
402
-      $style .= "; margin-left: auto; margin-right: auto;";
403
-      break;
401
+        case "center":
402
+          $style .= "; margin-left: auto; margin-right: auto;";
403
+          break;
404 404
 
405
-    default:
406
-      return null;
405
+        default:
406
+          return null;
407 407
     }
408 408
     return ltrim($style, "; ");
409 409
     
Please login to merge, or discard this patch.