@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | */ |
69 | 69 | function getimagesize(string $filename, array &$imageinfo = null): array |
70 | 70 | { |
71 | - error_clear_last(); |
|
72 | - $result = \getimagesize($filename, $imageinfo); |
|
73 | - if ($result === false) { |
|
74 | - throw ImageException::createFromPhpError(); |
|
75 | - } |
|
76 | - return $result; |
|
71 | + error_clear_last(); |
|
72 | + $result = \getimagesize($filename, $imageinfo); |
|
73 | + if ($result === false) { |
|
74 | + throw ImageException::createFromPhpError(); |
|
75 | + } |
|
76 | + return $result; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | |
@@ -93,17 +93,17 @@ discard block |
||
93 | 93 | */ |
94 | 94 | function image2wbmp($image, ?string $filename = null, int $foreground = null): void |
95 | 95 | { |
96 | - error_clear_last(); |
|
97 | - if ($foreground !== null) { |
|
98 | - $result = \image2wbmp($image, $filename, $foreground); |
|
99 | - } elseif ($filename !== null) { |
|
100 | - $result = \image2wbmp($image, $filename); |
|
101 | - } else { |
|
102 | - $result = \image2wbmp($image); |
|
103 | - } |
|
104 | - if ($result === false) { |
|
105 | - throw ImageException::createFromPhpError(); |
|
106 | - } |
|
96 | + error_clear_last(); |
|
97 | + if ($foreground !== null) { |
|
98 | + $result = \image2wbmp($image, $filename, $foreground); |
|
99 | + } elseif ($filename !== null) { |
|
100 | + $result = \image2wbmp($image, $filename); |
|
101 | + } else { |
|
102 | + $result = \image2wbmp($image); |
|
103 | + } |
|
104 | + if ($result === false) { |
|
105 | + throw ImageException::createFromPhpError(); |
|
106 | + } |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | |
@@ -120,16 +120,16 @@ discard block |
||
120 | 120 | */ |
121 | 121 | function imageaffine($image, array $affine, array $clip = null) |
122 | 122 | { |
123 | - error_clear_last(); |
|
124 | - if ($clip !== null) { |
|
125 | - $result = \imageaffine($image, $affine, $clip); |
|
126 | - } else { |
|
127 | - $result = \imageaffine($image, $affine); |
|
128 | - } |
|
129 | - if ($result === false) { |
|
130 | - throw ImageException::createFromPhpError(); |
|
131 | - } |
|
132 | - return $result; |
|
123 | + error_clear_last(); |
|
124 | + if ($clip !== null) { |
|
125 | + $result = \imageaffine($image, $affine, $clip); |
|
126 | + } else { |
|
127 | + $result = \imageaffine($image, $affine); |
|
128 | + } |
|
129 | + if ($result === false) { |
|
130 | + throw ImageException::createFromPhpError(); |
|
131 | + } |
|
132 | + return $result; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | |
@@ -149,12 +149,12 @@ discard block |
||
149 | 149 | */ |
150 | 150 | function imageaffinematrixconcat(array $m1, array $m2): array |
151 | 151 | { |
152 | - error_clear_last(); |
|
153 | - $result = \imageaffinematrixconcat($m1, $m2); |
|
154 | - if ($result === false) { |
|
155 | - throw ImageException::createFromPhpError(); |
|
156 | - } |
|
157 | - return $result; |
|
152 | + error_clear_last(); |
|
153 | + $result = \imageaffinematrixconcat($m1, $m2); |
|
154 | + if ($result === false) { |
|
155 | + throw ImageException::createFromPhpError(); |
|
156 | + } |
|
157 | + return $result; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | |
@@ -177,16 +177,16 @@ discard block |
||
177 | 177 | */ |
178 | 178 | function imageaffinematrixget(int $type, $options = null): array |
179 | 179 | { |
180 | - error_clear_last(); |
|
181 | - if ($options !== null) { |
|
182 | - $result = \imageaffinematrixget($type, $options); |
|
183 | - } else { |
|
184 | - $result = \imageaffinematrixget($type); |
|
185 | - } |
|
186 | - if ($result === false) { |
|
187 | - throw ImageException::createFromPhpError(); |
|
188 | - } |
|
189 | - return $result; |
|
180 | + error_clear_last(); |
|
181 | + if ($options !== null) { |
|
182 | + $result = \imageaffinematrixget($type, $options); |
|
183 | + } else { |
|
184 | + $result = \imageaffinematrixget($type); |
|
185 | + } |
|
186 | + if ($result === false) { |
|
187 | + throw ImageException::createFromPhpError(); |
|
188 | + } |
|
189 | + return $result; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | |
@@ -211,11 +211,11 @@ discard block |
||
211 | 211 | */ |
212 | 212 | function imagealphablending($image, bool $blendmode): void |
213 | 213 | { |
214 | - error_clear_last(); |
|
215 | - $result = \imagealphablending($image, $blendmode); |
|
216 | - if ($result === false) { |
|
217 | - throw ImageException::createFromPhpError(); |
|
218 | - } |
|
214 | + error_clear_last(); |
|
215 | + $result = \imagealphablending($image, $blendmode); |
|
216 | + if ($result === false) { |
|
217 | + throw ImageException::createFromPhpError(); |
|
218 | + } |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | |
@@ -239,11 +239,11 @@ discard block |
||
239 | 239 | */ |
240 | 240 | function imageantialias($image, bool $enabled): void |
241 | 241 | { |
242 | - error_clear_last(); |
|
243 | - $result = \imageantialias($image, $enabled); |
|
244 | - if ($result === false) { |
|
245 | - throw ImageException::createFromPhpError(); |
|
246 | - } |
|
242 | + error_clear_last(); |
|
243 | + $result = \imageantialias($image, $enabled); |
|
244 | + if ($result === false) { |
|
245 | + throw ImageException::createFromPhpError(); |
|
246 | + } |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | |
@@ -267,11 +267,11 @@ discard block |
||
267 | 267 | */ |
268 | 268 | function imagearc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color): void |
269 | 269 | { |
270 | - error_clear_last(); |
|
271 | - $result = \imagearc($image, $cx, $cy, $width, $height, $start, $end, $color); |
|
272 | - if ($result === false) { |
|
273 | - throw ImageException::createFromPhpError(); |
|
274 | - } |
|
270 | + error_clear_last(); |
|
271 | + $result = \imagearc($image, $cx, $cy, $width, $height, $start, $end, $color); |
|
272 | + if ($result === false) { |
|
273 | + throw ImageException::createFromPhpError(); |
|
274 | + } |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | |
@@ -290,11 +290,11 @@ discard block |
||
290 | 290 | */ |
291 | 291 | function imagebmp($image, $to = null, bool $compressed = true): void |
292 | 292 | { |
293 | - error_clear_last(); |
|
294 | - $result = \imagebmp($image, $to, $compressed); |
|
295 | - if ($result === false) { |
|
296 | - throw ImageException::createFromPhpError(); |
|
297 | - } |
|
293 | + error_clear_last(); |
|
294 | + $result = \imagebmp($image, $to, $compressed); |
|
295 | + if ($result === false) { |
|
296 | + throw ImageException::createFromPhpError(); |
|
297 | + } |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | |
@@ -319,11 +319,11 @@ discard block |
||
319 | 319 | */ |
320 | 320 | function imagechar($image, int $font, int $x, int $y, string $c, int $color): void |
321 | 321 | { |
322 | - error_clear_last(); |
|
323 | - $result = \imagechar($image, $font, $x, $y, $c, $color); |
|
324 | - if ($result === false) { |
|
325 | - throw ImageException::createFromPhpError(); |
|
326 | - } |
|
322 | + error_clear_last(); |
|
323 | + $result = \imagechar($image, $font, $x, $y, $c, $color); |
|
324 | + if ($result === false) { |
|
325 | + throw ImageException::createFromPhpError(); |
|
326 | + } |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | |
@@ -345,11 +345,11 @@ discard block |
||
345 | 345 | */ |
346 | 346 | function imagecharup($image, int $font, int $x, int $y, string $c, int $color): void |
347 | 347 | { |
348 | - error_clear_last(); |
|
349 | - $result = \imagecharup($image, $font, $x, $y, $c, $color); |
|
350 | - if ($result === false) { |
|
351 | - throw ImageException::createFromPhpError(); |
|
352 | - } |
|
348 | + error_clear_last(); |
|
349 | + $result = \imagecharup($image, $font, $x, $y, $c, $color); |
|
350 | + if ($result === false) { |
|
351 | + throw ImageException::createFromPhpError(); |
|
352 | + } |
|
353 | 353 | } |
354 | 354 | |
355 | 355 | |
@@ -372,12 +372,12 @@ discard block |
||
372 | 372 | */ |
373 | 373 | function imagecolorat($image, int $x, int $y): int |
374 | 374 | { |
375 | - error_clear_last(); |
|
376 | - $result = \imagecolorat($image, $x, $y); |
|
377 | - if ($result === false) { |
|
378 | - throw ImageException::createFromPhpError(); |
|
379 | - } |
|
380 | - return $result; |
|
375 | + error_clear_last(); |
|
376 | + $result = \imagecolorat($image, $x, $y); |
|
377 | + if ($result === false) { |
|
378 | + throw ImageException::createFromPhpError(); |
|
379 | + } |
|
380 | + return $result; |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | |
@@ -394,11 +394,11 @@ discard block |
||
394 | 394 | */ |
395 | 395 | function imagecolordeallocate($image, int $color): void |
396 | 396 | { |
397 | - error_clear_last(); |
|
398 | - $result = \imagecolordeallocate($image, $color); |
|
399 | - if ($result === false) { |
|
400 | - throw ImageException::createFromPhpError(); |
|
401 | - } |
|
397 | + error_clear_last(); |
|
398 | + $result = \imagecolordeallocate($image, $color); |
|
399 | + if ($result === false) { |
|
400 | + throw ImageException::createFromPhpError(); |
|
401 | + } |
|
402 | 402 | } |
403 | 403 | |
404 | 404 | |
@@ -413,11 +413,11 @@ discard block |
||
413 | 413 | */ |
414 | 414 | function imagecolormatch($image1, $image2): void |
415 | 415 | { |
416 | - error_clear_last(); |
|
417 | - $result = \imagecolormatch($image1, $image2); |
|
418 | - if ($result === false) { |
|
419 | - throw ImageException::createFromPhpError(); |
|
420 | - } |
|
416 | + error_clear_last(); |
|
417 | + $result = \imagecolormatch($image1, $image2); |
|
418 | + if ($result === false) { |
|
419 | + throw ImageException::createFromPhpError(); |
|
420 | + } |
|
421 | 421 | } |
422 | 422 | |
423 | 423 | |
@@ -435,11 +435,11 @@ discard block |
||
435 | 435 | */ |
436 | 436 | function imageconvolution($image, array $matrix, float $div, float $offset): void |
437 | 437 | { |
438 | - error_clear_last(); |
|
439 | - $result = \imageconvolution($image, $matrix, $div, $offset); |
|
440 | - if ($result === false) { |
|
441 | - throw ImageException::createFromPhpError(); |
|
442 | - } |
|
438 | + error_clear_last(); |
|
439 | + $result = \imageconvolution($image, $matrix, $div, $offset); |
|
440 | + if ($result === false) { |
|
441 | + throw ImageException::createFromPhpError(); |
|
442 | + } |
|
443 | 443 | } |
444 | 444 | |
445 | 445 | |
@@ -465,11 +465,11 @@ discard block |
||
465 | 465 | */ |
466 | 466 | function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h): void |
467 | 467 | { |
468 | - error_clear_last(); |
|
469 | - $result = \imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h); |
|
470 | - if ($result === false) { |
|
471 | - throw ImageException::createFromPhpError(); |
|
472 | - } |
|
468 | + error_clear_last(); |
|
469 | + $result = \imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h); |
|
470 | + if ($result === false) { |
|
471 | + throw ImageException::createFromPhpError(); |
|
472 | + } |
|
473 | 473 | } |
474 | 474 | |
475 | 475 | |
@@ -501,11 +501,11 @@ discard block |
||
501 | 501 | */ |
502 | 502 | function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): void |
503 | 503 | { |
504 | - error_clear_last(); |
|
505 | - $result = \imagecopymerge($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct); |
|
506 | - if ($result === false) { |
|
507 | - throw ImageException::createFromPhpError(); |
|
508 | - } |
|
504 | + error_clear_last(); |
|
505 | + $result = \imagecopymerge($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct); |
|
506 | + if ($result === false) { |
|
507 | + throw ImageException::createFromPhpError(); |
|
508 | + } |
|
509 | 509 | } |
510 | 510 | |
511 | 511 | |
@@ -541,11 +541,11 @@ discard block |
||
541 | 541 | */ |
542 | 542 | function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): void |
543 | 543 | { |
544 | - error_clear_last(); |
|
545 | - $result = \imagecopymergegray($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct); |
|
546 | - if ($result === false) { |
|
547 | - throw ImageException::createFromPhpError(); |
|
548 | - } |
|
544 | + error_clear_last(); |
|
545 | + $result = \imagecopymergegray($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct); |
|
546 | + if ($result === false) { |
|
547 | + throw ImageException::createFromPhpError(); |
|
548 | + } |
|
549 | 549 | } |
550 | 550 | |
551 | 551 | |
@@ -586,11 +586,11 @@ discard block |
||
586 | 586 | */ |
587 | 587 | function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): void |
588 | 588 | { |
589 | - error_clear_last(); |
|
590 | - $result = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); |
|
591 | - if ($result === false) { |
|
592 | - throw ImageException::createFromPhpError(); |
|
593 | - } |
|
589 | + error_clear_last(); |
|
590 | + $result = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); |
|
591 | + if ($result === false) { |
|
592 | + throw ImageException::createFromPhpError(); |
|
593 | + } |
|
594 | 594 | } |
595 | 595 | |
596 | 596 | |
@@ -631,11 +631,11 @@ discard block |
||
631 | 631 | */ |
632 | 632 | function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): void |
633 | 633 | { |
634 | - error_clear_last(); |
|
635 | - $result = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); |
|
636 | - if ($result === false) { |
|
637 | - throw ImageException::createFromPhpError(); |
|
638 | - } |
|
634 | + error_clear_last(); |
|
635 | + $result = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); |
|
636 | + if ($result === false) { |
|
637 | + throw ImageException::createFromPhpError(); |
|
638 | + } |
|
639 | 639 | } |
640 | 640 | |
641 | 641 | |
@@ -659,12 +659,12 @@ discard block |
||
659 | 659 | */ |
660 | 660 | function imagecreate(int $width, int $height) |
661 | 661 | { |
662 | - error_clear_last(); |
|
663 | - $result = \imagecreate($width, $height); |
|
664 | - if ($result === false) { |
|
665 | - throw ImageException::createFromPhpError(); |
|
666 | - } |
|
667 | - return $result; |
|
662 | + error_clear_last(); |
|
663 | + $result = \imagecreate($width, $height); |
|
664 | + if ($result === false) { |
|
665 | + throw ImageException::createFromPhpError(); |
|
666 | + } |
|
667 | + return $result; |
|
668 | 668 | } |
669 | 669 | |
670 | 670 | |
@@ -679,12 +679,12 @@ discard block |
||
679 | 679 | */ |
680 | 680 | function imagecreatefrombmp(string $filename) |
681 | 681 | { |
682 | - error_clear_last(); |
|
683 | - $result = \imagecreatefrombmp($filename); |
|
684 | - if ($result === false) { |
|
685 | - throw ImageException::createFromPhpError(); |
|
686 | - } |
|
687 | - return $result; |
|
682 | + error_clear_last(); |
|
683 | + $result = \imagecreatefrombmp($filename); |
|
684 | + if ($result === false) { |
|
685 | + throw ImageException::createFromPhpError(); |
|
686 | + } |
|
687 | + return $result; |
|
688 | 688 | } |
689 | 689 | |
690 | 690 | |
@@ -698,12 +698,12 @@ discard block |
||
698 | 698 | */ |
699 | 699 | function imagecreatefromgd(string $filename) |
700 | 700 | { |
701 | - error_clear_last(); |
|
702 | - $result = \imagecreatefromgd($filename); |
|
703 | - if ($result === false) { |
|
704 | - throw ImageException::createFromPhpError(); |
|
705 | - } |
|
706 | - return $result; |
|
701 | + error_clear_last(); |
|
702 | + $result = \imagecreatefromgd($filename); |
|
703 | + if ($result === false) { |
|
704 | + throw ImageException::createFromPhpError(); |
|
705 | + } |
|
706 | + return $result; |
|
707 | 707 | } |
708 | 708 | |
709 | 709 | |
@@ -717,12 +717,12 @@ discard block |
||
717 | 717 | */ |
718 | 718 | function imagecreatefromgd2(string $filename) |
719 | 719 | { |
720 | - error_clear_last(); |
|
721 | - $result = \imagecreatefromgd2($filename); |
|
722 | - if ($result === false) { |
|
723 | - throw ImageException::createFromPhpError(); |
|
724 | - } |
|
725 | - return $result; |
|
720 | + error_clear_last(); |
|
721 | + $result = \imagecreatefromgd2($filename); |
|
722 | + if ($result === false) { |
|
723 | + throw ImageException::createFromPhpError(); |
|
724 | + } |
|
725 | + return $result; |
|
726 | 726 | } |
727 | 727 | |
728 | 728 | |
@@ -740,12 +740,12 @@ discard block |
||
740 | 740 | */ |
741 | 741 | function imagecreatefromgd2part(string $filename, int $srcX, int $srcY, int $width, int $height) |
742 | 742 | { |
743 | - error_clear_last(); |
|
744 | - $result = \imagecreatefromgd2part($filename, $srcX, $srcY, $width, $height); |
|
745 | - if ($result === false) { |
|
746 | - throw ImageException::createFromPhpError(); |
|
747 | - } |
|
748 | - return $result; |
|
743 | + error_clear_last(); |
|
744 | + $result = \imagecreatefromgd2part($filename, $srcX, $srcY, $width, $height); |
|
745 | + if ($result === false) { |
|
746 | + throw ImageException::createFromPhpError(); |
|
747 | + } |
|
748 | + return $result; |
|
749 | 749 | } |
750 | 750 | |
751 | 751 | |
@@ -760,12 +760,12 @@ discard block |
||
760 | 760 | */ |
761 | 761 | function imagecreatefromgif(string $filename) |
762 | 762 | { |
763 | - error_clear_last(); |
|
764 | - $result = \imagecreatefromgif($filename); |
|
765 | - if ($result === false) { |
|
766 | - throw ImageException::createFromPhpError(); |
|
767 | - } |
|
768 | - return $result; |
|
763 | + error_clear_last(); |
|
764 | + $result = \imagecreatefromgif($filename); |
|
765 | + if ($result === false) { |
|
766 | + throw ImageException::createFromPhpError(); |
|
767 | + } |
|
768 | + return $result; |
|
769 | 769 | } |
770 | 770 | |
771 | 771 | |
@@ -780,12 +780,12 @@ discard block |
||
780 | 780 | */ |
781 | 781 | function imagecreatefromjpeg(string $filename) |
782 | 782 | { |
783 | - error_clear_last(); |
|
784 | - $result = \imagecreatefromjpeg($filename); |
|
785 | - if ($result === false) { |
|
786 | - throw ImageException::createFromPhpError(); |
|
787 | - } |
|
788 | - return $result; |
|
783 | + error_clear_last(); |
|
784 | + $result = \imagecreatefromjpeg($filename); |
|
785 | + if ($result === false) { |
|
786 | + throw ImageException::createFromPhpError(); |
|
787 | + } |
|
788 | + return $result; |
|
789 | 789 | } |
790 | 790 | |
791 | 791 | |
@@ -800,12 +800,12 @@ discard block |
||
800 | 800 | */ |
801 | 801 | function imagecreatefrompng(string $filename) |
802 | 802 | { |
803 | - error_clear_last(); |
|
804 | - $result = \imagecreatefrompng($filename); |
|
805 | - if ($result === false) { |
|
806 | - throw ImageException::createFromPhpError(); |
|
807 | - } |
|
808 | - return $result; |
|
803 | + error_clear_last(); |
|
804 | + $result = \imagecreatefrompng($filename); |
|
805 | + if ($result === false) { |
|
806 | + throw ImageException::createFromPhpError(); |
|
807 | + } |
|
808 | + return $result; |
|
809 | 809 | } |
810 | 810 | |
811 | 811 | |
@@ -820,12 +820,12 @@ discard block |
||
820 | 820 | */ |
821 | 821 | function imagecreatefromwbmp(string $filename) |
822 | 822 | { |
823 | - error_clear_last(); |
|
824 | - $result = \imagecreatefromwbmp($filename); |
|
825 | - if ($result === false) { |
|
826 | - throw ImageException::createFromPhpError(); |
|
827 | - } |
|
828 | - return $result; |
|
823 | + error_clear_last(); |
|
824 | + $result = \imagecreatefromwbmp($filename); |
|
825 | + if ($result === false) { |
|
826 | + throw ImageException::createFromPhpError(); |
|
827 | + } |
|
828 | + return $result; |
|
829 | 829 | } |
830 | 830 | |
831 | 831 | |
@@ -840,12 +840,12 @@ discard block |
||
840 | 840 | */ |
841 | 841 | function imagecreatefromwebp(string $filename) |
842 | 842 | { |
843 | - error_clear_last(); |
|
844 | - $result = \imagecreatefromwebp($filename); |
|
845 | - if ($result === false) { |
|
846 | - throw ImageException::createFromPhpError(); |
|
847 | - } |
|
848 | - return $result; |
|
843 | + error_clear_last(); |
|
844 | + $result = \imagecreatefromwebp($filename); |
|
845 | + if ($result === false) { |
|
846 | + throw ImageException::createFromPhpError(); |
|
847 | + } |
|
848 | + return $result; |
|
849 | 849 | } |
850 | 850 | |
851 | 851 | |
@@ -860,12 +860,12 @@ discard block |
||
860 | 860 | */ |
861 | 861 | function imagecreatefromxbm(string $filename) |
862 | 862 | { |
863 | - error_clear_last(); |
|
864 | - $result = \imagecreatefromxbm($filename); |
|
865 | - if ($result === false) { |
|
866 | - throw ImageException::createFromPhpError(); |
|
867 | - } |
|
868 | - return $result; |
|
863 | + error_clear_last(); |
|
864 | + $result = \imagecreatefromxbm($filename); |
|
865 | + if ($result === false) { |
|
866 | + throw ImageException::createFromPhpError(); |
|
867 | + } |
|
868 | + return $result; |
|
869 | 869 | } |
870 | 870 | |
871 | 871 | |
@@ -880,12 +880,12 @@ discard block |
||
880 | 880 | */ |
881 | 881 | function imagecreatefromxpm(string $filename) |
882 | 882 | { |
883 | - error_clear_last(); |
|
884 | - $result = \imagecreatefromxpm($filename); |
|
885 | - if ($result === false) { |
|
886 | - throw ImageException::createFromPhpError(); |
|
887 | - } |
|
888 | - return $result; |
|
883 | + error_clear_last(); |
|
884 | + $result = \imagecreatefromxpm($filename); |
|
885 | + if ($result === false) { |
|
886 | + throw ImageException::createFromPhpError(); |
|
887 | + } |
|
888 | + return $result; |
|
889 | 889 | } |
890 | 890 | |
891 | 891 | |
@@ -901,12 +901,12 @@ discard block |
||
901 | 901 | */ |
902 | 902 | function imagecreatetruecolor(int $width, int $height) |
903 | 903 | { |
904 | - error_clear_last(); |
|
905 | - $result = \imagecreatetruecolor($width, $height); |
|
906 | - if ($result === false) { |
|
907 | - throw ImageException::createFromPhpError(); |
|
908 | - } |
|
909 | - return $result; |
|
904 | + error_clear_last(); |
|
905 | + $result = \imagecreatetruecolor($width, $height); |
|
906 | + if ($result === false) { |
|
907 | + throw ImageException::createFromPhpError(); |
|
908 | + } |
|
909 | + return $result; |
|
910 | 910 | } |
911 | 911 | |
912 | 912 | |
@@ -925,12 +925,12 @@ discard block |
||
925 | 925 | */ |
926 | 926 | function imagecrop($image, array $rect) |
927 | 927 | { |
928 | - error_clear_last(); |
|
929 | - $result = \imagecrop($image, $rect); |
|
930 | - if ($result === false) { |
|
931 | - throw ImageException::createFromPhpError(); |
|
932 | - } |
|
933 | - return $result; |
|
928 | + error_clear_last(); |
|
929 | + $result = \imagecrop($image, $rect); |
|
930 | + if ($result === false) { |
|
931 | + throw ImageException::createFromPhpError(); |
|
932 | + } |
|
933 | + return $result; |
|
934 | 934 | } |
935 | 935 | |
936 | 936 | |
@@ -950,12 +950,12 @@ discard block |
||
950 | 950 | */ |
951 | 951 | function imagecropauto($image, int $mode = IMG_CROP_DEFAULT, float $threshold = .5, int $color = -1) |
952 | 952 | { |
953 | - error_clear_last(); |
|
954 | - $result = \imagecropauto($image, $mode, $threshold, $color); |
|
955 | - if ($result === false) { |
|
956 | - throw ImageException::createFromPhpError(); |
|
957 | - } |
|
958 | - return $result; |
|
953 | + error_clear_last(); |
|
954 | + $result = \imagecropauto($image, $mode, $threshold, $color); |
|
955 | + if ($result === false) { |
|
956 | + throw ImageException::createFromPhpError(); |
|
957 | + } |
|
958 | + return $result; |
|
959 | 959 | } |
960 | 960 | |
961 | 961 | |
@@ -976,11 +976,11 @@ discard block |
||
976 | 976 | */ |
977 | 977 | function imagedashedline($image, int $x1, int $y1, int $x2, int $y2, int $color): void |
978 | 978 | { |
979 | - error_clear_last(); |
|
980 | - $result = \imagedashedline($image, $x1, $y1, $x2, $y2, $color); |
|
981 | - if ($result === false) { |
|
982 | - throw ImageException::createFromPhpError(); |
|
983 | - } |
|
979 | + error_clear_last(); |
|
980 | + $result = \imagedashedline($image, $x1, $y1, $x2, $y2, $color); |
|
981 | + if ($result === false) { |
|
982 | + throw ImageException::createFromPhpError(); |
|
983 | + } |
|
984 | 984 | } |
985 | 985 | |
986 | 986 | |
@@ -995,11 +995,11 @@ discard block |
||
995 | 995 | */ |
996 | 996 | function imagedestroy($image): void |
997 | 997 | { |
998 | - error_clear_last(); |
|
999 | - $result = \imagedestroy($image); |
|
1000 | - if ($result === false) { |
|
1001 | - throw ImageException::createFromPhpError(); |
|
1002 | - } |
|
998 | + error_clear_last(); |
|
999 | + $result = \imagedestroy($image); |
|
1000 | + if ($result === false) { |
|
1001 | + throw ImageException::createFromPhpError(); |
|
1002 | + } |
|
1003 | 1003 | } |
1004 | 1004 | |
1005 | 1005 | |
@@ -1018,11 +1018,11 @@ discard block |
||
1018 | 1018 | */ |
1019 | 1019 | function imageellipse($image, int $cx, int $cy, int $width, int $height, int $color): void |
1020 | 1020 | { |
1021 | - error_clear_last(); |
|
1022 | - $result = \imageellipse($image, $cx, $cy, $width, $height, $color); |
|
1023 | - if ($result === false) { |
|
1024 | - throw ImageException::createFromPhpError(); |
|
1025 | - } |
|
1021 | + error_clear_last(); |
|
1022 | + $result = \imageellipse($image, $cx, $cy, $width, $height, $color); |
|
1023 | + if ($result === false) { |
|
1024 | + throw ImageException::createFromPhpError(); |
|
1025 | + } |
|
1026 | 1026 | } |
1027 | 1027 | |
1028 | 1028 | |
@@ -1041,11 +1041,11 @@ discard block |
||
1041 | 1041 | */ |
1042 | 1042 | function imagefill($image, int $x, int $y, int $color): void |
1043 | 1043 | { |
1044 | - error_clear_last(); |
|
1045 | - $result = \imagefill($image, $x, $y, $color); |
|
1046 | - if ($result === false) { |
|
1047 | - throw ImageException::createFromPhpError(); |
|
1048 | - } |
|
1044 | + error_clear_last(); |
|
1045 | + $result = \imagefill($image, $x, $y, $color); |
|
1046 | + if ($result === false) { |
|
1047 | + throw ImageException::createFromPhpError(); |
|
1048 | + } |
|
1049 | 1049 | } |
1050 | 1050 | |
1051 | 1051 | |
@@ -1085,11 +1085,11 @@ discard block |
||
1085 | 1085 | */ |
1086 | 1086 | function imagefilledarc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color, int $style): void |
1087 | 1087 | { |
1088 | - error_clear_last(); |
|
1089 | - $result = \imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $color, $style); |
|
1090 | - if ($result === false) { |
|
1091 | - throw ImageException::createFromPhpError(); |
|
1092 | - } |
|
1088 | + error_clear_last(); |
|
1089 | + $result = \imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $color, $style); |
|
1090 | + if ($result === false) { |
|
1091 | + throw ImageException::createFromPhpError(); |
|
1092 | + } |
|
1093 | 1093 | } |
1094 | 1094 | |
1095 | 1095 | |
@@ -1109,11 +1109,11 @@ discard block |
||
1109 | 1109 | */ |
1110 | 1110 | function imagefilledellipse($image, int $cx, int $cy, int $width, int $height, int $color): void |
1111 | 1111 | { |
1112 | - error_clear_last(); |
|
1113 | - $result = \imagefilledellipse($image, $cx, $cy, $width, $height, $color); |
|
1114 | - if ($result === false) { |
|
1115 | - throw ImageException::createFromPhpError(); |
|
1116 | - } |
|
1112 | + error_clear_last(); |
|
1113 | + $result = \imagefilledellipse($image, $cx, $cy, $width, $height, $color); |
|
1114 | + if ($result === false) { |
|
1115 | + throw ImageException::createFromPhpError(); |
|
1116 | + } |
|
1117 | 1117 | } |
1118 | 1118 | |
1119 | 1119 | |
@@ -1132,11 +1132,11 @@ discard block |
||
1132 | 1132 | */ |
1133 | 1133 | function imagefilledpolygon($image, array $points, int $num_points, int $color): void |
1134 | 1134 | { |
1135 | - error_clear_last(); |
|
1136 | - $result = \imagefilledpolygon($image, $points, $num_points, $color); |
|
1137 | - if ($result === false) { |
|
1138 | - throw ImageException::createFromPhpError(); |
|
1139 | - } |
|
1135 | + error_clear_last(); |
|
1136 | + $result = \imagefilledpolygon($image, $points, $num_points, $color); |
|
1137 | + if ($result === false) { |
|
1138 | + throw ImageException::createFromPhpError(); |
|
1139 | + } |
|
1140 | 1140 | } |
1141 | 1141 | |
1142 | 1142 | |
@@ -1157,11 +1157,11 @@ discard block |
||
1157 | 1157 | */ |
1158 | 1158 | function imagefilledrectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void |
1159 | 1159 | { |
1160 | - error_clear_last(); |
|
1161 | - $result = \imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color); |
|
1162 | - if ($result === false) { |
|
1163 | - throw ImageException::createFromPhpError(); |
|
1164 | - } |
|
1160 | + error_clear_last(); |
|
1161 | + $result = \imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color); |
|
1162 | + if ($result === false) { |
|
1163 | + throw ImageException::createFromPhpError(); |
|
1164 | + } |
|
1165 | 1165 | } |
1166 | 1166 | |
1167 | 1167 | |
@@ -1183,11 +1183,11 @@ discard block |
||
1183 | 1183 | */ |
1184 | 1184 | function imagefilltoborder($image, int $x, int $y, int $border, int $color): void |
1185 | 1185 | { |
1186 | - error_clear_last(); |
|
1187 | - $result = \imagefilltoborder($image, $x, $y, $border, $color); |
|
1188 | - if ($result === false) { |
|
1189 | - throw ImageException::createFromPhpError(); |
|
1190 | - } |
|
1186 | + error_clear_last(); |
|
1187 | + $result = \imagefilltoborder($image, $x, $y, $border, $color); |
|
1188 | + if ($result === false) { |
|
1189 | + throw ImageException::createFromPhpError(); |
|
1190 | + } |
|
1191 | 1191 | } |
1192 | 1192 | |
1193 | 1193 | |
@@ -1369,21 +1369,21 @@ discard block |
||
1369 | 1369 | */ |
1370 | 1370 | function imagefilter($image, int $filtertype, int $arg1 = null, int $arg2 = null, int $arg3 = null, int $arg4 = null): void |
1371 | 1371 | { |
1372 | - error_clear_last(); |
|
1373 | - if ($arg4 !== null) { |
|
1374 | - $result = \imagefilter($image, $filtertype, $arg1, $arg2, $arg3, $arg4); |
|
1375 | - } elseif ($arg3 !== null) { |
|
1376 | - $result = \imagefilter($image, $filtertype, $arg1, $arg2, $arg3); |
|
1377 | - } elseif ($arg2 !== null) { |
|
1378 | - $result = \imagefilter($image, $filtertype, $arg1, $arg2); |
|
1379 | - } elseif ($arg1 !== null) { |
|
1380 | - $result = \imagefilter($image, $filtertype, $arg1); |
|
1381 | - } else { |
|
1382 | - $result = \imagefilter($image, $filtertype); |
|
1383 | - } |
|
1384 | - if ($result === false) { |
|
1385 | - throw ImageException::createFromPhpError(); |
|
1386 | - } |
|
1372 | + error_clear_last(); |
|
1373 | + if ($arg4 !== null) { |
|
1374 | + $result = \imagefilter($image, $filtertype, $arg1, $arg2, $arg3, $arg4); |
|
1375 | + } elseif ($arg3 !== null) { |
|
1376 | + $result = \imagefilter($image, $filtertype, $arg1, $arg2, $arg3); |
|
1377 | + } elseif ($arg2 !== null) { |
|
1378 | + $result = \imagefilter($image, $filtertype, $arg1, $arg2); |
|
1379 | + } elseif ($arg1 !== null) { |
|
1380 | + $result = \imagefilter($image, $filtertype, $arg1); |
|
1381 | + } else { |
|
1382 | + $result = \imagefilter($image, $filtertype); |
|
1383 | + } |
|
1384 | + if ($result === false) { |
|
1385 | + throw ImageException::createFromPhpError(); |
|
1386 | + } |
|
1387 | 1387 | } |
1388 | 1388 | |
1389 | 1389 | |
@@ -1430,11 +1430,11 @@ discard block |
||
1430 | 1430 | */ |
1431 | 1431 | function imageflip($image, int $mode): void |
1432 | 1432 | { |
1433 | - error_clear_last(); |
|
1434 | - $result = \imageflip($image, $mode); |
|
1435 | - if ($result === false) { |
|
1436 | - throw ImageException::createFromPhpError(); |
|
1437 | - } |
|
1433 | + error_clear_last(); |
|
1434 | + $result = \imageflip($image, $mode); |
|
1435 | + if ($result === false) { |
|
1436 | + throw ImageException::createFromPhpError(); |
|
1437 | + } |
|
1438 | 1438 | } |
1439 | 1439 | |
1440 | 1440 | |
@@ -1451,11 +1451,11 @@ discard block |
||
1451 | 1451 | */ |
1452 | 1452 | function imagegammacorrect($image, float $inputgamma, float $outputgamma): void |
1453 | 1453 | { |
1454 | - error_clear_last(); |
|
1455 | - $result = \imagegammacorrect($image, $inputgamma, $outputgamma); |
|
1456 | - if ($result === false) { |
|
1457 | - throw ImageException::createFromPhpError(); |
|
1458 | - } |
|
1454 | + error_clear_last(); |
|
1455 | + $result = \imagegammacorrect($image, $inputgamma, $outputgamma); |
|
1456 | + if ($result === false) { |
|
1457 | + throw ImageException::createFromPhpError(); |
|
1458 | + } |
|
1459 | 1459 | } |
1460 | 1460 | |
1461 | 1461 | |
@@ -1470,11 +1470,11 @@ discard block |
||
1470 | 1470 | */ |
1471 | 1471 | function imagegd($image, $to = null): void |
1472 | 1472 | { |
1473 | - error_clear_last(); |
|
1474 | - $result = \imagegd($image, $to); |
|
1475 | - if ($result === false) { |
|
1476 | - throw ImageException::createFromPhpError(); |
|
1477 | - } |
|
1473 | + error_clear_last(); |
|
1474 | + $result = \imagegd($image, $to); |
|
1475 | + if ($result === false) { |
|
1476 | + throw ImageException::createFromPhpError(); |
|
1477 | + } |
|
1478 | 1478 | } |
1479 | 1479 | |
1480 | 1480 | |
@@ -1493,11 +1493,11 @@ discard block |
||
1493 | 1493 | */ |
1494 | 1494 | function imagegd2($image, $to = null, int $chunk_size = 128, int $type = IMG_GD2_RAW): void |
1495 | 1495 | { |
1496 | - error_clear_last(); |
|
1497 | - $result = \imagegd2($image, $to, $chunk_size, $type); |
|
1498 | - if ($result === false) { |
|
1499 | - throw ImageException::createFromPhpError(); |
|
1500 | - } |
|
1496 | + error_clear_last(); |
|
1497 | + $result = \imagegd2($image, $to, $chunk_size, $type); |
|
1498 | + if ($result === false) { |
|
1499 | + throw ImageException::createFromPhpError(); |
|
1500 | + } |
|
1501 | 1501 | } |
1502 | 1502 | |
1503 | 1503 | |
@@ -1521,11 +1521,11 @@ discard block |
||
1521 | 1521 | */ |
1522 | 1522 | function imagegif($image, $to = null): void |
1523 | 1523 | { |
1524 | - error_clear_last(); |
|
1525 | - $result = \imagegif($image, $to); |
|
1526 | - if ($result === false) { |
|
1527 | - throw ImageException::createFromPhpError(); |
|
1528 | - } |
|
1524 | + error_clear_last(); |
|
1525 | + $result = \imagegif($image, $to); |
|
1526 | + if ($result === false) { |
|
1527 | + throw ImageException::createFromPhpError(); |
|
1528 | + } |
|
1529 | 1529 | } |
1530 | 1530 | |
1531 | 1531 | |
@@ -1538,12 +1538,12 @@ discard block |
||
1538 | 1538 | */ |
1539 | 1539 | function imagegrabscreen() |
1540 | 1540 | { |
1541 | - error_clear_last(); |
|
1542 | - $result = \imagegrabscreen(); |
|
1543 | - if ($result === false) { |
|
1544 | - throw ImageException::createFromPhpError(); |
|
1545 | - } |
|
1546 | - return $result; |
|
1541 | + error_clear_last(); |
|
1542 | + $result = \imagegrabscreen(); |
|
1543 | + if ($result === false) { |
|
1544 | + throw ImageException::createFromPhpError(); |
|
1545 | + } |
|
1546 | + return $result; |
|
1547 | 1547 | } |
1548 | 1548 | |
1549 | 1549 | |
@@ -1558,12 +1558,12 @@ discard block |
||
1558 | 1558 | */ |
1559 | 1559 | function imagegrabwindow(int $window_handle, int $client_area = 0) |
1560 | 1560 | { |
1561 | - error_clear_last(); |
|
1562 | - $result = \imagegrabwindow($window_handle, $client_area); |
|
1563 | - if ($result === false) { |
|
1564 | - throw ImageException::createFromPhpError(); |
|
1565 | - } |
|
1566 | - return $result; |
|
1561 | + error_clear_last(); |
|
1562 | + $result = \imagegrabwindow($window_handle, $client_area); |
|
1563 | + if ($result === false) { |
|
1564 | + throw ImageException::createFromPhpError(); |
|
1565 | + } |
|
1566 | + return $result; |
|
1567 | 1567 | } |
1568 | 1568 | |
1569 | 1569 | |
@@ -1582,11 +1582,11 @@ discard block |
||
1582 | 1582 | */ |
1583 | 1583 | function imagejpeg($image, $to = null, int $quality = -1): void |
1584 | 1584 | { |
1585 | - error_clear_last(); |
|
1586 | - $result = \imagejpeg($image, $to, $quality); |
|
1587 | - if ($result === false) { |
|
1588 | - throw ImageException::createFromPhpError(); |
|
1589 | - } |
|
1585 | + error_clear_last(); |
|
1586 | + $result = \imagejpeg($image, $to, $quality); |
|
1587 | + if ($result === false) { |
|
1588 | + throw ImageException::createFromPhpError(); |
|
1589 | + } |
|
1590 | 1590 | } |
1591 | 1591 | |
1592 | 1592 | |
@@ -1647,11 +1647,11 @@ discard block |
||
1647 | 1647 | */ |
1648 | 1648 | function imagelayereffect($image, int $effect): void |
1649 | 1649 | { |
1650 | - error_clear_last(); |
|
1651 | - $result = \imagelayereffect($image, $effect); |
|
1652 | - if ($result === false) { |
|
1653 | - throw ImageException::createFromPhpError(); |
|
1654 | - } |
|
1650 | + error_clear_last(); |
|
1651 | + $result = \imagelayereffect($image, $effect); |
|
1652 | + if ($result === false) { |
|
1653 | + throw ImageException::createFromPhpError(); |
|
1654 | + } |
|
1655 | 1655 | } |
1656 | 1656 | |
1657 | 1657 | |
@@ -1670,11 +1670,11 @@ discard block |
||
1670 | 1670 | */ |
1671 | 1671 | function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color): void |
1672 | 1672 | { |
1673 | - error_clear_last(); |
|
1674 | - $result = \imageline($image, $x1, $y1, $x2, $y2, $color); |
|
1675 | - if ($result === false) { |
|
1676 | - throw ImageException::createFromPhpError(); |
|
1677 | - } |
|
1673 | + error_clear_last(); |
|
1674 | + $result = \imageline($image, $x1, $y1, $x2, $y2, $color); |
|
1675 | + if ($result === false) { |
|
1676 | + throw ImageException::createFromPhpError(); |
|
1677 | + } |
|
1678 | 1678 | } |
1679 | 1679 | |
1680 | 1680 | |
@@ -1737,12 +1737,12 @@ discard block |
||
1737 | 1737 | */ |
1738 | 1738 | function imageloadfont(string $file): int |
1739 | 1739 | { |
1740 | - error_clear_last(); |
|
1741 | - $result = \imageloadfont($file); |
|
1742 | - if ($result === false) { |
|
1743 | - throw ImageException::createFromPhpError(); |
|
1744 | - } |
|
1745 | - return $result; |
|
1740 | + error_clear_last(); |
|
1741 | + $result = \imageloadfont($file); |
|
1742 | + if ($result === false) { |
|
1743 | + throw ImageException::createFromPhpError(); |
|
1744 | + } |
|
1745 | + return $result; |
|
1746 | 1746 | } |
1747 | 1747 | |
1748 | 1748 | |
@@ -1783,11 +1783,11 @@ discard block |
||
1783 | 1783 | */ |
1784 | 1784 | function imageopenpolygon($image, array $points, int $num_points, int $color): void |
1785 | 1785 | { |
1786 | - error_clear_last(); |
|
1787 | - $result = \imageopenpolygon($image, $points, $num_points, $color); |
|
1788 | - if ($result === false) { |
|
1789 | - throw ImageException::createFromPhpError(); |
|
1790 | - } |
|
1786 | + error_clear_last(); |
|
1787 | + $result = \imageopenpolygon($image, $points, $num_points, $color); |
|
1788 | + if ($result === false) { |
|
1789 | + throw ImageException::createFromPhpError(); |
|
1790 | + } |
|
1791 | 1791 | } |
1792 | 1792 | |
1793 | 1793 | |
@@ -1815,11 +1815,11 @@ discard block |
||
1815 | 1815 | */ |
1816 | 1816 | function imagepng($image, $to = null, int $quality = -1, int $filters = -1): void |
1817 | 1817 | { |
1818 | - error_clear_last(); |
|
1819 | - $result = \imagepng($image, $to, $quality, $filters); |
|
1820 | - if ($result === false) { |
|
1821 | - throw ImageException::createFromPhpError(); |
|
1822 | - } |
|
1818 | + error_clear_last(); |
|
1819 | + $result = \imagepng($image, $to, $quality, $filters); |
|
1820 | + if ($result === false) { |
|
1821 | + throw ImageException::createFromPhpError(); |
|
1822 | + } |
|
1823 | 1823 | } |
1824 | 1824 | |
1825 | 1825 | |
@@ -1859,11 +1859,11 @@ discard block |
||
1859 | 1859 | */ |
1860 | 1860 | function imagepolygon($image, array $points, int $num_points, int $color): void |
1861 | 1861 | { |
1862 | - error_clear_last(); |
|
1863 | - $result = \imagepolygon($image, $points, $num_points, $color); |
|
1864 | - if ($result === false) { |
|
1865 | - throw ImageException::createFromPhpError(); |
|
1866 | - } |
|
1862 | + error_clear_last(); |
|
1863 | + $result = \imagepolygon($image, $points, $num_points, $color); |
|
1864 | + if ($result === false) { |
|
1865 | + throw ImageException::createFromPhpError(); |
|
1866 | + } |
|
1867 | 1867 | } |
1868 | 1868 | |
1869 | 1869 | |
@@ -1884,11 +1884,11 @@ discard block |
||
1884 | 1884 | */ |
1885 | 1885 | function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void |
1886 | 1886 | { |
1887 | - error_clear_last(); |
|
1888 | - $result = \imagerectangle($image, $x1, $y1, $x2, $y2, $color); |
|
1889 | - if ($result === false) { |
|
1890 | - throw ImageException::createFromPhpError(); |
|
1891 | - } |
|
1887 | + error_clear_last(); |
|
1888 | + $result = \imagerectangle($image, $x1, $y1, $x2, $y2, $color); |
|
1889 | + if ($result === false) { |
|
1890 | + throw ImageException::createFromPhpError(); |
|
1891 | + } |
|
1892 | 1892 | } |
1893 | 1893 | |
1894 | 1894 | |
@@ -1911,12 +1911,12 @@ discard block |
||
1911 | 1911 | */ |
1912 | 1912 | function imagerotate($image, float $angle, int $bgd_color, int $dummy = 0) |
1913 | 1913 | { |
1914 | - error_clear_last(); |
|
1915 | - $result = \imagerotate($image, $angle, $bgd_color, $dummy); |
|
1916 | - if ($result === false) { |
|
1917 | - throw ImageException::createFromPhpError(); |
|
1918 | - } |
|
1919 | - return $result; |
|
1914 | + error_clear_last(); |
|
1915 | + $result = \imagerotate($image, $angle, $bgd_color, $dummy); |
|
1916 | + if ($result === false) { |
|
1917 | + throw ImageException::createFromPhpError(); |
|
1918 | + } |
|
1919 | + return $result; |
|
1920 | 1920 | } |
1921 | 1921 | |
1922 | 1922 | |
@@ -1936,11 +1936,11 @@ discard block |
||
1936 | 1936 | */ |
1937 | 1937 | function imagesavealpha($image, bool $saveflag): void |
1938 | 1938 | { |
1939 | - error_clear_last(); |
|
1940 | - $result = \imagesavealpha($image, $saveflag); |
|
1941 | - if ($result === false) { |
|
1942 | - throw ImageException::createFromPhpError(); |
|
1943 | - } |
|
1939 | + error_clear_last(); |
|
1940 | + $result = \imagesavealpha($image, $saveflag); |
|
1941 | + if ($result === false) { |
|
1942 | + throw ImageException::createFromPhpError(); |
|
1943 | + } |
|
1944 | 1944 | } |
1945 | 1945 | |
1946 | 1946 | |
@@ -1969,12 +1969,12 @@ discard block |
||
1969 | 1969 | */ |
1970 | 1970 | function imagescale($image, int $new_width, int $new_height = -1, int $mode = IMG_BILINEAR_FIXED) |
1971 | 1971 | { |
1972 | - error_clear_last(); |
|
1973 | - $result = \imagescale($image, $new_width, $new_height, $mode); |
|
1974 | - if ($result === false) { |
|
1975 | - throw ImageException::createFromPhpError(); |
|
1976 | - } |
|
1977 | - return $result; |
|
1972 | + error_clear_last(); |
|
1973 | + $result = \imagescale($image, $new_width, $new_height, $mode); |
|
1974 | + if ($result === false) { |
|
1975 | + throw ImageException::createFromPhpError(); |
|
1976 | + } |
|
1977 | + return $result; |
|
1978 | 1978 | } |
1979 | 1979 | |
1980 | 1980 | |
@@ -1993,11 +1993,11 @@ discard block |
||
1993 | 1993 | */ |
1994 | 1994 | function imagesetbrush($image, $brush): void |
1995 | 1995 | { |
1996 | - error_clear_last(); |
|
1997 | - $result = \imagesetbrush($image, $brush); |
|
1998 | - if ($result === false) { |
|
1999 | - throw ImageException::createFromPhpError(); |
|
2000 | - } |
|
1996 | + error_clear_last(); |
|
1997 | + $result = \imagesetbrush($image, $brush); |
|
1998 | + if ($result === false) { |
|
1999 | + throw ImageException::createFromPhpError(); |
|
2000 | + } |
|
2001 | 2001 | } |
2002 | 2002 | |
2003 | 2003 | |
@@ -2016,11 +2016,11 @@ discard block |
||
2016 | 2016 | */ |
2017 | 2017 | function imagesetclip($im, int $x1, int $y1, int $x2, int $y2): void |
2018 | 2018 | { |
2019 | - error_clear_last(); |
|
2020 | - $result = \imagesetclip($im, $x1, $y1, $x2, $y2); |
|
2021 | - if ($result === false) { |
|
2022 | - throw ImageException::createFromPhpError(); |
|
2023 | - } |
|
2019 | + error_clear_last(); |
|
2020 | + $result = \imagesetclip($im, $x1, $y1, $x2, $y2); |
|
2021 | + if ($result === false) { |
|
2022 | + throw ImageException::createFromPhpError(); |
|
2023 | + } |
|
2024 | 2024 | } |
2025 | 2025 | |
2026 | 2026 | |
@@ -2143,11 +2143,11 @@ discard block |
||
2143 | 2143 | */ |
2144 | 2144 | function imagesetinterpolation($image, int $method = IMG_BILINEAR_FIXED): void |
2145 | 2145 | { |
2146 | - error_clear_last(); |
|
2147 | - $result = \imagesetinterpolation($image, $method); |
|
2148 | - if ($result === false) { |
|
2149 | - throw ImageException::createFromPhpError(); |
|
2150 | - } |
|
2146 | + error_clear_last(); |
|
2147 | + $result = \imagesetinterpolation($image, $method); |
|
2148 | + if ($result === false) { |
|
2149 | + throw ImageException::createFromPhpError(); |
|
2150 | + } |
|
2151 | 2151 | } |
2152 | 2152 | |
2153 | 2153 | |
@@ -2165,11 +2165,11 @@ discard block |
||
2165 | 2165 | */ |
2166 | 2166 | function imagesetpixel($image, int $x, int $y, int $color): void |
2167 | 2167 | { |
2168 | - error_clear_last(); |
|
2169 | - $result = \imagesetpixel($image, $x, $y, $color); |
|
2170 | - if ($result === false) { |
|
2171 | - throw ImageException::createFromPhpError(); |
|
2172 | - } |
|
2168 | + error_clear_last(); |
|
2169 | + $result = \imagesetpixel($image, $x, $y, $color); |
|
2170 | + if ($result === false) { |
|
2171 | + throw ImageException::createFromPhpError(); |
|
2172 | + } |
|
2173 | 2173 | } |
2174 | 2174 | |
2175 | 2175 | |
@@ -2191,11 +2191,11 @@ discard block |
||
2191 | 2191 | */ |
2192 | 2192 | function imagesetstyle($image, array $style): void |
2193 | 2193 | { |
2194 | - error_clear_last(); |
|
2195 | - $result = \imagesetstyle($image, $style); |
|
2196 | - if ($result === false) { |
|
2197 | - throw ImageException::createFromPhpError(); |
|
2198 | - } |
|
2194 | + error_clear_last(); |
|
2195 | + $result = \imagesetstyle($image, $style); |
|
2196 | + if ($result === false) { |
|
2197 | + throw ImageException::createFromPhpError(); |
|
2198 | + } |
|
2199 | 2199 | } |
2200 | 2200 | |
2201 | 2201 | |
@@ -2212,11 +2212,11 @@ discard block |
||
2212 | 2212 | */ |
2213 | 2213 | function imagesetthickness($image, int $thickness): void |
2214 | 2214 | { |
2215 | - error_clear_last(); |
|
2216 | - $result = \imagesetthickness($image, $thickness); |
|
2217 | - if ($result === false) { |
|
2218 | - throw ImageException::createFromPhpError(); |
|
2219 | - } |
|
2215 | + error_clear_last(); |
|
2216 | + $result = \imagesetthickness($image, $thickness); |
|
2217 | + if ($result === false) { |
|
2218 | + throw ImageException::createFromPhpError(); |
|
2219 | + } |
|
2220 | 2220 | } |
2221 | 2221 | |
2222 | 2222 | |
@@ -2239,11 +2239,11 @@ discard block |
||
2239 | 2239 | */ |
2240 | 2240 | function imagesettile($image, $tile): void |
2241 | 2241 | { |
2242 | - error_clear_last(); |
|
2243 | - $result = \imagesettile($image, $tile); |
|
2244 | - if ($result === false) { |
|
2245 | - throw ImageException::createFromPhpError(); |
|
2246 | - } |
|
2242 | + error_clear_last(); |
|
2243 | + $result = \imagesettile($image, $tile); |
|
2244 | + if ($result === false) { |
|
2245 | + throw ImageException::createFromPhpError(); |
|
2246 | + } |
|
2247 | 2247 | } |
2248 | 2248 | |
2249 | 2249 | |
@@ -2264,11 +2264,11 @@ discard block |
||
2264 | 2264 | */ |
2265 | 2265 | function imagestring($image, int $font, int $x, int $y, string $string, int $color): void |
2266 | 2266 | { |
2267 | - error_clear_last(); |
|
2268 | - $result = \imagestring($image, $font, $x, $y, $string, $color); |
|
2269 | - if ($result === false) { |
|
2270 | - throw ImageException::createFromPhpError(); |
|
2271 | - } |
|
2267 | + error_clear_last(); |
|
2268 | + $result = \imagestring($image, $font, $x, $y, $string, $color); |
|
2269 | + if ($result === false) { |
|
2270 | + throw ImageException::createFromPhpError(); |
|
2271 | + } |
|
2272 | 2272 | } |
2273 | 2273 | |
2274 | 2274 | |
@@ -2290,11 +2290,11 @@ discard block |
||
2290 | 2290 | */ |
2291 | 2291 | function imagestringup($image, int $font, int $x, int $y, string $string, int $color): void |
2292 | 2292 | { |
2293 | - error_clear_last(); |
|
2294 | - $result = \imagestringup($image, $font, $x, $y, $string, $color); |
|
2295 | - if ($result === false) { |
|
2296 | - throw ImageException::createFromPhpError(); |
|
2297 | - } |
|
2293 | + error_clear_last(); |
|
2294 | + $result = \imagestringup($image, $font, $x, $y, $string, $color); |
|
2295 | + if ($result === false) { |
|
2296 | + throw ImageException::createFromPhpError(); |
|
2297 | + } |
|
2298 | 2298 | } |
2299 | 2299 | |
2300 | 2300 | |
@@ -2309,12 +2309,12 @@ discard block |
||
2309 | 2309 | */ |
2310 | 2310 | function imagesx($image): int |
2311 | 2311 | { |
2312 | - error_clear_last(); |
|
2313 | - $result = \imagesx($image); |
|
2314 | - if ($result === false) { |
|
2315 | - throw ImageException::createFromPhpError(); |
|
2316 | - } |
|
2317 | - return $result; |
|
2312 | + error_clear_last(); |
|
2313 | + $result = \imagesx($image); |
|
2314 | + if ($result === false) { |
|
2315 | + throw ImageException::createFromPhpError(); |
|
2316 | + } |
|
2317 | + return $result; |
|
2318 | 2318 | } |
2319 | 2319 | |
2320 | 2320 | |
@@ -2329,12 +2329,12 @@ discard block |
||
2329 | 2329 | */ |
2330 | 2330 | function imagesy($image): int |
2331 | 2331 | { |
2332 | - error_clear_last(); |
|
2333 | - $result = \imagesy($image); |
|
2334 | - if ($result === false) { |
|
2335 | - throw ImageException::createFromPhpError(); |
|
2336 | - } |
|
2337 | - return $result; |
|
2332 | + error_clear_last(); |
|
2333 | + $result = \imagesy($image); |
|
2334 | + if ($result === false) { |
|
2335 | + throw ImageException::createFromPhpError(); |
|
2336 | + } |
|
2337 | + return $result; |
|
2338 | 2338 | } |
2339 | 2339 | |
2340 | 2340 | |
@@ -2359,11 +2359,11 @@ discard block |
||
2359 | 2359 | */ |
2360 | 2360 | function imagetruecolortopalette($image, bool $dither, int $ncolors): void |
2361 | 2361 | { |
2362 | - error_clear_last(); |
|
2363 | - $result = \imagetruecolortopalette($image, $dither, $ncolors); |
|
2364 | - if ($result === false) { |
|
2365 | - throw ImageException::createFromPhpError(); |
|
2366 | - } |
|
2362 | + error_clear_last(); |
|
2363 | + $result = \imagetruecolortopalette($image, $dither, $ncolors); |
|
2364 | + if ($result === false) { |
|
2365 | + throw ImageException::createFromPhpError(); |
|
2366 | + } |
|
2367 | 2367 | } |
2368 | 2368 | |
2369 | 2369 | |
@@ -2453,12 +2453,12 @@ discard block |
||
2453 | 2453 | */ |
2454 | 2454 | function imagettfbbox(float $size, float $angle, string $fontfile, string $text): array |
2455 | 2455 | { |
2456 | - error_clear_last(); |
|
2457 | - $result = \imagettfbbox($size, $angle, $fontfile, $text); |
|
2458 | - if ($result === false) { |
|
2459 | - throw ImageException::createFromPhpError(); |
|
2460 | - } |
|
2461 | - return $result; |
|
2456 | + error_clear_last(); |
|
2457 | + $result = \imagettfbbox($size, $angle, $fontfile, $text); |
|
2458 | + if ($result === false) { |
|
2459 | + throw ImageException::createFromPhpError(); |
|
2460 | + } |
|
2461 | + return $result; |
|
2462 | 2462 | } |
2463 | 2463 | |
2464 | 2464 | |
@@ -2529,12 +2529,12 @@ discard block |
||
2529 | 2529 | */ |
2530 | 2530 | function imagettftext($image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text): array |
2531 | 2531 | { |
2532 | - error_clear_last(); |
|
2533 | - $result = \imagettftext($image, $size, $angle, $x, $y, $color, $fontfile, $text); |
|
2534 | - if ($result === false) { |
|
2535 | - throw ImageException::createFromPhpError(); |
|
2536 | - } |
|
2537 | - return $result; |
|
2532 | + error_clear_last(); |
|
2533 | + $result = \imagettftext($image, $size, $angle, $x, $y, $color, $fontfile, $text); |
|
2534 | + if ($result === false) { |
|
2535 | + throw ImageException::createFromPhpError(); |
|
2536 | + } |
|
2537 | + return $result; |
|
2538 | 2538 | } |
2539 | 2539 | |
2540 | 2540 | |
@@ -2553,15 +2553,15 @@ discard block |
||
2553 | 2553 | */ |
2554 | 2554 | function imagewbmp($image, $to = null, int $foreground = null): void |
2555 | 2555 | { |
2556 | - error_clear_last(); |
|
2557 | - if ($foreground !== null) { |
|
2558 | - $result = \imagewbmp($image, $to, $foreground); |
|
2559 | - } else { |
|
2560 | - $result = \imagewbmp($image, $to); |
|
2561 | - } |
|
2562 | - if ($result === false) { |
|
2563 | - throw ImageException::createFromPhpError(); |
|
2564 | - } |
|
2556 | + error_clear_last(); |
|
2557 | + if ($foreground !== null) { |
|
2558 | + $result = \imagewbmp($image, $to, $foreground); |
|
2559 | + } else { |
|
2560 | + $result = \imagewbmp($image, $to); |
|
2561 | + } |
|
2562 | + if ($result === false) { |
|
2563 | + throw ImageException::createFromPhpError(); |
|
2564 | + } |
|
2565 | 2565 | } |
2566 | 2566 | |
2567 | 2567 | |
@@ -2578,11 +2578,11 @@ discard block |
||
2578 | 2578 | */ |
2579 | 2579 | function imagewebp($image, $to = null, int $quality = 80): void |
2580 | 2580 | { |
2581 | - error_clear_last(); |
|
2582 | - $result = \imagewebp($image, $to, $quality); |
|
2583 | - if ($result === false) { |
|
2584 | - throw ImageException::createFromPhpError(); |
|
2585 | - } |
|
2581 | + error_clear_last(); |
|
2582 | + $result = \imagewebp($image, $to, $quality); |
|
2583 | + if ($result === false) { |
|
2584 | + throw ImageException::createFromPhpError(); |
|
2585 | + } |
|
2586 | 2586 | } |
2587 | 2587 | |
2588 | 2588 | |
@@ -2608,15 +2608,15 @@ discard block |
||
2608 | 2608 | */ |
2609 | 2609 | function imagexbm($image, ?string $filename, int $foreground = null): void |
2610 | 2610 | { |
2611 | - error_clear_last(); |
|
2612 | - if ($foreground !== null) { |
|
2613 | - $result = \imagexbm($image, $filename, $foreground); |
|
2614 | - } else { |
|
2615 | - $result = \imagexbm($image, $filename); |
|
2616 | - } |
|
2617 | - if ($result === false) { |
|
2618 | - throw ImageException::createFromPhpError(); |
|
2619 | - } |
|
2611 | + error_clear_last(); |
|
2612 | + if ($foreground !== null) { |
|
2613 | + $result = \imagexbm($image, $filename, $foreground); |
|
2614 | + } else { |
|
2615 | + $result = \imagexbm($image, $filename); |
|
2616 | + } |
|
2617 | + if ($result === false) { |
|
2618 | + throw ImageException::createFromPhpError(); |
|
2619 | + } |
|
2620 | 2620 | } |
2621 | 2621 | |
2622 | 2622 | |
@@ -2633,12 +2633,12 @@ discard block |
||
2633 | 2633 | */ |
2634 | 2634 | function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0) |
2635 | 2635 | { |
2636 | - error_clear_last(); |
|
2637 | - $result = \iptcembed($iptcdata, $jpeg_file_name, $spool); |
|
2638 | - if ($result === false) { |
|
2639 | - throw ImageException::createFromPhpError(); |
|
2640 | - } |
|
2641 | - return $result; |
|
2636 | + error_clear_last(); |
|
2637 | + $result = \iptcembed($iptcdata, $jpeg_file_name, $spool); |
|
2638 | + if ($result === false) { |
|
2639 | + throw ImageException::createFromPhpError(); |
|
2640 | + } |
|
2641 | + return $result; |
|
2642 | 2642 | } |
2643 | 2643 | |
2644 | 2644 | |
@@ -2653,12 +2653,12 @@ discard block |
||
2653 | 2653 | */ |
2654 | 2654 | function iptcparse(string $iptcblock): array |
2655 | 2655 | { |
2656 | - error_clear_last(); |
|
2657 | - $result = \iptcparse($iptcblock); |
|
2658 | - if ($result === false) { |
|
2659 | - throw ImageException::createFromPhpError(); |
|
2660 | - } |
|
2661 | - return $result; |
|
2656 | + error_clear_last(); |
|
2657 | + $result = \iptcparse($iptcblock); |
|
2658 | + if ($result === false) { |
|
2659 | + throw ImageException::createFromPhpError(); |
|
2660 | + } |
|
2661 | + return $result; |
|
2662 | 2662 | } |
2663 | 2663 | |
2664 | 2664 | |
@@ -2675,11 +2675,11 @@ discard block |
||
2675 | 2675 | */ |
2676 | 2676 | function jpeg2wbmp(string $jpegname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void |
2677 | 2677 | { |
2678 | - error_clear_last(); |
|
2679 | - $result = \jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold); |
|
2680 | - if ($result === false) { |
|
2681 | - throw ImageException::createFromPhpError(); |
|
2682 | - } |
|
2678 | + error_clear_last(); |
|
2679 | + $result = \jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold); |
|
2680 | + if ($result === false) { |
|
2681 | + throw ImageException::createFromPhpError(); |
|
2682 | + } |
|
2683 | 2683 | } |
2684 | 2684 | |
2685 | 2685 | |
@@ -2696,9 +2696,9 @@ discard block |
||
2696 | 2696 | */ |
2697 | 2697 | function png2wbmp(string $pngname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void |
2698 | 2698 | { |
2699 | - error_clear_last(); |
|
2700 | - $result = \png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold); |
|
2701 | - if ($result === false) { |
|
2702 | - throw ImageException::createFromPhpError(); |
|
2703 | - } |
|
2699 | + error_clear_last(); |
|
2700 | + $result = \png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold); |
|
2701 | + if ($result === false) { |
|
2702 | + throw ImageException::createFromPhpError(); |
|
2703 | + } |
|
2704 | 2704 | } |
@@ -15,9 +15,9 @@ |
||
15 | 15 | */ |
16 | 16 | function rrd_create(string $filename, array $options): void |
17 | 17 | { |
18 | - error_clear_last(); |
|
19 | - $result = \rrd_create($filename, $options); |
|
20 | - if ($result === false) { |
|
21 | - throw RrdException::createFromPhpError(); |
|
22 | - } |
|
18 | + error_clear_last(); |
|
19 | + $result = \rrd_create($filename, $options); |
|
20 | + if ($result === false) { |
|
21 | + throw RrdException::createFromPhpError(); |
|
22 | + } |
|
23 | 23 | } |
@@ -88,12 +88,12 @@ discard block |
||
88 | 88 | */ |
89 | 89 | function proc_get_status($process): array |
90 | 90 | { |
91 | - error_clear_last(); |
|
92 | - $result = \proc_get_status($process); |
|
93 | - if ($result === false) { |
|
94 | - throw ExecException::createFromPhpError(); |
|
95 | - } |
|
96 | - return $result; |
|
91 | + error_clear_last(); |
|
92 | + $result = \proc_get_status($process); |
|
93 | + if ($result === false) { |
|
94 | + throw ExecException::createFromPhpError(); |
|
95 | + } |
|
96 | + return $result; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | */ |
120 | 120 | function proc_nice(int $increment): void |
121 | 121 | { |
122 | - error_clear_last(); |
|
123 | - $result = \proc_nice($increment); |
|
124 | - if ($result === false) { |
|
125 | - throw ExecException::createFromPhpError(); |
|
126 | - } |
|
122 | + error_clear_last(); |
|
123 | + $result = \proc_nice($increment); |
|
124 | + if ($result === false) { |
|
125 | + throw ExecException::createFromPhpError(); |
|
126 | + } |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | */ |
151 | 151 | function system(string $command, int &$return_var = null): string |
152 | 152 | { |
153 | - error_clear_last(); |
|
154 | - $result = \system($command, $return_var); |
|
155 | - if ($result === false) { |
|
156 | - throw ExecException::createFromPhpError(); |
|
157 | - } |
|
158 | - return $result; |
|
153 | + error_clear_last(); |
|
154 | + $result = \system($command, $return_var); |
|
155 | + if ($result === false) { |
|
156 | + throw ExecException::createFromPhpError(); |
|
157 | + } |
|
158 | + return $result; |
|
159 | 159 | } |
@@ -7,1075 +7,1075 @@ |
||
7 | 7 | |
8 | 8 | # This file configures rector/rector:~0.7.0 to replace all PHP functions with their equivalent "safe" functions |
9 | 9 | return static function (ContainerConfigurator $containerConfigurator): void { |
10 | - $services = $containerConfigurator->services(); |
|
10 | + $services = $containerConfigurator->services(); |
|
11 | 11 | |
12 | - $services->set(RenameFunctionRector::class) |
|
13 | - ->call('configure', [[ RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => [ |
|
14 | - 'apache_getenv' => 'Safe\apache_getenv', |
|
15 | - 'apache_get_version' => 'Safe\apache_get_version', |
|
16 | - 'apache_request_headers' => 'Safe\apache_request_headers', |
|
17 | - 'apache_reset_timeout' => 'Safe\apache_reset_timeout', |
|
18 | - 'apache_response_headers' => 'Safe\apache_response_headers', |
|
19 | - 'apache_setenv' => 'Safe\apache_setenv', |
|
20 | - 'apcu_cache_info' => 'Safe\apcu_cache_info', |
|
21 | - 'apcu_cas' => 'Safe\apcu_cas', |
|
22 | - 'apcu_dec' => 'Safe\apcu_dec', |
|
23 | - 'apcu_fetch' => 'Safe\apcu_fetch', |
|
24 | - 'apcu_inc' => 'Safe\apcu_inc', |
|
25 | - 'apcu_sma_info' => 'Safe\apcu_sma_info', |
|
26 | - 'apc_fetch' => 'Safe\apc_fetch', |
|
27 | - 'array_combine' => 'Safe\array_combine', |
|
28 | - 'array_flip' => 'Safe\array_flip', |
|
29 | - 'array_replace' => 'Safe\array_replace', |
|
30 | - 'array_replace_recursive' => 'Safe\array_replace_recursive', |
|
31 | - 'array_walk_recursive' => 'Safe\array_walk_recursive', |
|
32 | - 'arsort' => 'Safe\arsort', |
|
33 | - 'asort' => 'Safe\asort', |
|
34 | - 'base64_decode' => 'Safe\base64_decode', |
|
35 | - 'bzclose' => 'Safe\bzclose', |
|
36 | - 'bzflush' => 'Safe\bzflush', |
|
37 | - 'bzread' => 'Safe\bzread', |
|
38 | - 'bzwrite' => 'Safe\bzwrite', |
|
39 | - 'chdir' => 'Safe\chdir', |
|
40 | - 'chgrp' => 'Safe\chgrp', |
|
41 | - 'chmod' => 'Safe\chmod', |
|
42 | - 'chown' => 'Safe\chown', |
|
43 | - 'chroot' => 'Safe\chroot', |
|
44 | - 'class_alias' => 'Safe\class_alias', |
|
45 | - 'class_implements' => 'Safe\class_implements', |
|
46 | - 'class_parents' => 'Safe\class_parents', |
|
47 | - 'class_uses' => 'Safe\class_uses', |
|
48 | - 'cli_set_process_title' => 'Safe\cli_set_process_title', |
|
49 | - 'closelog' => 'Safe\closelog', |
|
50 | - 'com_event_sink' => 'Safe\com_event_sink', |
|
51 | - 'com_load_typelib' => 'Safe\com_load_typelib', |
|
52 | - 'com_print_typeinfo' => 'Safe\com_print_typeinfo', |
|
53 | - 'convert_uudecode' => 'Safe\convert_uudecode', |
|
54 | - 'convert_uuencode' => 'Safe\convert_uuencode', |
|
55 | - 'copy' => 'Safe\copy', |
|
56 | - 'create_function' => 'Safe\create_function', |
|
57 | - 'cubrid_free_result' => 'Safe\cubrid_free_result', |
|
58 | - 'cubrid_get_charset' => 'Safe\cubrid_get_charset', |
|
59 | - 'cubrid_get_client_info' => 'Safe\cubrid_get_client_info', |
|
60 | - 'cubrid_get_db_parameter' => 'Safe\cubrid_get_db_parameter', |
|
61 | - 'cubrid_get_server_info' => 'Safe\cubrid_get_server_info', |
|
62 | - 'cubrid_insert_id' => 'Safe\cubrid_insert_id', |
|
63 | - 'cubrid_lob2_new' => 'Safe\cubrid_lob2_new', |
|
64 | - 'cubrid_lob2_size' => 'Safe\cubrid_lob2_size', |
|
65 | - 'cubrid_lob2_size64' => 'Safe\cubrid_lob2_size64', |
|
66 | - 'cubrid_lob2_tell' => 'Safe\cubrid_lob2_tell', |
|
67 | - 'cubrid_lob2_tell64' => 'Safe\cubrid_lob2_tell64', |
|
68 | - 'cubrid_set_db_parameter' => 'Safe\cubrid_set_db_parameter', |
|
69 | - 'curl_escape' => 'Safe\curl_escape', |
|
70 | - 'curl_exec' => 'Safe\curl_exec', |
|
71 | - 'curl_getinfo' => 'Safe\curl_getinfo', |
|
72 | - 'curl_init' => 'Safe\curl_init', |
|
73 | - 'curl_multi_errno' => 'Safe\curl_multi_errno', |
|
74 | - 'curl_multi_info_read' => 'Safe\curl_multi_info_read', |
|
75 | - 'curl_multi_init' => 'Safe\curl_multi_init', |
|
76 | - 'curl_setopt' => 'Safe\curl_setopt', |
|
77 | - 'curl_share_errno' => 'Safe\curl_share_errno', |
|
78 | - 'curl_share_setopt' => 'Safe\curl_share_setopt', |
|
79 | - 'curl_unescape' => 'Safe\curl_unescape', |
|
80 | - 'date' => 'Safe\date', |
|
81 | - 'date_parse' => 'Safe\date_parse', |
|
82 | - 'date_parse_from_format' => 'Safe\date_parse_from_format', |
|
83 | - 'date_sunrise' => 'Safe\date_sunrise', |
|
84 | - 'date_sunset' => 'Safe\date_sunset', |
|
85 | - 'date_sun_info' => 'Safe\date_sun_info', |
|
86 | - 'db2_autocommit' => 'Safe\db2_autocommit', |
|
87 | - 'db2_bind_param' => 'Safe\db2_bind_param', |
|
88 | - 'db2_client_info' => 'Safe\db2_client_info', |
|
89 | - 'db2_close' => 'Safe\db2_close', |
|
90 | - 'db2_commit' => 'Safe\db2_commit', |
|
91 | - 'db2_execute' => 'Safe\db2_execute', |
|
92 | - 'db2_free_result' => 'Safe\db2_free_result', |
|
93 | - 'db2_free_stmt' => 'Safe\db2_free_stmt', |
|
94 | - 'db2_get_option' => 'Safe\db2_get_option', |
|
95 | - 'db2_pclose' => 'Safe\db2_pclose', |
|
96 | - 'db2_rollback' => 'Safe\db2_rollback', |
|
97 | - 'db2_server_info' => 'Safe\db2_server_info', |
|
98 | - 'db2_set_option' => 'Safe\db2_set_option', |
|
99 | - 'define' => 'Safe\define', |
|
100 | - 'deflate_add' => 'Safe\deflate_add', |
|
101 | - 'deflate_init' => 'Safe\deflate_init', |
|
102 | - 'disk_free_space' => 'Safe\disk_free_space', |
|
103 | - 'disk_total_space' => 'Safe\disk_total_space', |
|
104 | - 'dl' => 'Safe\dl', |
|
105 | - 'dns_get_record' => 'Safe\dns_get_record', |
|
106 | - 'eio_busy' => 'Safe\eio_busy', |
|
107 | - 'eio_chmod' => 'Safe\eio_chmod', |
|
108 | - 'eio_chown' => 'Safe\eio_chown', |
|
109 | - 'eio_close' => 'Safe\eio_close', |
|
110 | - 'eio_custom' => 'Safe\eio_custom', |
|
111 | - 'eio_dup2' => 'Safe\eio_dup2', |
|
112 | - 'eio_event_loop' => 'Safe\eio_event_loop', |
|
113 | - 'eio_fallocate' => 'Safe\eio_fallocate', |
|
114 | - 'eio_fchmod' => 'Safe\eio_fchmod', |
|
115 | - 'eio_fdatasync' => 'Safe\eio_fdatasync', |
|
116 | - 'eio_fstat' => 'Safe\eio_fstat', |
|
117 | - 'eio_fstatvfs' => 'Safe\eio_fstatvfs', |
|
118 | - 'eio_fsync' => 'Safe\eio_fsync', |
|
119 | - 'eio_ftruncate' => 'Safe\eio_ftruncate', |
|
120 | - 'eio_futime' => 'Safe\eio_futime', |
|
121 | - 'eio_grp' => 'Safe\eio_grp', |
|
122 | - 'eio_lstat' => 'Safe\eio_lstat', |
|
123 | - 'eio_mkdir' => 'Safe\eio_mkdir', |
|
124 | - 'eio_mknod' => 'Safe\eio_mknod', |
|
125 | - 'eio_nop' => 'Safe\eio_nop', |
|
126 | - 'eio_readahead' => 'Safe\eio_readahead', |
|
127 | - 'eio_readdir' => 'Safe\eio_readdir', |
|
128 | - 'eio_readlink' => 'Safe\eio_readlink', |
|
129 | - 'eio_rename' => 'Safe\eio_rename', |
|
130 | - 'eio_rmdir' => 'Safe\eio_rmdir', |
|
131 | - 'eio_seek' => 'Safe\eio_seek', |
|
132 | - 'eio_sendfile' => 'Safe\eio_sendfile', |
|
133 | - 'eio_stat' => 'Safe\eio_stat', |
|
134 | - 'eio_statvfs' => 'Safe\eio_statvfs', |
|
135 | - 'eio_symlink' => 'Safe\eio_symlink', |
|
136 | - 'eio_sync' => 'Safe\eio_sync', |
|
137 | - 'eio_syncfs' => 'Safe\eio_syncfs', |
|
138 | - 'eio_sync_file_range' => 'Safe\eio_sync_file_range', |
|
139 | - 'eio_truncate' => 'Safe\eio_truncate', |
|
140 | - 'eio_unlink' => 'Safe\eio_unlink', |
|
141 | - 'eio_utime' => 'Safe\eio_utime', |
|
142 | - 'eio_write' => 'Safe\eio_write', |
|
143 | - 'error_log' => 'Safe\error_log', |
|
144 | - 'fastcgi_finish_request' => 'Safe\fastcgi_finish_request', |
|
145 | - 'fbird_blob_cancel' => 'Safe\fbird_blob_cancel', |
|
146 | - 'fclose' => 'Safe\fclose', |
|
147 | - 'fflush' => 'Safe\fflush', |
|
148 | - 'file' => 'Safe\file', |
|
149 | - 'fileatime' => 'Safe\fileatime', |
|
150 | - 'filectime' => 'Safe\filectime', |
|
151 | - 'fileinode' => 'Safe\fileinode', |
|
152 | - 'filemtime' => 'Safe\filemtime', |
|
153 | - 'fileowner' => 'Safe\fileowner', |
|
154 | - 'filesize' => 'Safe\filesize', |
|
155 | - 'file_get_contents' => 'Safe\file_get_contents', |
|
156 | - 'file_put_contents' => 'Safe\file_put_contents', |
|
157 | - 'filter_input_array' => 'Safe\filter_input_array', |
|
158 | - 'filter_var_array' => 'Safe\filter_var_array', |
|
159 | - 'finfo_close' => 'Safe\finfo_close', |
|
160 | - 'finfo_open' => 'Safe\finfo_open', |
|
161 | - 'flock' => 'Safe\flock', |
|
162 | - 'fopen' => 'Safe\fopen', |
|
163 | - 'fputcsv' => 'Safe\fputcsv', |
|
164 | - 'fread' => 'Safe\fread', |
|
165 | - 'fsockopen' => 'Safe\fsockopen', |
|
166 | - 'ftp_alloc' => 'Safe\ftp_alloc', |
|
167 | - 'ftp_append' => 'Safe\ftp_append', |
|
168 | - 'ftp_cdup' => 'Safe\ftp_cdup', |
|
169 | - 'ftp_chdir' => 'Safe\ftp_chdir', |
|
170 | - 'ftp_chmod' => 'Safe\ftp_chmod', |
|
171 | - 'ftp_close' => 'Safe\ftp_close', |
|
172 | - 'ftp_connect' => 'Safe\ftp_connect', |
|
173 | - 'ftp_delete' => 'Safe\ftp_delete', |
|
174 | - 'ftp_fget' => 'Safe\ftp_fget', |
|
175 | - 'ftp_fput' => 'Safe\ftp_fput', |
|
176 | - 'ftp_get' => 'Safe\ftp_get', |
|
177 | - 'ftp_login' => 'Safe\ftp_login', |
|
178 | - 'ftp_mkdir' => 'Safe\ftp_mkdir', |
|
179 | - 'ftp_mlsd' => 'Safe\ftp_mlsd', |
|
180 | - 'ftp_nlist' => 'Safe\ftp_nlist', |
|
181 | - 'ftp_pasv' => 'Safe\ftp_pasv', |
|
182 | - 'ftp_put' => 'Safe\ftp_put', |
|
183 | - 'ftp_pwd' => 'Safe\ftp_pwd', |
|
184 | - 'ftp_rename' => 'Safe\ftp_rename', |
|
185 | - 'ftp_rmdir' => 'Safe\ftp_rmdir', |
|
186 | - 'ftp_site' => 'Safe\ftp_site', |
|
187 | - 'ftp_ssl_connect' => 'Safe\ftp_ssl_connect', |
|
188 | - 'ftp_systype' => 'Safe\ftp_systype', |
|
189 | - 'ftruncate' => 'Safe\ftruncate', |
|
190 | - 'fwrite' => 'Safe\fwrite', |
|
191 | - 'getallheaders' => 'Safe\getallheaders', |
|
192 | - 'getcwd' => 'Safe\getcwd', |
|
193 | - 'gethostname' => 'Safe\gethostname', |
|
194 | - 'getimagesize' => 'Safe\getimagesize', |
|
195 | - 'getlastmod' => 'Safe\getlastmod', |
|
196 | - 'getmygid' => 'Safe\getmygid', |
|
197 | - 'getmyinode' => 'Safe\getmyinode', |
|
198 | - 'getmypid' => 'Safe\getmypid', |
|
199 | - 'getmyuid' => 'Safe\getmyuid', |
|
200 | - 'getopt' => 'Safe\getopt', |
|
201 | - 'getprotobyname' => 'Safe\getprotobyname', |
|
202 | - 'getprotobynumber' => 'Safe\getprotobynumber', |
|
203 | - 'get_headers' => 'Safe\get_headers', |
|
204 | - 'glob' => 'Safe\glob', |
|
205 | - 'gmdate' => 'Safe\gmdate', |
|
206 | - 'gmp_binomial' => 'Safe\gmp_binomial', |
|
207 | - 'gmp_export' => 'Safe\gmp_export', |
|
208 | - 'gmp_import' => 'Safe\gmp_import', |
|
209 | - 'gmp_random_seed' => 'Safe\gmp_random_seed', |
|
210 | - 'gnupg_adddecryptkey' => 'Safe\gnupg_adddecryptkey', |
|
211 | - 'gnupg_addencryptkey' => 'Safe\gnupg_addencryptkey', |
|
212 | - 'gnupg_addsignkey' => 'Safe\gnupg_addsignkey', |
|
213 | - 'gnupg_cleardecryptkeys' => 'Safe\gnupg_cleardecryptkeys', |
|
214 | - 'gnupg_clearencryptkeys' => 'Safe\gnupg_clearencryptkeys', |
|
215 | - 'gnupg_clearsignkeys' => 'Safe\gnupg_clearsignkeys', |
|
216 | - 'gnupg_setarmor' => 'Safe\gnupg_setarmor', |
|
217 | - 'gnupg_setsignmode' => 'Safe\gnupg_setsignmode', |
|
218 | - 'gzclose' => 'Safe\gzclose', |
|
219 | - 'gzcompress' => 'Safe\gzcompress', |
|
220 | - 'gzdecode' => 'Safe\gzdecode', |
|
221 | - 'gzdeflate' => 'Safe\gzdeflate', |
|
222 | - 'gzencode' => 'Safe\gzencode', |
|
223 | - 'gzgets' => 'Safe\gzgets', |
|
224 | - 'gzgetss' => 'Safe\gzgetss', |
|
225 | - 'gzinflate' => 'Safe\gzinflate', |
|
226 | - 'gzpassthru' => 'Safe\gzpassthru', |
|
227 | - 'gzrewind' => 'Safe\gzrewind', |
|
228 | - 'gzuncompress' => 'Safe\gzuncompress', |
|
229 | - 'hash_hkdf' => 'Safe\hash_hkdf', |
|
230 | - 'hash_update_file' => 'Safe\hash_update_file', |
|
231 | - 'header_register_callback' => 'Safe\header_register_callback', |
|
232 | - 'hex2bin' => 'Safe\hex2bin', |
|
233 | - 'highlight_file' => 'Safe\highlight_file', |
|
234 | - 'highlight_string' => 'Safe\highlight_string', |
|
235 | - 'ibase_add_user' => 'Safe\ibase_add_user', |
|
236 | - 'ibase_backup' => 'Safe\ibase_backup', |
|
237 | - 'ibase_blob_cancel' => 'Safe\ibase_blob_cancel', |
|
238 | - 'ibase_blob_create' => 'Safe\ibase_blob_create', |
|
239 | - 'ibase_blob_get' => 'Safe\ibase_blob_get', |
|
240 | - 'ibase_close' => 'Safe\ibase_close', |
|
241 | - 'ibase_commit' => 'Safe\ibase_commit', |
|
242 | - 'ibase_commit_ret' => 'Safe\ibase_commit_ret', |
|
243 | - 'ibase_connect' => 'Safe\ibase_connect', |
|
244 | - 'ibase_delete_user' => 'Safe\ibase_delete_user', |
|
245 | - 'ibase_drop_db' => 'Safe\ibase_drop_db', |
|
246 | - 'ibase_free_event_handler' => 'Safe\ibase_free_event_handler', |
|
247 | - 'ibase_free_query' => 'Safe\ibase_free_query', |
|
248 | - 'ibase_free_result' => 'Safe\ibase_free_result', |
|
249 | - 'ibase_maintain_db' => 'Safe\ibase_maintain_db', |
|
250 | - 'ibase_modify_user' => 'Safe\ibase_modify_user', |
|
251 | - 'ibase_name_result' => 'Safe\ibase_name_result', |
|
252 | - 'ibase_pconnect' => 'Safe\ibase_pconnect', |
|
253 | - 'ibase_restore' => 'Safe\ibase_restore', |
|
254 | - 'ibase_rollback' => 'Safe\ibase_rollback', |
|
255 | - 'ibase_rollback_ret' => 'Safe\ibase_rollback_ret', |
|
256 | - 'ibase_service_attach' => 'Safe\ibase_service_attach', |
|
257 | - 'ibase_service_detach' => 'Safe\ibase_service_detach', |
|
258 | - 'iconv' => 'Safe\iconv', |
|
259 | - 'iconv_get_encoding' => 'Safe\iconv_get_encoding', |
|
260 | - 'iconv_set_encoding' => 'Safe\iconv_set_encoding', |
|
261 | - 'image2wbmp' => 'Safe\image2wbmp', |
|
262 | - 'imageaffine' => 'Safe\imageaffine', |
|
263 | - 'imageaffinematrixconcat' => 'Safe\imageaffinematrixconcat', |
|
264 | - 'imageaffinematrixget' => 'Safe\imageaffinematrixget', |
|
265 | - 'imagealphablending' => 'Safe\imagealphablending', |
|
266 | - 'imageantialias' => 'Safe\imageantialias', |
|
267 | - 'imagearc' => 'Safe\imagearc', |
|
268 | - 'imagebmp' => 'Safe\imagebmp', |
|
269 | - 'imagechar' => 'Safe\imagechar', |
|
270 | - 'imagecharup' => 'Safe\imagecharup', |
|
271 | - 'imagecolorat' => 'Safe\imagecolorat', |
|
272 | - 'imagecolordeallocate' => 'Safe\imagecolordeallocate', |
|
273 | - 'imagecolormatch' => 'Safe\imagecolormatch', |
|
274 | - 'imageconvolution' => 'Safe\imageconvolution', |
|
275 | - 'imagecopy' => 'Safe\imagecopy', |
|
276 | - 'imagecopymerge' => 'Safe\imagecopymerge', |
|
277 | - 'imagecopymergegray' => 'Safe\imagecopymergegray', |
|
278 | - 'imagecopyresampled' => 'Safe\imagecopyresampled', |
|
279 | - 'imagecopyresized' => 'Safe\imagecopyresized', |
|
280 | - 'imagecreate' => 'Safe\imagecreate', |
|
281 | - 'imagecreatefrombmp' => 'Safe\imagecreatefrombmp', |
|
282 | - 'imagecreatefromgd' => 'Safe\imagecreatefromgd', |
|
283 | - 'imagecreatefromgd2' => 'Safe\imagecreatefromgd2', |
|
284 | - 'imagecreatefromgd2part' => 'Safe\imagecreatefromgd2part', |
|
285 | - 'imagecreatefromgif' => 'Safe\imagecreatefromgif', |
|
286 | - 'imagecreatefromjpeg' => 'Safe\imagecreatefromjpeg', |
|
287 | - 'imagecreatefrompng' => 'Safe\imagecreatefrompng', |
|
288 | - 'imagecreatefromwbmp' => 'Safe\imagecreatefromwbmp', |
|
289 | - 'imagecreatefromwebp' => 'Safe\imagecreatefromwebp', |
|
290 | - 'imagecreatefromxbm' => 'Safe\imagecreatefromxbm', |
|
291 | - 'imagecreatefromxpm' => 'Safe\imagecreatefromxpm', |
|
292 | - 'imagecreatetruecolor' => 'Safe\imagecreatetruecolor', |
|
293 | - 'imagecrop' => 'Safe\imagecrop', |
|
294 | - 'imagecropauto' => 'Safe\imagecropauto', |
|
295 | - 'imagedashedline' => 'Safe\imagedashedline', |
|
296 | - 'imagedestroy' => 'Safe\imagedestroy', |
|
297 | - 'imageellipse' => 'Safe\imageellipse', |
|
298 | - 'imagefill' => 'Safe\imagefill', |
|
299 | - 'imagefilledarc' => 'Safe\imagefilledarc', |
|
300 | - 'imagefilledellipse' => 'Safe\imagefilledellipse', |
|
301 | - 'imagefilledpolygon' => 'Safe\imagefilledpolygon', |
|
302 | - 'imagefilledrectangle' => 'Safe\imagefilledrectangle', |
|
303 | - 'imagefilltoborder' => 'Safe\imagefilltoborder', |
|
304 | - 'imagefilter' => 'Safe\imagefilter', |
|
305 | - 'imageflip' => 'Safe\imageflip', |
|
306 | - 'imagegammacorrect' => 'Safe\imagegammacorrect', |
|
307 | - 'imagegd' => 'Safe\imagegd', |
|
308 | - 'imagegd2' => 'Safe\imagegd2', |
|
309 | - 'imagegif' => 'Safe\imagegif', |
|
310 | - 'imagegrabscreen' => 'Safe\imagegrabscreen', |
|
311 | - 'imagegrabwindow' => 'Safe\imagegrabwindow', |
|
312 | - 'imagejpeg' => 'Safe\imagejpeg', |
|
313 | - 'imagelayereffect' => 'Safe\imagelayereffect', |
|
314 | - 'imageline' => 'Safe\imageline', |
|
315 | - 'imageloadfont' => 'Safe\imageloadfont', |
|
316 | - 'imageopenpolygon' => 'Safe\imageopenpolygon', |
|
317 | - 'imagepng' => 'Safe\imagepng', |
|
318 | - 'imagepolygon' => 'Safe\imagepolygon', |
|
319 | - 'imagerectangle' => 'Safe\imagerectangle', |
|
320 | - 'imagerotate' => 'Safe\imagerotate', |
|
321 | - 'imagesavealpha' => 'Safe\imagesavealpha', |
|
322 | - 'imagescale' => 'Safe\imagescale', |
|
323 | - 'imagesetbrush' => 'Safe\imagesetbrush', |
|
324 | - 'imagesetclip' => 'Safe\imagesetclip', |
|
325 | - 'imagesetinterpolation' => 'Safe\imagesetinterpolation', |
|
326 | - 'imagesetpixel' => 'Safe\imagesetpixel', |
|
327 | - 'imagesetstyle' => 'Safe\imagesetstyle', |
|
328 | - 'imagesetthickness' => 'Safe\imagesetthickness', |
|
329 | - 'imagesettile' => 'Safe\imagesettile', |
|
330 | - 'imagestring' => 'Safe\imagestring', |
|
331 | - 'imagestringup' => 'Safe\imagestringup', |
|
332 | - 'imagesx' => 'Safe\imagesx', |
|
333 | - 'imagesy' => 'Safe\imagesy', |
|
334 | - 'imagetruecolortopalette' => 'Safe\imagetruecolortopalette', |
|
335 | - 'imagettfbbox' => 'Safe\imagettfbbox', |
|
336 | - 'imagettftext' => 'Safe\imagettftext', |
|
337 | - 'imagewbmp' => 'Safe\imagewbmp', |
|
338 | - 'imagewebp' => 'Safe\imagewebp', |
|
339 | - 'imagexbm' => 'Safe\imagexbm', |
|
340 | - 'imap_append' => 'Safe\imap_append', |
|
341 | - 'imap_check' => 'Safe\imap_check', |
|
342 | - 'imap_clearflag_full' => 'Safe\imap_clearflag_full', |
|
343 | - 'imap_close' => 'Safe\imap_close', |
|
344 | - 'imap_createmailbox' => 'Safe\imap_createmailbox', |
|
345 | - 'imap_deletemailbox' => 'Safe\imap_deletemailbox', |
|
346 | - 'imap_fetchstructure' => 'Safe\imap_fetchstructure', |
|
347 | - 'imap_gc' => 'Safe\imap_gc', |
|
348 | - 'imap_headerinfo' => 'Safe\imap_headerinfo', |
|
349 | - 'imap_mail' => 'Safe\imap_mail', |
|
350 | - 'imap_mailboxmsginfo' => 'Safe\imap_mailboxmsginfo', |
|
351 | - 'imap_mail_compose' => 'Safe\imap_mail_compose', |
|
352 | - 'imap_mail_copy' => 'Safe\imap_mail_copy', |
|
353 | - 'imap_mail_move' => 'Safe\imap_mail_move', |
|
354 | - 'imap_mutf7_to_utf8' => 'Safe\imap_mutf7_to_utf8', |
|
355 | - 'imap_num_msg' => 'Safe\imap_num_msg', |
|
356 | - 'imap_open' => 'Safe\imap_open', |
|
357 | - 'imap_renamemailbox' => 'Safe\imap_renamemailbox', |
|
358 | - 'imap_savebody' => 'Safe\imap_savebody', |
|
359 | - 'imap_setacl' => 'Safe\imap_setacl', |
|
360 | - 'imap_setflag_full' => 'Safe\imap_setflag_full', |
|
361 | - 'imap_set_quota' => 'Safe\imap_set_quota', |
|
362 | - 'imap_sort' => 'Safe\imap_sort', |
|
363 | - 'imap_subscribe' => 'Safe\imap_subscribe', |
|
364 | - 'imap_thread' => 'Safe\imap_thread', |
|
365 | - 'imap_timeout' => 'Safe\imap_timeout', |
|
366 | - 'imap_undelete' => 'Safe\imap_undelete', |
|
367 | - 'imap_unsubscribe' => 'Safe\imap_unsubscribe', |
|
368 | - 'imap_utf8_to_mutf7' => 'Safe\imap_utf8_to_mutf7', |
|
369 | - 'inet_ntop' => 'Safe\inet_ntop', |
|
370 | - 'inflate_add' => 'Safe\inflate_add', |
|
371 | - 'inflate_get_read_len' => 'Safe\inflate_get_read_len', |
|
372 | - 'inflate_get_status' => 'Safe\inflate_get_status', |
|
373 | - 'inflate_init' => 'Safe\inflate_init', |
|
374 | - 'ingres_autocommit' => 'Safe\ingres_autocommit', |
|
375 | - 'ingres_close' => 'Safe\ingres_close', |
|
376 | - 'ingres_commit' => 'Safe\ingres_commit', |
|
377 | - 'ingres_connect' => 'Safe\ingres_connect', |
|
378 | - 'ingres_execute' => 'Safe\ingres_execute', |
|
379 | - 'ingres_field_name' => 'Safe\ingres_field_name', |
|
380 | - 'ingres_field_type' => 'Safe\ingres_field_type', |
|
381 | - 'ingres_free_result' => 'Safe\ingres_free_result', |
|
382 | - 'ingres_pconnect' => 'Safe\ingres_pconnect', |
|
383 | - 'ingres_result_seek' => 'Safe\ingres_result_seek', |
|
384 | - 'ingres_rollback' => 'Safe\ingres_rollback', |
|
385 | - 'ingres_set_environment' => 'Safe\ingres_set_environment', |
|
386 | - 'ini_get' => 'Safe\ini_get', |
|
387 | - 'ini_set' => 'Safe\ini_set', |
|
388 | - 'inotify_init' => 'Safe\inotify_init', |
|
389 | - 'inotify_rm_watch' => 'Safe\inotify_rm_watch', |
|
390 | - 'iptcembed' => 'Safe\iptcembed', |
|
391 | - 'iptcparse' => 'Safe\iptcparse', |
|
392 | - 'jdtounix' => 'Safe\jdtounix', |
|
393 | - 'jpeg2wbmp' => 'Safe\jpeg2wbmp', |
|
394 | - 'json_decode' => 'Safe\json_decode', |
|
395 | - 'json_encode' => 'Safe\json_encode', |
|
396 | - 'json_last_error_msg' => 'Safe\json_last_error_msg', |
|
397 | - 'krsort' => 'Safe\krsort', |
|
398 | - 'ksort' => 'Safe\ksort', |
|
399 | - 'lchgrp' => 'Safe\lchgrp', |
|
400 | - 'lchown' => 'Safe\lchown', |
|
401 | - 'ldap_add' => 'Safe\ldap_add', |
|
402 | - 'ldap_add_ext' => 'Safe\ldap_add_ext', |
|
403 | - 'ldap_bind' => 'Safe\ldap_bind', |
|
404 | - 'ldap_bind_ext' => 'Safe\ldap_bind_ext', |
|
405 | - 'ldap_control_paged_result' => 'Safe\ldap_control_paged_result', |
|
406 | - 'ldap_control_paged_result_response' => 'Safe\ldap_control_paged_result_response', |
|
407 | - 'ldap_count_entries' => 'Safe\ldap_count_entries', |
|
408 | - 'ldap_delete' => 'Safe\ldap_delete', |
|
409 | - 'ldap_delete_ext' => 'Safe\ldap_delete_ext', |
|
410 | - 'ldap_exop' => 'Safe\ldap_exop', |
|
411 | - 'ldap_exop_passwd' => 'Safe\ldap_exop_passwd', |
|
412 | - 'ldap_exop_whoami' => 'Safe\ldap_exop_whoami', |
|
413 | - 'ldap_explode_dn' => 'Safe\ldap_explode_dn', |
|
414 | - 'ldap_first_attribute' => 'Safe\ldap_first_attribute', |
|
415 | - 'ldap_first_entry' => 'Safe\ldap_first_entry', |
|
416 | - 'ldap_free_result' => 'Safe\ldap_free_result', |
|
417 | - 'ldap_get_attributes' => 'Safe\ldap_get_attributes', |
|
418 | - 'ldap_get_dn' => 'Safe\ldap_get_dn', |
|
419 | - 'ldap_get_entries' => 'Safe\ldap_get_entries', |
|
420 | - 'ldap_get_option' => 'Safe\ldap_get_option', |
|
421 | - 'ldap_get_values' => 'Safe\ldap_get_values', |
|
422 | - 'ldap_get_values_len' => 'Safe\ldap_get_values_len', |
|
423 | - 'ldap_list' => 'Safe\ldap_list', |
|
424 | - 'ldap_modify_batch' => 'Safe\ldap_modify_batch', |
|
425 | - 'ldap_mod_add' => 'Safe\ldap_mod_add', |
|
426 | - 'ldap_mod_add_ext' => 'Safe\ldap_mod_add_ext', |
|
427 | - 'ldap_mod_del' => 'Safe\ldap_mod_del', |
|
428 | - 'ldap_mod_del_ext' => 'Safe\ldap_mod_del_ext', |
|
429 | - 'ldap_mod_replace' => 'Safe\ldap_mod_replace', |
|
430 | - 'ldap_mod_replace_ext' => 'Safe\ldap_mod_replace_ext', |
|
431 | - 'ldap_next_attribute' => 'Safe\ldap_next_attribute', |
|
432 | - 'ldap_parse_exop' => 'Safe\ldap_parse_exop', |
|
433 | - 'ldap_parse_result' => 'Safe\ldap_parse_result', |
|
434 | - 'ldap_read' => 'Safe\ldap_read', |
|
435 | - 'ldap_rename' => 'Safe\ldap_rename', |
|
436 | - 'ldap_rename_ext' => 'Safe\ldap_rename_ext', |
|
437 | - 'ldap_sasl_bind' => 'Safe\ldap_sasl_bind', |
|
438 | - 'ldap_search' => 'Safe\ldap_search', |
|
439 | - 'ldap_set_option' => 'Safe\ldap_set_option', |
|
440 | - 'ldap_unbind' => 'Safe\ldap_unbind', |
|
441 | - 'libxml_get_last_error' => 'Safe\libxml_get_last_error', |
|
442 | - 'libxml_set_external_entity_loader' => 'Safe\libxml_set_external_entity_loader', |
|
443 | - 'link' => 'Safe\link', |
|
444 | - 'lzf_compress' => 'Safe\lzf_compress', |
|
445 | - 'lzf_decompress' => 'Safe\lzf_decompress', |
|
446 | - 'mailparse_msg_extract_part_file' => 'Safe\mailparse_msg_extract_part_file', |
|
447 | - 'mailparse_msg_free' => 'Safe\mailparse_msg_free', |
|
448 | - 'mailparse_msg_parse' => 'Safe\mailparse_msg_parse', |
|
449 | - 'mailparse_msg_parse_file' => 'Safe\mailparse_msg_parse_file', |
|
450 | - 'mailparse_stream_encode' => 'Safe\mailparse_stream_encode', |
|
451 | - 'mb_chr' => 'Safe\mb_chr', |
|
452 | - 'mb_detect_order' => 'Safe\mb_detect_order', |
|
453 | - 'mb_encoding_aliases' => 'Safe\mb_encoding_aliases', |
|
454 | - 'mb_eregi_replace' => 'Safe\mb_eregi_replace', |
|
455 | - 'mb_ereg_replace' => 'Safe\mb_ereg_replace', |
|
456 | - 'mb_ereg_replace_callback' => 'Safe\mb_ereg_replace_callback', |
|
457 | - 'mb_ereg_search_getregs' => 'Safe\mb_ereg_search_getregs', |
|
458 | - 'mb_ereg_search_init' => 'Safe\mb_ereg_search_init', |
|
459 | - 'mb_ereg_search_regs' => 'Safe\mb_ereg_search_regs', |
|
460 | - 'mb_ereg_search_setpos' => 'Safe\mb_ereg_search_setpos', |
|
461 | - 'mb_http_output' => 'Safe\mb_http_output', |
|
462 | - 'mb_internal_encoding' => 'Safe\mb_internal_encoding', |
|
463 | - 'mb_ord' => 'Safe\mb_ord', |
|
464 | - 'mb_parse_str' => 'Safe\mb_parse_str', |
|
465 | - 'mb_regex_encoding' => 'Safe\mb_regex_encoding', |
|
466 | - 'mb_send_mail' => 'Safe\mb_send_mail', |
|
467 | - 'mb_split' => 'Safe\mb_split', |
|
468 | - 'mb_str_split' => 'Safe\mb_str_split', |
|
469 | - 'md5_file' => 'Safe\md5_file', |
|
470 | - 'metaphone' => 'Safe\metaphone', |
|
471 | - 'mime_content_type' => 'Safe\mime_content_type', |
|
472 | - 'mkdir' => 'Safe\mkdir', |
|
473 | - 'mktime' => 'Safe\mktime', |
|
474 | - 'msg_queue_exists' => 'Safe\msg_queue_exists', |
|
475 | - 'msg_receive' => 'Safe\msg_receive', |
|
476 | - 'msg_remove_queue' => 'Safe\msg_remove_queue', |
|
477 | - 'msg_send' => 'Safe\msg_send', |
|
478 | - 'msg_set_queue' => 'Safe\msg_set_queue', |
|
479 | - 'msql_affected_rows' => 'Safe\msql_affected_rows', |
|
480 | - 'msql_close' => 'Safe\msql_close', |
|
481 | - 'msql_connect' => 'Safe\msql_connect', |
|
482 | - 'msql_create_db' => 'Safe\msql_create_db', |
|
483 | - 'msql_data_seek' => 'Safe\msql_data_seek', |
|
484 | - 'msql_db_query' => 'Safe\msql_db_query', |
|
485 | - 'msql_drop_db' => 'Safe\msql_drop_db', |
|
486 | - 'msql_field_len' => 'Safe\msql_field_len', |
|
487 | - 'msql_field_name' => 'Safe\msql_field_name', |
|
488 | - 'msql_field_seek' => 'Safe\msql_field_seek', |
|
489 | - 'msql_field_table' => 'Safe\msql_field_table', |
|
490 | - 'msql_field_type' => 'Safe\msql_field_type', |
|
491 | - 'msql_free_result' => 'Safe\msql_free_result', |
|
492 | - 'msql_pconnect' => 'Safe\msql_pconnect', |
|
493 | - 'msql_query' => 'Safe\msql_query', |
|
494 | - 'msql_select_db' => 'Safe\msql_select_db', |
|
495 | - 'mysqli_get_cache_stats' => 'Safe\mysqli_get_cache_stats', |
|
496 | - 'mysqli_get_client_stats' => 'Safe\mysqli_get_client_stats', |
|
497 | - 'mysqlnd_ms_dump_servers' => 'Safe\mysqlnd_ms_dump_servers', |
|
498 | - 'mysqlnd_ms_fabric_select_global' => 'Safe\mysqlnd_ms_fabric_select_global', |
|
499 | - 'mysqlnd_ms_fabric_select_shard' => 'Safe\mysqlnd_ms_fabric_select_shard', |
|
500 | - 'mysqlnd_ms_get_last_used_connection' => 'Safe\mysqlnd_ms_get_last_used_connection', |
|
501 | - 'mysqlnd_qc_clear_cache' => 'Safe\mysqlnd_qc_clear_cache', |
|
502 | - 'mysqlnd_qc_set_is_select' => 'Safe\mysqlnd_qc_set_is_select', |
|
503 | - 'mysqlnd_qc_set_storage_handler' => 'Safe\mysqlnd_qc_set_storage_handler', |
|
504 | - 'mysql_close' => 'Safe\mysql_close', |
|
505 | - 'mysql_connect' => 'Safe\mysql_connect', |
|
506 | - 'mysql_create_db' => 'Safe\mysql_create_db', |
|
507 | - 'mysql_data_seek' => 'Safe\mysql_data_seek', |
|
508 | - 'mysql_db_name' => 'Safe\mysql_db_name', |
|
509 | - 'mysql_db_query' => 'Safe\mysql_db_query', |
|
510 | - 'mysql_drop_db' => 'Safe\mysql_drop_db', |
|
511 | - 'mysql_fetch_lengths' => 'Safe\mysql_fetch_lengths', |
|
512 | - 'mysql_field_flags' => 'Safe\mysql_field_flags', |
|
513 | - 'mysql_field_len' => 'Safe\mysql_field_len', |
|
514 | - 'mysql_field_name' => 'Safe\mysql_field_name', |
|
515 | - 'mysql_field_seek' => 'Safe\mysql_field_seek', |
|
516 | - 'mysql_free_result' => 'Safe\mysql_free_result', |
|
517 | - 'mysql_get_host_info' => 'Safe\mysql_get_host_info', |
|
518 | - 'mysql_get_proto_info' => 'Safe\mysql_get_proto_info', |
|
519 | - 'mysql_get_server_info' => 'Safe\mysql_get_server_info', |
|
520 | - 'mysql_info' => 'Safe\mysql_info', |
|
521 | - 'mysql_list_dbs' => 'Safe\mysql_list_dbs', |
|
522 | - 'mysql_list_fields' => 'Safe\mysql_list_fields', |
|
523 | - 'mysql_list_processes' => 'Safe\mysql_list_processes', |
|
524 | - 'mysql_list_tables' => 'Safe\mysql_list_tables', |
|
525 | - 'mysql_num_fields' => 'Safe\mysql_num_fields', |
|
526 | - 'mysql_num_rows' => 'Safe\mysql_num_rows', |
|
527 | - 'mysql_query' => 'Safe\mysql_query', |
|
528 | - 'mysql_real_escape_string' => 'Safe\mysql_real_escape_string', |
|
529 | - 'mysql_result' => 'Safe\mysql_result', |
|
530 | - 'mysql_select_db' => 'Safe\mysql_select_db', |
|
531 | - 'mysql_set_charset' => 'Safe\mysql_set_charset', |
|
532 | - 'mysql_tablename' => 'Safe\mysql_tablename', |
|
533 | - 'mysql_thread_id' => 'Safe\mysql_thread_id', |
|
534 | - 'mysql_unbuffered_query' => 'Safe\mysql_unbuffered_query', |
|
535 | - 'natcasesort' => 'Safe\natcasesort', |
|
536 | - 'natsort' => 'Safe\natsort', |
|
537 | - 'ob_end_clean' => 'Safe\ob_end_clean', |
|
538 | - 'ob_end_flush' => 'Safe\ob_end_flush', |
|
539 | - 'oci_bind_array_by_name' => 'Safe\oci_bind_array_by_name', |
|
540 | - 'oci_bind_by_name' => 'Safe\oci_bind_by_name', |
|
541 | - 'oci_cancel' => 'Safe\oci_cancel', |
|
542 | - 'oci_close' => 'Safe\oci_close', |
|
543 | - 'oci_commit' => 'Safe\oci_commit', |
|
544 | - 'oci_connect' => 'Safe\oci_connect', |
|
545 | - 'oci_define_by_name' => 'Safe\oci_define_by_name', |
|
546 | - 'oci_execute' => 'Safe\oci_execute', |
|
547 | - 'oci_fetch_all' => 'Safe\oci_fetch_all', |
|
548 | - 'oci_field_name' => 'Safe\oci_field_name', |
|
549 | - 'oci_field_precision' => 'Safe\oci_field_precision', |
|
550 | - 'oci_field_scale' => 'Safe\oci_field_scale', |
|
551 | - 'oci_field_size' => 'Safe\oci_field_size', |
|
552 | - 'oci_field_type' => 'Safe\oci_field_type', |
|
553 | - 'oci_field_type_raw' => 'Safe\oci_field_type_raw', |
|
554 | - 'oci_free_descriptor' => 'Safe\oci_free_descriptor', |
|
555 | - 'oci_free_statement' => 'Safe\oci_free_statement', |
|
556 | - 'oci_new_collection' => 'Safe\oci_new_collection', |
|
557 | - 'oci_new_connect' => 'Safe\oci_new_connect', |
|
558 | - 'oci_new_cursor' => 'Safe\oci_new_cursor', |
|
559 | - 'oci_new_descriptor' => 'Safe\oci_new_descriptor', |
|
560 | - 'oci_num_fields' => 'Safe\oci_num_fields', |
|
561 | - 'oci_num_rows' => 'Safe\oci_num_rows', |
|
562 | - 'oci_parse' => 'Safe\oci_parse', |
|
563 | - 'oci_pconnect' => 'Safe\oci_pconnect', |
|
564 | - 'oci_result' => 'Safe\oci_result', |
|
565 | - 'oci_rollback' => 'Safe\oci_rollback', |
|
566 | - 'oci_server_version' => 'Safe\oci_server_version', |
|
567 | - 'oci_set_action' => 'Safe\oci_set_action', |
|
568 | - 'oci_set_call_timeout' => 'Safe\oci_set_call_timeout', |
|
569 | - 'oci_set_client_identifier' => 'Safe\oci_set_client_identifier', |
|
570 | - 'oci_set_client_info' => 'Safe\oci_set_client_info', |
|
571 | - 'oci_set_db_operation' => 'Safe\oci_set_db_operation', |
|
572 | - 'oci_set_edition' => 'Safe\oci_set_edition', |
|
573 | - 'oci_set_module_name' => 'Safe\oci_set_module_name', |
|
574 | - 'oci_set_prefetch' => 'Safe\oci_set_prefetch', |
|
575 | - 'oci_statement_type' => 'Safe\oci_statement_type', |
|
576 | - 'oci_unregister_taf_callback' => 'Safe\oci_unregister_taf_callback', |
|
577 | - 'odbc_autocommit' => 'Safe\odbc_autocommit', |
|
578 | - 'odbc_binmode' => 'Safe\odbc_binmode', |
|
579 | - 'odbc_columnprivileges' => 'Safe\odbc_columnprivileges', |
|
580 | - 'odbc_columns' => 'Safe\odbc_columns', |
|
581 | - 'odbc_commit' => 'Safe\odbc_commit', |
|
582 | - 'odbc_data_source' => 'Safe\odbc_data_source', |
|
583 | - 'odbc_exec' => 'Safe\odbc_exec', |
|
584 | - 'odbc_execute' => 'Safe\odbc_execute', |
|
585 | - 'odbc_fetch_into' => 'Safe\odbc_fetch_into', |
|
586 | - 'odbc_field_len' => 'Safe\odbc_field_len', |
|
587 | - 'odbc_field_name' => 'Safe\odbc_field_name', |
|
588 | - 'odbc_field_num' => 'Safe\odbc_field_num', |
|
589 | - 'odbc_field_scale' => 'Safe\odbc_field_scale', |
|
590 | - 'odbc_field_type' => 'Safe\odbc_field_type', |
|
591 | - 'odbc_foreignkeys' => 'Safe\odbc_foreignkeys', |
|
592 | - 'odbc_gettypeinfo' => 'Safe\odbc_gettypeinfo', |
|
593 | - 'odbc_longreadlen' => 'Safe\odbc_longreadlen', |
|
594 | - 'odbc_prepare' => 'Safe\odbc_prepare', |
|
595 | - 'odbc_primarykeys' => 'Safe\odbc_primarykeys', |
|
596 | - 'odbc_result' => 'Safe\odbc_result', |
|
597 | - 'odbc_result_all' => 'Safe\odbc_result_all', |
|
598 | - 'odbc_rollback' => 'Safe\odbc_rollback', |
|
599 | - 'odbc_setoption' => 'Safe\odbc_setoption', |
|
600 | - 'odbc_specialcolumns' => 'Safe\odbc_specialcolumns', |
|
601 | - 'odbc_statistics' => 'Safe\odbc_statistics', |
|
602 | - 'odbc_tableprivileges' => 'Safe\odbc_tableprivileges', |
|
603 | - 'odbc_tables' => 'Safe\odbc_tables', |
|
604 | - 'opcache_compile_file' => 'Safe\opcache_compile_file', |
|
605 | - 'opcache_get_status' => 'Safe\opcache_get_status', |
|
606 | - 'opendir' => 'Safe\opendir', |
|
607 | - 'openlog' => 'Safe\openlog', |
|
608 | - 'openssl_cipher_iv_length' => 'Safe\openssl_cipher_iv_length', |
|
609 | - 'openssl_csr_export' => 'Safe\openssl_csr_export', |
|
610 | - 'openssl_csr_export_to_file' => 'Safe\openssl_csr_export_to_file', |
|
611 | - 'openssl_csr_get_subject' => 'Safe\openssl_csr_get_subject', |
|
612 | - 'openssl_csr_new' => 'Safe\openssl_csr_new', |
|
613 | - 'openssl_csr_sign' => 'Safe\openssl_csr_sign', |
|
614 | - 'openssl_decrypt' => 'Safe\openssl_decrypt', |
|
615 | - 'openssl_dh_compute_key' => 'Safe\openssl_dh_compute_key', |
|
616 | - 'openssl_digest' => 'Safe\openssl_digest', |
|
617 | - 'openssl_encrypt' => 'Safe\openssl_encrypt', |
|
618 | - 'openssl_open' => 'Safe\openssl_open', |
|
619 | - 'openssl_pbkdf2' => 'Safe\openssl_pbkdf2', |
|
620 | - 'openssl_pkcs7_decrypt' => 'Safe\openssl_pkcs7_decrypt', |
|
621 | - 'openssl_pkcs7_encrypt' => 'Safe\openssl_pkcs7_encrypt', |
|
622 | - 'openssl_pkcs7_read' => 'Safe\openssl_pkcs7_read', |
|
623 | - 'openssl_pkcs7_sign' => 'Safe\openssl_pkcs7_sign', |
|
624 | - 'openssl_pkcs12_export' => 'Safe\openssl_pkcs12_export', |
|
625 | - 'openssl_pkcs12_export_to_file' => 'Safe\openssl_pkcs12_export_to_file', |
|
626 | - 'openssl_pkcs12_read' => 'Safe\openssl_pkcs12_read', |
|
627 | - 'openssl_pkey_export' => 'Safe\openssl_pkey_export', |
|
628 | - 'openssl_pkey_export_to_file' => 'Safe\openssl_pkey_export_to_file', |
|
629 | - 'openssl_pkey_get_private' => 'Safe\openssl_pkey_get_private', |
|
630 | - 'openssl_pkey_get_public' => 'Safe\openssl_pkey_get_public', |
|
631 | - 'openssl_pkey_new' => 'Safe\openssl_pkey_new', |
|
632 | - 'openssl_private_decrypt' => 'Safe\openssl_private_decrypt', |
|
633 | - 'openssl_private_encrypt' => 'Safe\openssl_private_encrypt', |
|
634 | - 'openssl_public_decrypt' => 'Safe\openssl_public_decrypt', |
|
635 | - 'openssl_public_encrypt' => 'Safe\openssl_public_encrypt', |
|
636 | - 'openssl_random_pseudo_bytes' => 'Safe\openssl_random_pseudo_bytes', |
|
637 | - 'openssl_seal' => 'Safe\openssl_seal', |
|
638 | - 'openssl_sign' => 'Safe\openssl_sign', |
|
639 | - 'openssl_x509_export' => 'Safe\openssl_x509_export', |
|
640 | - 'openssl_x509_export_to_file' => 'Safe\openssl_x509_export_to_file', |
|
641 | - 'openssl_x509_fingerprint' => 'Safe\openssl_x509_fingerprint', |
|
642 | - 'openssl_x509_read' => 'Safe\openssl_x509_read', |
|
643 | - 'output_add_rewrite_var' => 'Safe\output_add_rewrite_var', |
|
644 | - 'output_reset_rewrite_vars' => 'Safe\output_reset_rewrite_vars', |
|
645 | - 'pack' => 'Safe\pack', |
|
646 | - 'parse_ini_file' => 'Safe\parse_ini_file', |
|
647 | - 'parse_ini_string' => 'Safe\parse_ini_string', |
|
648 | - 'parse_url' => 'Safe\parse_url', |
|
649 | - 'password_hash' => 'Safe\password_hash', |
|
650 | - 'pcntl_exec' => 'Safe\pcntl_exec', |
|
651 | - 'pcntl_getpriority' => 'Safe\pcntl_getpriority', |
|
652 | - 'pcntl_setpriority' => 'Safe\pcntl_setpriority', |
|
653 | - 'pcntl_signal_dispatch' => 'Safe\pcntl_signal_dispatch', |
|
654 | - 'pcntl_sigprocmask' => 'Safe\pcntl_sigprocmask', |
|
655 | - 'pcntl_strerror' => 'Safe\pcntl_strerror', |
|
656 | - 'PDF_activate_item' => 'Safe\PDF_activate_item', |
|
657 | - 'PDF_add_locallink' => 'Safe\PDF_add_locallink', |
|
658 | - 'PDF_add_nameddest' => 'Safe\PDF_add_nameddest', |
|
659 | - 'PDF_add_note' => 'Safe\PDF_add_note', |
|
660 | - 'PDF_add_pdflink' => 'Safe\PDF_add_pdflink', |
|
661 | - 'PDF_add_thumbnail' => 'Safe\PDF_add_thumbnail', |
|
662 | - 'PDF_add_weblink' => 'Safe\PDF_add_weblink', |
|
663 | - 'PDF_attach_file' => 'Safe\PDF_attach_file', |
|
664 | - 'PDF_begin_layer' => 'Safe\PDF_begin_layer', |
|
665 | - 'PDF_begin_page' => 'Safe\PDF_begin_page', |
|
666 | - 'PDF_begin_page_ext' => 'Safe\PDF_begin_page_ext', |
|
667 | - 'PDF_circle' => 'Safe\PDF_circle', |
|
668 | - 'PDF_clip' => 'Safe\PDF_clip', |
|
669 | - 'PDF_close' => 'Safe\PDF_close', |
|
670 | - 'PDF_closepath' => 'Safe\PDF_closepath', |
|
671 | - 'PDF_closepath_fill_stroke' => 'Safe\PDF_closepath_fill_stroke', |
|
672 | - 'PDF_closepath_stroke' => 'Safe\PDF_closepath_stroke', |
|
673 | - 'PDF_close_pdi' => 'Safe\PDF_close_pdi', |
|
674 | - 'PDF_close_pdi_page' => 'Safe\PDF_close_pdi_page', |
|
675 | - 'PDF_concat' => 'Safe\PDF_concat', |
|
676 | - 'PDF_continue_text' => 'Safe\PDF_continue_text', |
|
677 | - 'PDF_curveto' => 'Safe\PDF_curveto', |
|
678 | - 'PDF_delete' => 'Safe\PDF_delete', |
|
679 | - 'PDF_end_layer' => 'Safe\PDF_end_layer', |
|
680 | - 'PDF_end_page' => 'Safe\PDF_end_page', |
|
681 | - 'PDF_end_page_ext' => 'Safe\PDF_end_page_ext', |
|
682 | - 'PDF_end_pattern' => 'Safe\PDF_end_pattern', |
|
683 | - 'PDF_end_template' => 'Safe\PDF_end_template', |
|
684 | - 'PDF_fill' => 'Safe\PDF_fill', |
|
685 | - 'PDF_fill_stroke' => 'Safe\PDF_fill_stroke', |
|
686 | - 'PDF_fit_image' => 'Safe\PDF_fit_image', |
|
687 | - 'PDF_fit_pdi_page' => 'Safe\PDF_fit_pdi_page', |
|
688 | - 'PDF_fit_textline' => 'Safe\PDF_fit_textline', |
|
689 | - 'PDF_initgraphics' => 'Safe\PDF_initgraphics', |
|
690 | - 'PDF_lineto' => 'Safe\PDF_lineto', |
|
691 | - 'PDF_makespotcolor' => 'Safe\PDF_makespotcolor', |
|
692 | - 'PDF_moveto' => 'Safe\PDF_moveto', |
|
693 | - 'PDF_open_file' => 'Safe\PDF_open_file', |
|
694 | - 'PDF_place_image' => 'Safe\PDF_place_image', |
|
695 | - 'PDF_place_pdi_page' => 'Safe\PDF_place_pdi_page', |
|
696 | - 'PDF_rect' => 'Safe\PDF_rect', |
|
697 | - 'PDF_restore' => 'Safe\PDF_restore', |
|
698 | - 'PDF_rotate' => 'Safe\PDF_rotate', |
|
699 | - 'PDF_save' => 'Safe\PDF_save', |
|
700 | - 'PDF_scale' => 'Safe\PDF_scale', |
|
701 | - 'PDF_setcolor' => 'Safe\PDF_setcolor', |
|
702 | - 'PDF_setdash' => 'Safe\PDF_setdash', |
|
703 | - 'PDF_setdashpattern' => 'Safe\PDF_setdashpattern', |
|
704 | - 'PDF_setflat' => 'Safe\PDF_setflat', |
|
705 | - 'PDF_setfont' => 'Safe\PDF_setfont', |
|
706 | - 'PDF_setgray' => 'Safe\PDF_setgray', |
|
707 | - 'PDF_setgray_fill' => 'Safe\PDF_setgray_fill', |
|
708 | - 'PDF_setgray_stroke' => 'Safe\PDF_setgray_stroke', |
|
709 | - 'PDF_setlinejoin' => 'Safe\PDF_setlinejoin', |
|
710 | - 'PDF_setlinewidth' => 'Safe\PDF_setlinewidth', |
|
711 | - 'PDF_setmatrix' => 'Safe\PDF_setmatrix', |
|
712 | - 'PDF_setmiterlimit' => 'Safe\PDF_setmiterlimit', |
|
713 | - 'PDF_setrgbcolor' => 'Safe\PDF_setrgbcolor', |
|
714 | - 'PDF_setrgbcolor_fill' => 'Safe\PDF_setrgbcolor_fill', |
|
715 | - 'PDF_setrgbcolor_stroke' => 'Safe\PDF_setrgbcolor_stroke', |
|
716 | - 'PDF_set_border_color' => 'Safe\PDF_set_border_color', |
|
717 | - 'PDF_set_border_dash' => 'Safe\PDF_set_border_dash', |
|
718 | - 'PDF_set_border_style' => 'Safe\PDF_set_border_style', |
|
719 | - 'PDF_set_info' => 'Safe\PDF_set_info', |
|
720 | - 'PDF_set_layer_dependency' => 'Safe\PDF_set_layer_dependency', |
|
721 | - 'PDF_set_parameter' => 'Safe\PDF_set_parameter', |
|
722 | - 'PDF_set_text_pos' => 'Safe\PDF_set_text_pos', |
|
723 | - 'PDF_set_value' => 'Safe\PDF_set_value', |
|
724 | - 'PDF_show' => 'Safe\PDF_show', |
|
725 | - 'PDF_show_xy' => 'Safe\PDF_show_xy', |
|
726 | - 'PDF_skew' => 'Safe\PDF_skew', |
|
727 | - 'PDF_stroke' => 'Safe\PDF_stroke', |
|
728 | - 'pg_cancel_query' => 'Safe\pg_cancel_query', |
|
729 | - 'pg_client_encoding' => 'Safe\pg_client_encoding', |
|
730 | - 'pg_close' => 'Safe\pg_close', |
|
731 | - 'pg_connect' => 'Safe\pg_connect', |
|
732 | - 'pg_connection_reset' => 'Safe\pg_connection_reset', |
|
733 | - 'pg_convert' => 'Safe\pg_convert', |
|
734 | - 'pg_copy_from' => 'Safe\pg_copy_from', |
|
735 | - 'pg_copy_to' => 'Safe\pg_copy_to', |
|
736 | - 'pg_dbname' => 'Safe\pg_dbname', |
|
737 | - 'pg_delete' => 'Safe\pg_delete', |
|
738 | - 'pg_end_copy' => 'Safe\pg_end_copy', |
|
739 | - 'pg_execute' => 'Safe\pg_execute', |
|
740 | - 'pg_field_name' => 'Safe\pg_field_name', |
|
741 | - 'pg_field_table' => 'Safe\pg_field_table', |
|
742 | - 'pg_field_type' => 'Safe\pg_field_type', |
|
743 | - 'pg_flush' => 'Safe\pg_flush', |
|
744 | - 'pg_free_result' => 'Safe\pg_free_result', |
|
745 | - 'pg_host' => 'Safe\pg_host', |
|
746 | - 'pg_insert' => 'Safe\pg_insert', |
|
747 | - 'pg_last_error' => 'Safe\pg_last_error', |
|
748 | - 'pg_last_notice' => 'Safe\pg_last_notice', |
|
749 | - 'pg_last_oid' => 'Safe\pg_last_oid', |
|
750 | - 'pg_lo_close' => 'Safe\pg_lo_close', |
|
751 | - 'pg_lo_export' => 'Safe\pg_lo_export', |
|
752 | - 'pg_lo_import' => 'Safe\pg_lo_import', |
|
753 | - 'pg_lo_open' => 'Safe\pg_lo_open', |
|
754 | - 'pg_lo_read' => 'Safe\pg_lo_read', |
|
755 | - 'pg_lo_read_all' => 'Safe\pg_lo_read_all', |
|
756 | - 'pg_lo_seek' => 'Safe\pg_lo_seek', |
|
757 | - 'pg_lo_truncate' => 'Safe\pg_lo_truncate', |
|
758 | - 'pg_lo_unlink' => 'Safe\pg_lo_unlink', |
|
759 | - 'pg_lo_write' => 'Safe\pg_lo_write', |
|
760 | - 'pg_meta_data' => 'Safe\pg_meta_data', |
|
761 | - 'pg_options' => 'Safe\pg_options', |
|
762 | - 'pg_parameter_status' => 'Safe\pg_parameter_status', |
|
763 | - 'pg_pconnect' => 'Safe\pg_pconnect', |
|
764 | - 'pg_ping' => 'Safe\pg_ping', |
|
765 | - 'pg_port' => 'Safe\pg_port', |
|
766 | - 'pg_prepare' => 'Safe\pg_prepare', |
|
767 | - 'pg_put_line' => 'Safe\pg_put_line', |
|
768 | - 'pg_query' => 'Safe\pg_query', |
|
769 | - 'pg_query_params' => 'Safe\pg_query_params', |
|
770 | - 'pg_result_error_field' => 'Safe\pg_result_error_field', |
|
771 | - 'pg_result_seek' => 'Safe\pg_result_seek', |
|
772 | - 'pg_select' => 'Safe\pg_select', |
|
773 | - 'pg_send_execute' => 'Safe\pg_send_execute', |
|
774 | - 'pg_send_prepare' => 'Safe\pg_send_prepare', |
|
775 | - 'pg_send_query' => 'Safe\pg_send_query', |
|
776 | - 'pg_send_query_params' => 'Safe\pg_send_query_params', |
|
777 | - 'pg_socket' => 'Safe\pg_socket', |
|
778 | - 'pg_trace' => 'Safe\pg_trace', |
|
779 | - 'pg_tty' => 'Safe\pg_tty', |
|
780 | - 'pg_update' => 'Safe\pg_update', |
|
781 | - 'pg_version' => 'Safe\pg_version', |
|
782 | - 'phpcredits' => 'Safe\phpcredits', |
|
783 | - 'phpinfo' => 'Safe\phpinfo', |
|
784 | - 'png2wbmp' => 'Safe\png2wbmp', |
|
785 | - 'posix_access' => 'Safe\posix_access', |
|
786 | - 'posix_getgrnam' => 'Safe\posix_getgrnam', |
|
787 | - 'posix_getpgid' => 'Safe\posix_getpgid', |
|
788 | - 'posix_initgroups' => 'Safe\posix_initgroups', |
|
789 | - 'posix_kill' => 'Safe\posix_kill', |
|
790 | - 'posix_mkfifo' => 'Safe\posix_mkfifo', |
|
791 | - 'posix_mknod' => 'Safe\posix_mknod', |
|
792 | - 'posix_setegid' => 'Safe\posix_setegid', |
|
793 | - 'posix_seteuid' => 'Safe\posix_seteuid', |
|
794 | - 'posix_setgid' => 'Safe\posix_setgid', |
|
795 | - 'posix_setpgid' => 'Safe\posix_setpgid', |
|
796 | - 'posix_setrlimit' => 'Safe\posix_setrlimit', |
|
797 | - 'posix_setuid' => 'Safe\posix_setuid', |
|
798 | - 'preg_match' => 'Safe\preg_match', |
|
799 | - 'preg_match_all' => 'Safe\preg_match_all', |
|
800 | - 'preg_replace' => 'Safe\preg_replace', |
|
801 | - 'preg_split' => 'Safe\preg_split', |
|
802 | - 'proc_get_status' => 'Safe\proc_get_status', |
|
803 | - 'proc_nice' => 'Safe\proc_nice', |
|
804 | - 'pspell_add_to_personal' => 'Safe\pspell_add_to_personal', |
|
805 | - 'pspell_add_to_session' => 'Safe\pspell_add_to_session', |
|
806 | - 'pspell_clear_session' => 'Safe\pspell_clear_session', |
|
807 | - 'pspell_config_create' => 'Safe\pspell_config_create', |
|
808 | - 'pspell_config_data_dir' => 'Safe\pspell_config_data_dir', |
|
809 | - 'pspell_config_dict_dir' => 'Safe\pspell_config_dict_dir', |
|
810 | - 'pspell_config_ignore' => 'Safe\pspell_config_ignore', |
|
811 | - 'pspell_config_mode' => 'Safe\pspell_config_mode', |
|
812 | - 'pspell_config_personal' => 'Safe\pspell_config_personal', |
|
813 | - 'pspell_config_repl' => 'Safe\pspell_config_repl', |
|
814 | - 'pspell_config_runtogether' => 'Safe\pspell_config_runtogether', |
|
815 | - 'pspell_config_save_repl' => 'Safe\pspell_config_save_repl', |
|
816 | - 'pspell_new' => 'Safe\pspell_new', |
|
817 | - 'pspell_new_config' => 'Safe\pspell_new_config', |
|
818 | - 'pspell_save_wordlist' => 'Safe\pspell_save_wordlist', |
|
819 | - 'pspell_store_replacement' => 'Safe\pspell_store_replacement', |
|
820 | - 'ps_add_launchlink' => 'Safe\ps_add_launchlink', |
|
821 | - 'ps_add_locallink' => 'Safe\ps_add_locallink', |
|
822 | - 'ps_add_note' => 'Safe\ps_add_note', |
|
823 | - 'ps_add_pdflink' => 'Safe\ps_add_pdflink', |
|
824 | - 'ps_add_weblink' => 'Safe\ps_add_weblink', |
|
825 | - 'ps_arc' => 'Safe\ps_arc', |
|
826 | - 'ps_arcn' => 'Safe\ps_arcn', |
|
827 | - 'ps_begin_page' => 'Safe\ps_begin_page', |
|
828 | - 'ps_begin_pattern' => 'Safe\ps_begin_pattern', |
|
829 | - 'ps_begin_template' => 'Safe\ps_begin_template', |
|
830 | - 'ps_circle' => 'Safe\ps_circle', |
|
831 | - 'ps_clip' => 'Safe\ps_clip', |
|
832 | - 'ps_close' => 'Safe\ps_close', |
|
833 | - 'ps_closepath' => 'Safe\ps_closepath', |
|
834 | - 'ps_closepath_stroke' => 'Safe\ps_closepath_stroke', |
|
835 | - 'ps_close_image' => 'Safe\ps_close_image', |
|
836 | - 'ps_continue_text' => 'Safe\ps_continue_text', |
|
837 | - 'ps_curveto' => 'Safe\ps_curveto', |
|
838 | - 'ps_delete' => 'Safe\ps_delete', |
|
839 | - 'ps_end_page' => 'Safe\ps_end_page', |
|
840 | - 'ps_end_pattern' => 'Safe\ps_end_pattern', |
|
841 | - 'ps_end_template' => 'Safe\ps_end_template', |
|
842 | - 'ps_fill' => 'Safe\ps_fill', |
|
843 | - 'ps_fill_stroke' => 'Safe\ps_fill_stroke', |
|
844 | - 'ps_get_parameter' => 'Safe\ps_get_parameter', |
|
845 | - 'ps_hyphenate' => 'Safe\ps_hyphenate', |
|
846 | - 'ps_include_file' => 'Safe\ps_include_file', |
|
847 | - 'ps_lineto' => 'Safe\ps_lineto', |
|
848 | - 'ps_moveto' => 'Safe\ps_moveto', |
|
849 | - 'ps_new' => 'Safe\ps_new', |
|
850 | - 'ps_open_file' => 'Safe\ps_open_file', |
|
851 | - 'ps_place_image' => 'Safe\ps_place_image', |
|
852 | - 'ps_rect' => 'Safe\ps_rect', |
|
853 | - 'ps_restore' => 'Safe\ps_restore', |
|
854 | - 'ps_rotate' => 'Safe\ps_rotate', |
|
855 | - 'ps_save' => 'Safe\ps_save', |
|
856 | - 'ps_scale' => 'Safe\ps_scale', |
|
857 | - 'ps_setcolor' => 'Safe\ps_setcolor', |
|
858 | - 'ps_setdash' => 'Safe\ps_setdash', |
|
859 | - 'ps_setflat' => 'Safe\ps_setflat', |
|
860 | - 'ps_setfont' => 'Safe\ps_setfont', |
|
861 | - 'ps_setgray' => 'Safe\ps_setgray', |
|
862 | - 'ps_setlinecap' => 'Safe\ps_setlinecap', |
|
863 | - 'ps_setlinejoin' => 'Safe\ps_setlinejoin', |
|
864 | - 'ps_setlinewidth' => 'Safe\ps_setlinewidth', |
|
865 | - 'ps_setmiterlimit' => 'Safe\ps_setmiterlimit', |
|
866 | - 'ps_setoverprintmode' => 'Safe\ps_setoverprintmode', |
|
867 | - 'ps_setpolydash' => 'Safe\ps_setpolydash', |
|
868 | - 'ps_set_border_color' => 'Safe\ps_set_border_color', |
|
869 | - 'ps_set_border_dash' => 'Safe\ps_set_border_dash', |
|
870 | - 'ps_set_border_style' => 'Safe\ps_set_border_style', |
|
871 | - 'ps_set_info' => 'Safe\ps_set_info', |
|
872 | - 'ps_set_parameter' => 'Safe\ps_set_parameter', |
|
873 | - 'ps_set_text_pos' => 'Safe\ps_set_text_pos', |
|
874 | - 'ps_set_value' => 'Safe\ps_set_value', |
|
875 | - 'ps_shading' => 'Safe\ps_shading', |
|
876 | - 'ps_shading_pattern' => 'Safe\ps_shading_pattern', |
|
877 | - 'ps_shfill' => 'Safe\ps_shfill', |
|
878 | - 'ps_show' => 'Safe\ps_show', |
|
879 | - 'ps_show2' => 'Safe\ps_show2', |
|
880 | - 'ps_show_xy' => 'Safe\ps_show_xy', |
|
881 | - 'ps_show_xy2' => 'Safe\ps_show_xy2', |
|
882 | - 'ps_stroke' => 'Safe\ps_stroke', |
|
883 | - 'ps_symbol' => 'Safe\ps_symbol', |
|
884 | - 'ps_translate' => 'Safe\ps_translate', |
|
885 | - 'putenv' => 'Safe\putenv', |
|
886 | - 'readfile' => 'Safe\readfile', |
|
887 | - 'readgzfile' => 'Safe\readgzfile', |
|
888 | - 'readline_add_history' => 'Safe\readline_add_history', |
|
889 | - 'readline_callback_handler_install' => 'Safe\readline_callback_handler_install', |
|
890 | - 'readline_clear_history' => 'Safe\readline_clear_history', |
|
891 | - 'readline_completion_function' => 'Safe\readline_completion_function', |
|
892 | - 'readline_read_history' => 'Safe\readline_read_history', |
|
893 | - 'readline_write_history' => 'Safe\readline_write_history', |
|
894 | - 'readlink' => 'Safe\readlink', |
|
895 | - 'realpath' => 'Safe\realpath', |
|
896 | - 'register_tick_function' => 'Safe\register_tick_function', |
|
897 | - 'rename' => 'Safe\rename', |
|
898 | - 'rewind' => 'Safe\rewind', |
|
899 | - 'rewinddir' => 'Safe\rewinddir', |
|
900 | - 'rmdir' => 'Safe\rmdir', |
|
901 | - 'rpmaddtag' => 'Safe\rpmaddtag', |
|
902 | - 'rrd_create' => 'Safe\rrd_create', |
|
903 | - 'rsort' => 'Safe\rsort', |
|
904 | - 'sapi_windows_cp_conv' => 'Safe\sapi_windows_cp_conv', |
|
905 | - 'sapi_windows_cp_set' => 'Safe\sapi_windows_cp_set', |
|
906 | - 'sapi_windows_generate_ctrl_event' => 'Safe\sapi_windows_generate_ctrl_event', |
|
907 | - 'sapi_windows_vt100_support' => 'Safe\sapi_windows_vt100_support', |
|
908 | - 'scandir' => 'Safe\scandir', |
|
909 | - 'sem_acquire' => 'Safe\sem_acquire', |
|
910 | - 'sem_get' => 'Safe\sem_get', |
|
911 | - 'sem_release' => 'Safe\sem_release', |
|
912 | - 'sem_remove' => 'Safe\sem_remove', |
|
913 | - 'session_abort' => 'Safe\session_abort', |
|
914 | - 'session_decode' => 'Safe\session_decode', |
|
915 | - 'session_destroy' => 'Safe\session_destroy', |
|
916 | - 'session_regenerate_id' => 'Safe\session_regenerate_id', |
|
917 | - 'session_reset' => 'Safe\session_reset', |
|
918 | - 'session_unset' => 'Safe\session_unset', |
|
919 | - 'session_write_close' => 'Safe\session_write_close', |
|
920 | - 'settype' => 'Safe\settype', |
|
921 | - 'set_include_path' => 'Safe\set_include_path', |
|
922 | - 'set_time_limit' => 'Safe\set_time_limit', |
|
923 | - 'sha1_file' => 'Safe\sha1_file', |
|
924 | - 'shmop_delete' => 'Safe\shmop_delete', |
|
925 | - 'shmop_read' => 'Safe\shmop_read', |
|
926 | - 'shmop_write' => 'Safe\shmop_write', |
|
927 | - 'shm_put_var' => 'Safe\shm_put_var', |
|
928 | - 'shm_remove' => 'Safe\shm_remove', |
|
929 | - 'shm_remove_var' => 'Safe\shm_remove_var', |
|
930 | - 'shuffle' => 'Safe\shuffle', |
|
931 | - 'simplexml_import_dom' => 'Safe\simplexml_import_dom', |
|
932 | - 'simplexml_load_file' => 'Safe\simplexml_load_file', |
|
933 | - 'simplexml_load_string' => 'Safe\simplexml_load_string', |
|
934 | - 'sleep' => 'Safe\sleep', |
|
935 | - 'socket_accept' => 'Safe\socket_accept', |
|
936 | - 'socket_addrinfo_bind' => 'Safe\socket_addrinfo_bind', |
|
937 | - 'socket_addrinfo_connect' => 'Safe\socket_addrinfo_connect', |
|
938 | - 'socket_bind' => 'Safe\socket_bind', |
|
939 | - 'socket_connect' => 'Safe\socket_connect', |
|
940 | - 'socket_create' => 'Safe\socket_create', |
|
941 | - 'socket_create_listen' => 'Safe\socket_create_listen', |
|
942 | - 'socket_create_pair' => 'Safe\socket_create_pair', |
|
943 | - 'socket_export_stream' => 'Safe\socket_export_stream', |
|
944 | - 'socket_getpeername' => 'Safe\socket_getpeername', |
|
945 | - 'socket_getsockname' => 'Safe\socket_getsockname', |
|
946 | - 'socket_get_option' => 'Safe\socket_get_option', |
|
947 | - 'socket_import_stream' => 'Safe\socket_import_stream', |
|
948 | - 'socket_listen' => 'Safe\socket_listen', |
|
949 | - 'socket_read' => 'Safe\socket_read', |
|
950 | - 'socket_send' => 'Safe\socket_send', |
|
951 | - 'socket_sendmsg' => 'Safe\socket_sendmsg', |
|
952 | - 'socket_sendto' => 'Safe\socket_sendto', |
|
953 | - 'socket_set_block' => 'Safe\socket_set_block', |
|
954 | - 'socket_set_nonblock' => 'Safe\socket_set_nonblock', |
|
955 | - 'socket_set_option' => 'Safe\socket_set_option', |
|
956 | - 'socket_shutdown' => 'Safe\socket_shutdown', |
|
957 | - 'socket_write' => 'Safe\socket_write', |
|
958 | - 'socket_wsaprotocol_info_export' => 'Safe\socket_wsaprotocol_info_export', |
|
959 | - 'socket_wsaprotocol_info_import' => 'Safe\socket_wsaprotocol_info_import', |
|
960 | - 'socket_wsaprotocol_info_release' => 'Safe\socket_wsaprotocol_info_release', |
|
961 | - 'sodium_crypto_pwhash' => 'Safe\sodium_crypto_pwhash', |
|
962 | - 'sodium_crypto_pwhash_str' => 'Safe\sodium_crypto_pwhash_str', |
|
963 | - 'solr_get_version' => 'Safe\solr_get_version', |
|
964 | - 'sort' => 'Safe\sort', |
|
965 | - 'soundex' => 'Safe\soundex', |
|
966 | - 'spl_autoload_register' => 'Safe\spl_autoload_register', |
|
967 | - 'spl_autoload_unregister' => 'Safe\spl_autoload_unregister', |
|
968 | - 'sprintf' => 'Safe\sprintf', |
|
969 | - 'sqlsrv_begin_transaction' => 'Safe\sqlsrv_begin_transaction', |
|
970 | - 'sqlsrv_cancel' => 'Safe\sqlsrv_cancel', |
|
971 | - 'sqlsrv_client_info' => 'Safe\sqlsrv_client_info', |
|
972 | - 'sqlsrv_close' => 'Safe\sqlsrv_close', |
|
973 | - 'sqlsrv_commit' => 'Safe\sqlsrv_commit', |
|
974 | - 'sqlsrv_configure' => 'Safe\sqlsrv_configure', |
|
975 | - 'sqlsrv_execute' => 'Safe\sqlsrv_execute', |
|
976 | - 'sqlsrv_free_stmt' => 'Safe\sqlsrv_free_stmt', |
|
977 | - 'sqlsrv_get_field' => 'Safe\sqlsrv_get_field', |
|
978 | - 'sqlsrv_next_result' => 'Safe\sqlsrv_next_result', |
|
979 | - 'sqlsrv_num_fields' => 'Safe\sqlsrv_num_fields', |
|
980 | - 'sqlsrv_num_rows' => 'Safe\sqlsrv_num_rows', |
|
981 | - 'sqlsrv_prepare' => 'Safe\sqlsrv_prepare', |
|
982 | - 'sqlsrv_query' => 'Safe\sqlsrv_query', |
|
983 | - 'sqlsrv_rollback' => 'Safe\sqlsrv_rollback', |
|
984 | - 'ssdeep_fuzzy_compare' => 'Safe\ssdeep_fuzzy_compare', |
|
985 | - 'ssdeep_fuzzy_hash' => 'Safe\ssdeep_fuzzy_hash', |
|
986 | - 'ssdeep_fuzzy_hash_filename' => 'Safe\ssdeep_fuzzy_hash_filename', |
|
987 | - 'ssh2_auth_agent' => 'Safe\ssh2_auth_agent', |
|
988 | - 'ssh2_auth_hostbased_file' => 'Safe\ssh2_auth_hostbased_file', |
|
989 | - 'ssh2_auth_password' => 'Safe\ssh2_auth_password', |
|
990 | - 'ssh2_auth_pubkey_file' => 'Safe\ssh2_auth_pubkey_file', |
|
991 | - 'ssh2_connect' => 'Safe\ssh2_connect', |
|
992 | - 'ssh2_disconnect' => 'Safe\ssh2_disconnect', |
|
993 | - 'ssh2_exec' => 'Safe\ssh2_exec', |
|
994 | - 'ssh2_publickey_add' => 'Safe\ssh2_publickey_add', |
|
995 | - 'ssh2_publickey_init' => 'Safe\ssh2_publickey_init', |
|
996 | - 'ssh2_publickey_remove' => 'Safe\ssh2_publickey_remove', |
|
997 | - 'ssh2_scp_recv' => 'Safe\ssh2_scp_recv', |
|
998 | - 'ssh2_scp_send' => 'Safe\ssh2_scp_send', |
|
999 | - 'ssh2_sftp' => 'Safe\ssh2_sftp', |
|
1000 | - 'ssh2_sftp_chmod' => 'Safe\ssh2_sftp_chmod', |
|
1001 | - 'ssh2_sftp_mkdir' => 'Safe\ssh2_sftp_mkdir', |
|
1002 | - 'ssh2_sftp_rename' => 'Safe\ssh2_sftp_rename', |
|
1003 | - 'ssh2_sftp_rmdir' => 'Safe\ssh2_sftp_rmdir', |
|
1004 | - 'ssh2_sftp_symlink' => 'Safe\ssh2_sftp_symlink', |
|
1005 | - 'ssh2_sftp_unlink' => 'Safe\ssh2_sftp_unlink', |
|
1006 | - 'stream_context_set_params' => 'Safe\stream_context_set_params', |
|
1007 | - 'stream_copy_to_stream' => 'Safe\stream_copy_to_stream', |
|
1008 | - 'stream_filter_append' => 'Safe\stream_filter_append', |
|
1009 | - 'stream_filter_prepend' => 'Safe\stream_filter_prepend', |
|
1010 | - 'stream_filter_register' => 'Safe\stream_filter_register', |
|
1011 | - 'stream_filter_remove' => 'Safe\stream_filter_remove', |
|
1012 | - 'stream_get_contents' => 'Safe\stream_get_contents', |
|
1013 | - 'stream_isatty' => 'Safe\stream_isatty', |
|
1014 | - 'stream_resolve_include_path' => 'Safe\stream_resolve_include_path', |
|
1015 | - 'stream_set_blocking' => 'Safe\stream_set_blocking', |
|
1016 | - 'stream_set_timeout' => 'Safe\stream_set_timeout', |
|
1017 | - 'stream_socket_accept' => 'Safe\stream_socket_accept', |
|
1018 | - 'stream_socket_client' => 'Safe\stream_socket_client', |
|
1019 | - 'stream_socket_pair' => 'Safe\stream_socket_pair', |
|
1020 | - 'stream_socket_server' => 'Safe\stream_socket_server', |
|
1021 | - 'stream_socket_shutdown' => 'Safe\stream_socket_shutdown', |
|
1022 | - 'stream_supports_lock' => 'Safe\stream_supports_lock', |
|
1023 | - 'stream_wrapper_register' => 'Safe\stream_wrapper_register', |
|
1024 | - 'stream_wrapper_restore' => 'Safe\stream_wrapper_restore', |
|
1025 | - 'stream_wrapper_unregister' => 'Safe\stream_wrapper_unregister', |
|
1026 | - 'strptime' => 'Safe\strptime', |
|
1027 | - 'strtotime' => 'Safe\strtotime', |
|
1028 | - 'substr' => 'Safe\substr', |
|
1029 | - 'swoole_async_write' => 'Safe\swoole_async_write', |
|
1030 | - 'swoole_async_writefile' => 'Safe\swoole_async_writefile', |
|
1031 | - 'swoole_event_defer' => 'Safe\swoole_event_defer', |
|
1032 | - 'swoole_event_del' => 'Safe\swoole_event_del', |
|
1033 | - 'swoole_event_write' => 'Safe\swoole_event_write', |
|
1034 | - 'symlink' => 'Safe\symlink', |
|
1035 | - 'syslog' => 'Safe\syslog', |
|
1036 | - 'system' => 'Safe\system', |
|
1037 | - 'tempnam' => 'Safe\tempnam', |
|
1038 | - 'timezone_name_from_abbr' => 'Safe\timezone_name_from_abbr', |
|
1039 | - 'time_nanosleep' => 'Safe\time_nanosleep', |
|
1040 | - 'time_sleep_until' => 'Safe\time_sleep_until', |
|
1041 | - 'tmpfile' => 'Safe\tmpfile', |
|
1042 | - 'touch' => 'Safe\touch', |
|
1043 | - 'uasort' => 'Safe\uasort', |
|
1044 | - 'uksort' => 'Safe\uksort', |
|
1045 | - 'unlink' => 'Safe\unlink', |
|
1046 | - 'unpack' => 'Safe\unpack', |
|
1047 | - 'uopz_extend' => 'Safe\uopz_extend', |
|
1048 | - 'uopz_implement' => 'Safe\uopz_implement', |
|
1049 | - 'usort' => 'Safe\usort', |
|
1050 | - 'virtual' => 'Safe\virtual', |
|
1051 | - 'vsprintf' => 'Safe\vsprintf', |
|
1052 | - 'xdiff_file_bdiff' => 'Safe\xdiff_file_bdiff', |
|
1053 | - 'xdiff_file_bpatch' => 'Safe\xdiff_file_bpatch', |
|
1054 | - 'xdiff_file_diff' => 'Safe\xdiff_file_diff', |
|
1055 | - 'xdiff_file_diff_binary' => 'Safe\xdiff_file_diff_binary', |
|
1056 | - 'xdiff_file_patch_binary' => 'Safe\xdiff_file_patch_binary', |
|
1057 | - 'xdiff_file_rabdiff' => 'Safe\xdiff_file_rabdiff', |
|
1058 | - 'xdiff_string_bpatch' => 'Safe\xdiff_string_bpatch', |
|
1059 | - 'xdiff_string_patch' => 'Safe\xdiff_string_patch', |
|
1060 | - 'xdiff_string_patch_binary' => 'Safe\xdiff_string_patch_binary', |
|
1061 | - 'xmlrpc_set_type' => 'Safe\xmlrpc_set_type', |
|
1062 | - 'xml_parser_create' => 'Safe\xml_parser_create', |
|
1063 | - 'xml_parser_create_ns' => 'Safe\xml_parser_create_ns', |
|
1064 | - 'xml_set_object' => 'Safe\xml_set_object', |
|
1065 | - 'yaml_parse' => 'Safe\yaml_parse', |
|
1066 | - 'yaml_parse_file' => 'Safe\yaml_parse_file', |
|
1067 | - 'yaml_parse_url' => 'Safe\yaml_parse_url', |
|
1068 | - 'yaz_ccl_parse' => 'Safe\yaz_ccl_parse', |
|
1069 | - 'yaz_close' => 'Safe\yaz_close', |
|
1070 | - 'yaz_connect' => 'Safe\yaz_connect', |
|
1071 | - 'yaz_database' => 'Safe\yaz_database', |
|
1072 | - 'yaz_element' => 'Safe\yaz_element', |
|
1073 | - 'yaz_present' => 'Safe\yaz_present', |
|
1074 | - 'yaz_search' => 'Safe\yaz_search', |
|
1075 | - 'yaz_wait' => 'Safe\yaz_wait', |
|
1076 | - 'zip_entry_close' => 'Safe\zip_entry_close', |
|
1077 | - 'zip_entry_open' => 'Safe\zip_entry_open', |
|
1078 | - 'zip_entry_read' => 'Safe\zip_entry_read', |
|
1079 | - 'zlib_decode' => 'Safe\zlib_decode', |
|
12 | + $services->set(RenameFunctionRector::class) |
|
13 | + ->call('configure', [[ RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => [ |
|
14 | + 'apache_getenv' => 'Safe\apache_getenv', |
|
15 | + 'apache_get_version' => 'Safe\apache_get_version', |
|
16 | + 'apache_request_headers' => 'Safe\apache_request_headers', |
|
17 | + 'apache_reset_timeout' => 'Safe\apache_reset_timeout', |
|
18 | + 'apache_response_headers' => 'Safe\apache_response_headers', |
|
19 | + 'apache_setenv' => 'Safe\apache_setenv', |
|
20 | + 'apcu_cache_info' => 'Safe\apcu_cache_info', |
|
21 | + 'apcu_cas' => 'Safe\apcu_cas', |
|
22 | + 'apcu_dec' => 'Safe\apcu_dec', |
|
23 | + 'apcu_fetch' => 'Safe\apcu_fetch', |
|
24 | + 'apcu_inc' => 'Safe\apcu_inc', |
|
25 | + 'apcu_sma_info' => 'Safe\apcu_sma_info', |
|
26 | + 'apc_fetch' => 'Safe\apc_fetch', |
|
27 | + 'array_combine' => 'Safe\array_combine', |
|
28 | + 'array_flip' => 'Safe\array_flip', |
|
29 | + 'array_replace' => 'Safe\array_replace', |
|
30 | + 'array_replace_recursive' => 'Safe\array_replace_recursive', |
|
31 | + 'array_walk_recursive' => 'Safe\array_walk_recursive', |
|
32 | + 'arsort' => 'Safe\arsort', |
|
33 | + 'asort' => 'Safe\asort', |
|
34 | + 'base64_decode' => 'Safe\base64_decode', |
|
35 | + 'bzclose' => 'Safe\bzclose', |
|
36 | + 'bzflush' => 'Safe\bzflush', |
|
37 | + 'bzread' => 'Safe\bzread', |
|
38 | + 'bzwrite' => 'Safe\bzwrite', |
|
39 | + 'chdir' => 'Safe\chdir', |
|
40 | + 'chgrp' => 'Safe\chgrp', |
|
41 | + 'chmod' => 'Safe\chmod', |
|
42 | + 'chown' => 'Safe\chown', |
|
43 | + 'chroot' => 'Safe\chroot', |
|
44 | + 'class_alias' => 'Safe\class_alias', |
|
45 | + 'class_implements' => 'Safe\class_implements', |
|
46 | + 'class_parents' => 'Safe\class_parents', |
|
47 | + 'class_uses' => 'Safe\class_uses', |
|
48 | + 'cli_set_process_title' => 'Safe\cli_set_process_title', |
|
49 | + 'closelog' => 'Safe\closelog', |
|
50 | + 'com_event_sink' => 'Safe\com_event_sink', |
|
51 | + 'com_load_typelib' => 'Safe\com_load_typelib', |
|
52 | + 'com_print_typeinfo' => 'Safe\com_print_typeinfo', |
|
53 | + 'convert_uudecode' => 'Safe\convert_uudecode', |
|
54 | + 'convert_uuencode' => 'Safe\convert_uuencode', |
|
55 | + 'copy' => 'Safe\copy', |
|
56 | + 'create_function' => 'Safe\create_function', |
|
57 | + 'cubrid_free_result' => 'Safe\cubrid_free_result', |
|
58 | + 'cubrid_get_charset' => 'Safe\cubrid_get_charset', |
|
59 | + 'cubrid_get_client_info' => 'Safe\cubrid_get_client_info', |
|
60 | + 'cubrid_get_db_parameter' => 'Safe\cubrid_get_db_parameter', |
|
61 | + 'cubrid_get_server_info' => 'Safe\cubrid_get_server_info', |
|
62 | + 'cubrid_insert_id' => 'Safe\cubrid_insert_id', |
|
63 | + 'cubrid_lob2_new' => 'Safe\cubrid_lob2_new', |
|
64 | + 'cubrid_lob2_size' => 'Safe\cubrid_lob2_size', |
|
65 | + 'cubrid_lob2_size64' => 'Safe\cubrid_lob2_size64', |
|
66 | + 'cubrid_lob2_tell' => 'Safe\cubrid_lob2_tell', |
|
67 | + 'cubrid_lob2_tell64' => 'Safe\cubrid_lob2_tell64', |
|
68 | + 'cubrid_set_db_parameter' => 'Safe\cubrid_set_db_parameter', |
|
69 | + 'curl_escape' => 'Safe\curl_escape', |
|
70 | + 'curl_exec' => 'Safe\curl_exec', |
|
71 | + 'curl_getinfo' => 'Safe\curl_getinfo', |
|
72 | + 'curl_init' => 'Safe\curl_init', |
|
73 | + 'curl_multi_errno' => 'Safe\curl_multi_errno', |
|
74 | + 'curl_multi_info_read' => 'Safe\curl_multi_info_read', |
|
75 | + 'curl_multi_init' => 'Safe\curl_multi_init', |
|
76 | + 'curl_setopt' => 'Safe\curl_setopt', |
|
77 | + 'curl_share_errno' => 'Safe\curl_share_errno', |
|
78 | + 'curl_share_setopt' => 'Safe\curl_share_setopt', |
|
79 | + 'curl_unescape' => 'Safe\curl_unescape', |
|
80 | + 'date' => 'Safe\date', |
|
81 | + 'date_parse' => 'Safe\date_parse', |
|
82 | + 'date_parse_from_format' => 'Safe\date_parse_from_format', |
|
83 | + 'date_sunrise' => 'Safe\date_sunrise', |
|
84 | + 'date_sunset' => 'Safe\date_sunset', |
|
85 | + 'date_sun_info' => 'Safe\date_sun_info', |
|
86 | + 'db2_autocommit' => 'Safe\db2_autocommit', |
|
87 | + 'db2_bind_param' => 'Safe\db2_bind_param', |
|
88 | + 'db2_client_info' => 'Safe\db2_client_info', |
|
89 | + 'db2_close' => 'Safe\db2_close', |
|
90 | + 'db2_commit' => 'Safe\db2_commit', |
|
91 | + 'db2_execute' => 'Safe\db2_execute', |
|
92 | + 'db2_free_result' => 'Safe\db2_free_result', |
|
93 | + 'db2_free_stmt' => 'Safe\db2_free_stmt', |
|
94 | + 'db2_get_option' => 'Safe\db2_get_option', |
|
95 | + 'db2_pclose' => 'Safe\db2_pclose', |
|
96 | + 'db2_rollback' => 'Safe\db2_rollback', |
|
97 | + 'db2_server_info' => 'Safe\db2_server_info', |
|
98 | + 'db2_set_option' => 'Safe\db2_set_option', |
|
99 | + 'define' => 'Safe\define', |
|
100 | + 'deflate_add' => 'Safe\deflate_add', |
|
101 | + 'deflate_init' => 'Safe\deflate_init', |
|
102 | + 'disk_free_space' => 'Safe\disk_free_space', |
|
103 | + 'disk_total_space' => 'Safe\disk_total_space', |
|
104 | + 'dl' => 'Safe\dl', |
|
105 | + 'dns_get_record' => 'Safe\dns_get_record', |
|
106 | + 'eio_busy' => 'Safe\eio_busy', |
|
107 | + 'eio_chmod' => 'Safe\eio_chmod', |
|
108 | + 'eio_chown' => 'Safe\eio_chown', |
|
109 | + 'eio_close' => 'Safe\eio_close', |
|
110 | + 'eio_custom' => 'Safe\eio_custom', |
|
111 | + 'eio_dup2' => 'Safe\eio_dup2', |
|
112 | + 'eio_event_loop' => 'Safe\eio_event_loop', |
|
113 | + 'eio_fallocate' => 'Safe\eio_fallocate', |
|
114 | + 'eio_fchmod' => 'Safe\eio_fchmod', |
|
115 | + 'eio_fdatasync' => 'Safe\eio_fdatasync', |
|
116 | + 'eio_fstat' => 'Safe\eio_fstat', |
|
117 | + 'eio_fstatvfs' => 'Safe\eio_fstatvfs', |
|
118 | + 'eio_fsync' => 'Safe\eio_fsync', |
|
119 | + 'eio_ftruncate' => 'Safe\eio_ftruncate', |
|
120 | + 'eio_futime' => 'Safe\eio_futime', |
|
121 | + 'eio_grp' => 'Safe\eio_grp', |
|
122 | + 'eio_lstat' => 'Safe\eio_lstat', |
|
123 | + 'eio_mkdir' => 'Safe\eio_mkdir', |
|
124 | + 'eio_mknod' => 'Safe\eio_mknod', |
|
125 | + 'eio_nop' => 'Safe\eio_nop', |
|
126 | + 'eio_readahead' => 'Safe\eio_readahead', |
|
127 | + 'eio_readdir' => 'Safe\eio_readdir', |
|
128 | + 'eio_readlink' => 'Safe\eio_readlink', |
|
129 | + 'eio_rename' => 'Safe\eio_rename', |
|
130 | + 'eio_rmdir' => 'Safe\eio_rmdir', |
|
131 | + 'eio_seek' => 'Safe\eio_seek', |
|
132 | + 'eio_sendfile' => 'Safe\eio_sendfile', |
|
133 | + 'eio_stat' => 'Safe\eio_stat', |
|
134 | + 'eio_statvfs' => 'Safe\eio_statvfs', |
|
135 | + 'eio_symlink' => 'Safe\eio_symlink', |
|
136 | + 'eio_sync' => 'Safe\eio_sync', |
|
137 | + 'eio_syncfs' => 'Safe\eio_syncfs', |
|
138 | + 'eio_sync_file_range' => 'Safe\eio_sync_file_range', |
|
139 | + 'eio_truncate' => 'Safe\eio_truncate', |
|
140 | + 'eio_unlink' => 'Safe\eio_unlink', |
|
141 | + 'eio_utime' => 'Safe\eio_utime', |
|
142 | + 'eio_write' => 'Safe\eio_write', |
|
143 | + 'error_log' => 'Safe\error_log', |
|
144 | + 'fastcgi_finish_request' => 'Safe\fastcgi_finish_request', |
|
145 | + 'fbird_blob_cancel' => 'Safe\fbird_blob_cancel', |
|
146 | + 'fclose' => 'Safe\fclose', |
|
147 | + 'fflush' => 'Safe\fflush', |
|
148 | + 'file' => 'Safe\file', |
|
149 | + 'fileatime' => 'Safe\fileatime', |
|
150 | + 'filectime' => 'Safe\filectime', |
|
151 | + 'fileinode' => 'Safe\fileinode', |
|
152 | + 'filemtime' => 'Safe\filemtime', |
|
153 | + 'fileowner' => 'Safe\fileowner', |
|
154 | + 'filesize' => 'Safe\filesize', |
|
155 | + 'file_get_contents' => 'Safe\file_get_contents', |
|
156 | + 'file_put_contents' => 'Safe\file_put_contents', |
|
157 | + 'filter_input_array' => 'Safe\filter_input_array', |
|
158 | + 'filter_var_array' => 'Safe\filter_var_array', |
|
159 | + 'finfo_close' => 'Safe\finfo_close', |
|
160 | + 'finfo_open' => 'Safe\finfo_open', |
|
161 | + 'flock' => 'Safe\flock', |
|
162 | + 'fopen' => 'Safe\fopen', |
|
163 | + 'fputcsv' => 'Safe\fputcsv', |
|
164 | + 'fread' => 'Safe\fread', |
|
165 | + 'fsockopen' => 'Safe\fsockopen', |
|
166 | + 'ftp_alloc' => 'Safe\ftp_alloc', |
|
167 | + 'ftp_append' => 'Safe\ftp_append', |
|
168 | + 'ftp_cdup' => 'Safe\ftp_cdup', |
|
169 | + 'ftp_chdir' => 'Safe\ftp_chdir', |
|
170 | + 'ftp_chmod' => 'Safe\ftp_chmod', |
|
171 | + 'ftp_close' => 'Safe\ftp_close', |
|
172 | + 'ftp_connect' => 'Safe\ftp_connect', |
|
173 | + 'ftp_delete' => 'Safe\ftp_delete', |
|
174 | + 'ftp_fget' => 'Safe\ftp_fget', |
|
175 | + 'ftp_fput' => 'Safe\ftp_fput', |
|
176 | + 'ftp_get' => 'Safe\ftp_get', |
|
177 | + 'ftp_login' => 'Safe\ftp_login', |
|
178 | + 'ftp_mkdir' => 'Safe\ftp_mkdir', |
|
179 | + 'ftp_mlsd' => 'Safe\ftp_mlsd', |
|
180 | + 'ftp_nlist' => 'Safe\ftp_nlist', |
|
181 | + 'ftp_pasv' => 'Safe\ftp_pasv', |
|
182 | + 'ftp_put' => 'Safe\ftp_put', |
|
183 | + 'ftp_pwd' => 'Safe\ftp_pwd', |
|
184 | + 'ftp_rename' => 'Safe\ftp_rename', |
|
185 | + 'ftp_rmdir' => 'Safe\ftp_rmdir', |
|
186 | + 'ftp_site' => 'Safe\ftp_site', |
|
187 | + 'ftp_ssl_connect' => 'Safe\ftp_ssl_connect', |
|
188 | + 'ftp_systype' => 'Safe\ftp_systype', |
|
189 | + 'ftruncate' => 'Safe\ftruncate', |
|
190 | + 'fwrite' => 'Safe\fwrite', |
|
191 | + 'getallheaders' => 'Safe\getallheaders', |
|
192 | + 'getcwd' => 'Safe\getcwd', |
|
193 | + 'gethostname' => 'Safe\gethostname', |
|
194 | + 'getimagesize' => 'Safe\getimagesize', |
|
195 | + 'getlastmod' => 'Safe\getlastmod', |
|
196 | + 'getmygid' => 'Safe\getmygid', |
|
197 | + 'getmyinode' => 'Safe\getmyinode', |
|
198 | + 'getmypid' => 'Safe\getmypid', |
|
199 | + 'getmyuid' => 'Safe\getmyuid', |
|
200 | + 'getopt' => 'Safe\getopt', |
|
201 | + 'getprotobyname' => 'Safe\getprotobyname', |
|
202 | + 'getprotobynumber' => 'Safe\getprotobynumber', |
|
203 | + 'get_headers' => 'Safe\get_headers', |
|
204 | + 'glob' => 'Safe\glob', |
|
205 | + 'gmdate' => 'Safe\gmdate', |
|
206 | + 'gmp_binomial' => 'Safe\gmp_binomial', |
|
207 | + 'gmp_export' => 'Safe\gmp_export', |
|
208 | + 'gmp_import' => 'Safe\gmp_import', |
|
209 | + 'gmp_random_seed' => 'Safe\gmp_random_seed', |
|
210 | + 'gnupg_adddecryptkey' => 'Safe\gnupg_adddecryptkey', |
|
211 | + 'gnupg_addencryptkey' => 'Safe\gnupg_addencryptkey', |
|
212 | + 'gnupg_addsignkey' => 'Safe\gnupg_addsignkey', |
|
213 | + 'gnupg_cleardecryptkeys' => 'Safe\gnupg_cleardecryptkeys', |
|
214 | + 'gnupg_clearencryptkeys' => 'Safe\gnupg_clearencryptkeys', |
|
215 | + 'gnupg_clearsignkeys' => 'Safe\gnupg_clearsignkeys', |
|
216 | + 'gnupg_setarmor' => 'Safe\gnupg_setarmor', |
|
217 | + 'gnupg_setsignmode' => 'Safe\gnupg_setsignmode', |
|
218 | + 'gzclose' => 'Safe\gzclose', |
|
219 | + 'gzcompress' => 'Safe\gzcompress', |
|
220 | + 'gzdecode' => 'Safe\gzdecode', |
|
221 | + 'gzdeflate' => 'Safe\gzdeflate', |
|
222 | + 'gzencode' => 'Safe\gzencode', |
|
223 | + 'gzgets' => 'Safe\gzgets', |
|
224 | + 'gzgetss' => 'Safe\gzgetss', |
|
225 | + 'gzinflate' => 'Safe\gzinflate', |
|
226 | + 'gzpassthru' => 'Safe\gzpassthru', |
|
227 | + 'gzrewind' => 'Safe\gzrewind', |
|
228 | + 'gzuncompress' => 'Safe\gzuncompress', |
|
229 | + 'hash_hkdf' => 'Safe\hash_hkdf', |
|
230 | + 'hash_update_file' => 'Safe\hash_update_file', |
|
231 | + 'header_register_callback' => 'Safe\header_register_callback', |
|
232 | + 'hex2bin' => 'Safe\hex2bin', |
|
233 | + 'highlight_file' => 'Safe\highlight_file', |
|
234 | + 'highlight_string' => 'Safe\highlight_string', |
|
235 | + 'ibase_add_user' => 'Safe\ibase_add_user', |
|
236 | + 'ibase_backup' => 'Safe\ibase_backup', |
|
237 | + 'ibase_blob_cancel' => 'Safe\ibase_blob_cancel', |
|
238 | + 'ibase_blob_create' => 'Safe\ibase_blob_create', |
|
239 | + 'ibase_blob_get' => 'Safe\ibase_blob_get', |
|
240 | + 'ibase_close' => 'Safe\ibase_close', |
|
241 | + 'ibase_commit' => 'Safe\ibase_commit', |
|
242 | + 'ibase_commit_ret' => 'Safe\ibase_commit_ret', |
|
243 | + 'ibase_connect' => 'Safe\ibase_connect', |
|
244 | + 'ibase_delete_user' => 'Safe\ibase_delete_user', |
|
245 | + 'ibase_drop_db' => 'Safe\ibase_drop_db', |
|
246 | + 'ibase_free_event_handler' => 'Safe\ibase_free_event_handler', |
|
247 | + 'ibase_free_query' => 'Safe\ibase_free_query', |
|
248 | + 'ibase_free_result' => 'Safe\ibase_free_result', |
|
249 | + 'ibase_maintain_db' => 'Safe\ibase_maintain_db', |
|
250 | + 'ibase_modify_user' => 'Safe\ibase_modify_user', |
|
251 | + 'ibase_name_result' => 'Safe\ibase_name_result', |
|
252 | + 'ibase_pconnect' => 'Safe\ibase_pconnect', |
|
253 | + 'ibase_restore' => 'Safe\ibase_restore', |
|
254 | + 'ibase_rollback' => 'Safe\ibase_rollback', |
|
255 | + 'ibase_rollback_ret' => 'Safe\ibase_rollback_ret', |
|
256 | + 'ibase_service_attach' => 'Safe\ibase_service_attach', |
|
257 | + 'ibase_service_detach' => 'Safe\ibase_service_detach', |
|
258 | + 'iconv' => 'Safe\iconv', |
|
259 | + 'iconv_get_encoding' => 'Safe\iconv_get_encoding', |
|
260 | + 'iconv_set_encoding' => 'Safe\iconv_set_encoding', |
|
261 | + 'image2wbmp' => 'Safe\image2wbmp', |
|
262 | + 'imageaffine' => 'Safe\imageaffine', |
|
263 | + 'imageaffinematrixconcat' => 'Safe\imageaffinematrixconcat', |
|
264 | + 'imageaffinematrixget' => 'Safe\imageaffinematrixget', |
|
265 | + 'imagealphablending' => 'Safe\imagealphablending', |
|
266 | + 'imageantialias' => 'Safe\imageantialias', |
|
267 | + 'imagearc' => 'Safe\imagearc', |
|
268 | + 'imagebmp' => 'Safe\imagebmp', |
|
269 | + 'imagechar' => 'Safe\imagechar', |
|
270 | + 'imagecharup' => 'Safe\imagecharup', |
|
271 | + 'imagecolorat' => 'Safe\imagecolorat', |
|
272 | + 'imagecolordeallocate' => 'Safe\imagecolordeallocate', |
|
273 | + 'imagecolormatch' => 'Safe\imagecolormatch', |
|
274 | + 'imageconvolution' => 'Safe\imageconvolution', |
|
275 | + 'imagecopy' => 'Safe\imagecopy', |
|
276 | + 'imagecopymerge' => 'Safe\imagecopymerge', |
|
277 | + 'imagecopymergegray' => 'Safe\imagecopymergegray', |
|
278 | + 'imagecopyresampled' => 'Safe\imagecopyresampled', |
|
279 | + 'imagecopyresized' => 'Safe\imagecopyresized', |
|
280 | + 'imagecreate' => 'Safe\imagecreate', |
|
281 | + 'imagecreatefrombmp' => 'Safe\imagecreatefrombmp', |
|
282 | + 'imagecreatefromgd' => 'Safe\imagecreatefromgd', |
|
283 | + 'imagecreatefromgd2' => 'Safe\imagecreatefromgd2', |
|
284 | + 'imagecreatefromgd2part' => 'Safe\imagecreatefromgd2part', |
|
285 | + 'imagecreatefromgif' => 'Safe\imagecreatefromgif', |
|
286 | + 'imagecreatefromjpeg' => 'Safe\imagecreatefromjpeg', |
|
287 | + 'imagecreatefrompng' => 'Safe\imagecreatefrompng', |
|
288 | + 'imagecreatefromwbmp' => 'Safe\imagecreatefromwbmp', |
|
289 | + 'imagecreatefromwebp' => 'Safe\imagecreatefromwebp', |
|
290 | + 'imagecreatefromxbm' => 'Safe\imagecreatefromxbm', |
|
291 | + 'imagecreatefromxpm' => 'Safe\imagecreatefromxpm', |
|
292 | + 'imagecreatetruecolor' => 'Safe\imagecreatetruecolor', |
|
293 | + 'imagecrop' => 'Safe\imagecrop', |
|
294 | + 'imagecropauto' => 'Safe\imagecropauto', |
|
295 | + 'imagedashedline' => 'Safe\imagedashedline', |
|
296 | + 'imagedestroy' => 'Safe\imagedestroy', |
|
297 | + 'imageellipse' => 'Safe\imageellipse', |
|
298 | + 'imagefill' => 'Safe\imagefill', |
|
299 | + 'imagefilledarc' => 'Safe\imagefilledarc', |
|
300 | + 'imagefilledellipse' => 'Safe\imagefilledellipse', |
|
301 | + 'imagefilledpolygon' => 'Safe\imagefilledpolygon', |
|
302 | + 'imagefilledrectangle' => 'Safe\imagefilledrectangle', |
|
303 | + 'imagefilltoborder' => 'Safe\imagefilltoborder', |
|
304 | + 'imagefilter' => 'Safe\imagefilter', |
|
305 | + 'imageflip' => 'Safe\imageflip', |
|
306 | + 'imagegammacorrect' => 'Safe\imagegammacorrect', |
|
307 | + 'imagegd' => 'Safe\imagegd', |
|
308 | + 'imagegd2' => 'Safe\imagegd2', |
|
309 | + 'imagegif' => 'Safe\imagegif', |
|
310 | + 'imagegrabscreen' => 'Safe\imagegrabscreen', |
|
311 | + 'imagegrabwindow' => 'Safe\imagegrabwindow', |
|
312 | + 'imagejpeg' => 'Safe\imagejpeg', |
|
313 | + 'imagelayereffect' => 'Safe\imagelayereffect', |
|
314 | + 'imageline' => 'Safe\imageline', |
|
315 | + 'imageloadfont' => 'Safe\imageloadfont', |
|
316 | + 'imageopenpolygon' => 'Safe\imageopenpolygon', |
|
317 | + 'imagepng' => 'Safe\imagepng', |
|
318 | + 'imagepolygon' => 'Safe\imagepolygon', |
|
319 | + 'imagerectangle' => 'Safe\imagerectangle', |
|
320 | + 'imagerotate' => 'Safe\imagerotate', |
|
321 | + 'imagesavealpha' => 'Safe\imagesavealpha', |
|
322 | + 'imagescale' => 'Safe\imagescale', |
|
323 | + 'imagesetbrush' => 'Safe\imagesetbrush', |
|
324 | + 'imagesetclip' => 'Safe\imagesetclip', |
|
325 | + 'imagesetinterpolation' => 'Safe\imagesetinterpolation', |
|
326 | + 'imagesetpixel' => 'Safe\imagesetpixel', |
|
327 | + 'imagesetstyle' => 'Safe\imagesetstyle', |
|
328 | + 'imagesetthickness' => 'Safe\imagesetthickness', |
|
329 | + 'imagesettile' => 'Safe\imagesettile', |
|
330 | + 'imagestring' => 'Safe\imagestring', |
|
331 | + 'imagestringup' => 'Safe\imagestringup', |
|
332 | + 'imagesx' => 'Safe\imagesx', |
|
333 | + 'imagesy' => 'Safe\imagesy', |
|
334 | + 'imagetruecolortopalette' => 'Safe\imagetruecolortopalette', |
|
335 | + 'imagettfbbox' => 'Safe\imagettfbbox', |
|
336 | + 'imagettftext' => 'Safe\imagettftext', |
|
337 | + 'imagewbmp' => 'Safe\imagewbmp', |
|
338 | + 'imagewebp' => 'Safe\imagewebp', |
|
339 | + 'imagexbm' => 'Safe\imagexbm', |
|
340 | + 'imap_append' => 'Safe\imap_append', |
|
341 | + 'imap_check' => 'Safe\imap_check', |
|
342 | + 'imap_clearflag_full' => 'Safe\imap_clearflag_full', |
|
343 | + 'imap_close' => 'Safe\imap_close', |
|
344 | + 'imap_createmailbox' => 'Safe\imap_createmailbox', |
|
345 | + 'imap_deletemailbox' => 'Safe\imap_deletemailbox', |
|
346 | + 'imap_fetchstructure' => 'Safe\imap_fetchstructure', |
|
347 | + 'imap_gc' => 'Safe\imap_gc', |
|
348 | + 'imap_headerinfo' => 'Safe\imap_headerinfo', |
|
349 | + 'imap_mail' => 'Safe\imap_mail', |
|
350 | + 'imap_mailboxmsginfo' => 'Safe\imap_mailboxmsginfo', |
|
351 | + 'imap_mail_compose' => 'Safe\imap_mail_compose', |
|
352 | + 'imap_mail_copy' => 'Safe\imap_mail_copy', |
|
353 | + 'imap_mail_move' => 'Safe\imap_mail_move', |
|
354 | + 'imap_mutf7_to_utf8' => 'Safe\imap_mutf7_to_utf8', |
|
355 | + 'imap_num_msg' => 'Safe\imap_num_msg', |
|
356 | + 'imap_open' => 'Safe\imap_open', |
|
357 | + 'imap_renamemailbox' => 'Safe\imap_renamemailbox', |
|
358 | + 'imap_savebody' => 'Safe\imap_savebody', |
|
359 | + 'imap_setacl' => 'Safe\imap_setacl', |
|
360 | + 'imap_setflag_full' => 'Safe\imap_setflag_full', |
|
361 | + 'imap_set_quota' => 'Safe\imap_set_quota', |
|
362 | + 'imap_sort' => 'Safe\imap_sort', |
|
363 | + 'imap_subscribe' => 'Safe\imap_subscribe', |
|
364 | + 'imap_thread' => 'Safe\imap_thread', |
|
365 | + 'imap_timeout' => 'Safe\imap_timeout', |
|
366 | + 'imap_undelete' => 'Safe\imap_undelete', |
|
367 | + 'imap_unsubscribe' => 'Safe\imap_unsubscribe', |
|
368 | + 'imap_utf8_to_mutf7' => 'Safe\imap_utf8_to_mutf7', |
|
369 | + 'inet_ntop' => 'Safe\inet_ntop', |
|
370 | + 'inflate_add' => 'Safe\inflate_add', |
|
371 | + 'inflate_get_read_len' => 'Safe\inflate_get_read_len', |
|
372 | + 'inflate_get_status' => 'Safe\inflate_get_status', |
|
373 | + 'inflate_init' => 'Safe\inflate_init', |
|
374 | + 'ingres_autocommit' => 'Safe\ingres_autocommit', |
|
375 | + 'ingres_close' => 'Safe\ingres_close', |
|
376 | + 'ingres_commit' => 'Safe\ingres_commit', |
|
377 | + 'ingres_connect' => 'Safe\ingres_connect', |
|
378 | + 'ingres_execute' => 'Safe\ingres_execute', |
|
379 | + 'ingres_field_name' => 'Safe\ingres_field_name', |
|
380 | + 'ingres_field_type' => 'Safe\ingres_field_type', |
|
381 | + 'ingres_free_result' => 'Safe\ingres_free_result', |
|
382 | + 'ingres_pconnect' => 'Safe\ingres_pconnect', |
|
383 | + 'ingres_result_seek' => 'Safe\ingres_result_seek', |
|
384 | + 'ingres_rollback' => 'Safe\ingres_rollback', |
|
385 | + 'ingres_set_environment' => 'Safe\ingres_set_environment', |
|
386 | + 'ini_get' => 'Safe\ini_get', |
|
387 | + 'ini_set' => 'Safe\ini_set', |
|
388 | + 'inotify_init' => 'Safe\inotify_init', |
|
389 | + 'inotify_rm_watch' => 'Safe\inotify_rm_watch', |
|
390 | + 'iptcembed' => 'Safe\iptcembed', |
|
391 | + 'iptcparse' => 'Safe\iptcparse', |
|
392 | + 'jdtounix' => 'Safe\jdtounix', |
|
393 | + 'jpeg2wbmp' => 'Safe\jpeg2wbmp', |
|
394 | + 'json_decode' => 'Safe\json_decode', |
|
395 | + 'json_encode' => 'Safe\json_encode', |
|
396 | + 'json_last_error_msg' => 'Safe\json_last_error_msg', |
|
397 | + 'krsort' => 'Safe\krsort', |
|
398 | + 'ksort' => 'Safe\ksort', |
|
399 | + 'lchgrp' => 'Safe\lchgrp', |
|
400 | + 'lchown' => 'Safe\lchown', |
|
401 | + 'ldap_add' => 'Safe\ldap_add', |
|
402 | + 'ldap_add_ext' => 'Safe\ldap_add_ext', |
|
403 | + 'ldap_bind' => 'Safe\ldap_bind', |
|
404 | + 'ldap_bind_ext' => 'Safe\ldap_bind_ext', |
|
405 | + 'ldap_control_paged_result' => 'Safe\ldap_control_paged_result', |
|
406 | + 'ldap_control_paged_result_response' => 'Safe\ldap_control_paged_result_response', |
|
407 | + 'ldap_count_entries' => 'Safe\ldap_count_entries', |
|
408 | + 'ldap_delete' => 'Safe\ldap_delete', |
|
409 | + 'ldap_delete_ext' => 'Safe\ldap_delete_ext', |
|
410 | + 'ldap_exop' => 'Safe\ldap_exop', |
|
411 | + 'ldap_exop_passwd' => 'Safe\ldap_exop_passwd', |
|
412 | + 'ldap_exop_whoami' => 'Safe\ldap_exop_whoami', |
|
413 | + 'ldap_explode_dn' => 'Safe\ldap_explode_dn', |
|
414 | + 'ldap_first_attribute' => 'Safe\ldap_first_attribute', |
|
415 | + 'ldap_first_entry' => 'Safe\ldap_first_entry', |
|
416 | + 'ldap_free_result' => 'Safe\ldap_free_result', |
|
417 | + 'ldap_get_attributes' => 'Safe\ldap_get_attributes', |
|
418 | + 'ldap_get_dn' => 'Safe\ldap_get_dn', |
|
419 | + 'ldap_get_entries' => 'Safe\ldap_get_entries', |
|
420 | + 'ldap_get_option' => 'Safe\ldap_get_option', |
|
421 | + 'ldap_get_values' => 'Safe\ldap_get_values', |
|
422 | + 'ldap_get_values_len' => 'Safe\ldap_get_values_len', |
|
423 | + 'ldap_list' => 'Safe\ldap_list', |
|
424 | + 'ldap_modify_batch' => 'Safe\ldap_modify_batch', |
|
425 | + 'ldap_mod_add' => 'Safe\ldap_mod_add', |
|
426 | + 'ldap_mod_add_ext' => 'Safe\ldap_mod_add_ext', |
|
427 | + 'ldap_mod_del' => 'Safe\ldap_mod_del', |
|
428 | + 'ldap_mod_del_ext' => 'Safe\ldap_mod_del_ext', |
|
429 | + 'ldap_mod_replace' => 'Safe\ldap_mod_replace', |
|
430 | + 'ldap_mod_replace_ext' => 'Safe\ldap_mod_replace_ext', |
|
431 | + 'ldap_next_attribute' => 'Safe\ldap_next_attribute', |
|
432 | + 'ldap_parse_exop' => 'Safe\ldap_parse_exop', |
|
433 | + 'ldap_parse_result' => 'Safe\ldap_parse_result', |
|
434 | + 'ldap_read' => 'Safe\ldap_read', |
|
435 | + 'ldap_rename' => 'Safe\ldap_rename', |
|
436 | + 'ldap_rename_ext' => 'Safe\ldap_rename_ext', |
|
437 | + 'ldap_sasl_bind' => 'Safe\ldap_sasl_bind', |
|
438 | + 'ldap_search' => 'Safe\ldap_search', |
|
439 | + 'ldap_set_option' => 'Safe\ldap_set_option', |
|
440 | + 'ldap_unbind' => 'Safe\ldap_unbind', |
|
441 | + 'libxml_get_last_error' => 'Safe\libxml_get_last_error', |
|
442 | + 'libxml_set_external_entity_loader' => 'Safe\libxml_set_external_entity_loader', |
|
443 | + 'link' => 'Safe\link', |
|
444 | + 'lzf_compress' => 'Safe\lzf_compress', |
|
445 | + 'lzf_decompress' => 'Safe\lzf_decompress', |
|
446 | + 'mailparse_msg_extract_part_file' => 'Safe\mailparse_msg_extract_part_file', |
|
447 | + 'mailparse_msg_free' => 'Safe\mailparse_msg_free', |
|
448 | + 'mailparse_msg_parse' => 'Safe\mailparse_msg_parse', |
|
449 | + 'mailparse_msg_parse_file' => 'Safe\mailparse_msg_parse_file', |
|
450 | + 'mailparse_stream_encode' => 'Safe\mailparse_stream_encode', |
|
451 | + 'mb_chr' => 'Safe\mb_chr', |
|
452 | + 'mb_detect_order' => 'Safe\mb_detect_order', |
|
453 | + 'mb_encoding_aliases' => 'Safe\mb_encoding_aliases', |
|
454 | + 'mb_eregi_replace' => 'Safe\mb_eregi_replace', |
|
455 | + 'mb_ereg_replace' => 'Safe\mb_ereg_replace', |
|
456 | + 'mb_ereg_replace_callback' => 'Safe\mb_ereg_replace_callback', |
|
457 | + 'mb_ereg_search_getregs' => 'Safe\mb_ereg_search_getregs', |
|
458 | + 'mb_ereg_search_init' => 'Safe\mb_ereg_search_init', |
|
459 | + 'mb_ereg_search_regs' => 'Safe\mb_ereg_search_regs', |
|
460 | + 'mb_ereg_search_setpos' => 'Safe\mb_ereg_search_setpos', |
|
461 | + 'mb_http_output' => 'Safe\mb_http_output', |
|
462 | + 'mb_internal_encoding' => 'Safe\mb_internal_encoding', |
|
463 | + 'mb_ord' => 'Safe\mb_ord', |
|
464 | + 'mb_parse_str' => 'Safe\mb_parse_str', |
|
465 | + 'mb_regex_encoding' => 'Safe\mb_regex_encoding', |
|
466 | + 'mb_send_mail' => 'Safe\mb_send_mail', |
|
467 | + 'mb_split' => 'Safe\mb_split', |
|
468 | + 'mb_str_split' => 'Safe\mb_str_split', |
|
469 | + 'md5_file' => 'Safe\md5_file', |
|
470 | + 'metaphone' => 'Safe\metaphone', |
|
471 | + 'mime_content_type' => 'Safe\mime_content_type', |
|
472 | + 'mkdir' => 'Safe\mkdir', |
|
473 | + 'mktime' => 'Safe\mktime', |
|
474 | + 'msg_queue_exists' => 'Safe\msg_queue_exists', |
|
475 | + 'msg_receive' => 'Safe\msg_receive', |
|
476 | + 'msg_remove_queue' => 'Safe\msg_remove_queue', |
|
477 | + 'msg_send' => 'Safe\msg_send', |
|
478 | + 'msg_set_queue' => 'Safe\msg_set_queue', |
|
479 | + 'msql_affected_rows' => 'Safe\msql_affected_rows', |
|
480 | + 'msql_close' => 'Safe\msql_close', |
|
481 | + 'msql_connect' => 'Safe\msql_connect', |
|
482 | + 'msql_create_db' => 'Safe\msql_create_db', |
|
483 | + 'msql_data_seek' => 'Safe\msql_data_seek', |
|
484 | + 'msql_db_query' => 'Safe\msql_db_query', |
|
485 | + 'msql_drop_db' => 'Safe\msql_drop_db', |
|
486 | + 'msql_field_len' => 'Safe\msql_field_len', |
|
487 | + 'msql_field_name' => 'Safe\msql_field_name', |
|
488 | + 'msql_field_seek' => 'Safe\msql_field_seek', |
|
489 | + 'msql_field_table' => 'Safe\msql_field_table', |
|
490 | + 'msql_field_type' => 'Safe\msql_field_type', |
|
491 | + 'msql_free_result' => 'Safe\msql_free_result', |
|
492 | + 'msql_pconnect' => 'Safe\msql_pconnect', |
|
493 | + 'msql_query' => 'Safe\msql_query', |
|
494 | + 'msql_select_db' => 'Safe\msql_select_db', |
|
495 | + 'mysqli_get_cache_stats' => 'Safe\mysqli_get_cache_stats', |
|
496 | + 'mysqli_get_client_stats' => 'Safe\mysqli_get_client_stats', |
|
497 | + 'mysqlnd_ms_dump_servers' => 'Safe\mysqlnd_ms_dump_servers', |
|
498 | + 'mysqlnd_ms_fabric_select_global' => 'Safe\mysqlnd_ms_fabric_select_global', |
|
499 | + 'mysqlnd_ms_fabric_select_shard' => 'Safe\mysqlnd_ms_fabric_select_shard', |
|
500 | + 'mysqlnd_ms_get_last_used_connection' => 'Safe\mysqlnd_ms_get_last_used_connection', |
|
501 | + 'mysqlnd_qc_clear_cache' => 'Safe\mysqlnd_qc_clear_cache', |
|
502 | + 'mysqlnd_qc_set_is_select' => 'Safe\mysqlnd_qc_set_is_select', |
|
503 | + 'mysqlnd_qc_set_storage_handler' => 'Safe\mysqlnd_qc_set_storage_handler', |
|
504 | + 'mysql_close' => 'Safe\mysql_close', |
|
505 | + 'mysql_connect' => 'Safe\mysql_connect', |
|
506 | + 'mysql_create_db' => 'Safe\mysql_create_db', |
|
507 | + 'mysql_data_seek' => 'Safe\mysql_data_seek', |
|
508 | + 'mysql_db_name' => 'Safe\mysql_db_name', |
|
509 | + 'mysql_db_query' => 'Safe\mysql_db_query', |
|
510 | + 'mysql_drop_db' => 'Safe\mysql_drop_db', |
|
511 | + 'mysql_fetch_lengths' => 'Safe\mysql_fetch_lengths', |
|
512 | + 'mysql_field_flags' => 'Safe\mysql_field_flags', |
|
513 | + 'mysql_field_len' => 'Safe\mysql_field_len', |
|
514 | + 'mysql_field_name' => 'Safe\mysql_field_name', |
|
515 | + 'mysql_field_seek' => 'Safe\mysql_field_seek', |
|
516 | + 'mysql_free_result' => 'Safe\mysql_free_result', |
|
517 | + 'mysql_get_host_info' => 'Safe\mysql_get_host_info', |
|
518 | + 'mysql_get_proto_info' => 'Safe\mysql_get_proto_info', |
|
519 | + 'mysql_get_server_info' => 'Safe\mysql_get_server_info', |
|
520 | + 'mysql_info' => 'Safe\mysql_info', |
|
521 | + 'mysql_list_dbs' => 'Safe\mysql_list_dbs', |
|
522 | + 'mysql_list_fields' => 'Safe\mysql_list_fields', |
|
523 | + 'mysql_list_processes' => 'Safe\mysql_list_processes', |
|
524 | + 'mysql_list_tables' => 'Safe\mysql_list_tables', |
|
525 | + 'mysql_num_fields' => 'Safe\mysql_num_fields', |
|
526 | + 'mysql_num_rows' => 'Safe\mysql_num_rows', |
|
527 | + 'mysql_query' => 'Safe\mysql_query', |
|
528 | + 'mysql_real_escape_string' => 'Safe\mysql_real_escape_string', |
|
529 | + 'mysql_result' => 'Safe\mysql_result', |
|
530 | + 'mysql_select_db' => 'Safe\mysql_select_db', |
|
531 | + 'mysql_set_charset' => 'Safe\mysql_set_charset', |
|
532 | + 'mysql_tablename' => 'Safe\mysql_tablename', |
|
533 | + 'mysql_thread_id' => 'Safe\mysql_thread_id', |
|
534 | + 'mysql_unbuffered_query' => 'Safe\mysql_unbuffered_query', |
|
535 | + 'natcasesort' => 'Safe\natcasesort', |
|
536 | + 'natsort' => 'Safe\natsort', |
|
537 | + 'ob_end_clean' => 'Safe\ob_end_clean', |
|
538 | + 'ob_end_flush' => 'Safe\ob_end_flush', |
|
539 | + 'oci_bind_array_by_name' => 'Safe\oci_bind_array_by_name', |
|
540 | + 'oci_bind_by_name' => 'Safe\oci_bind_by_name', |
|
541 | + 'oci_cancel' => 'Safe\oci_cancel', |
|
542 | + 'oci_close' => 'Safe\oci_close', |
|
543 | + 'oci_commit' => 'Safe\oci_commit', |
|
544 | + 'oci_connect' => 'Safe\oci_connect', |
|
545 | + 'oci_define_by_name' => 'Safe\oci_define_by_name', |
|
546 | + 'oci_execute' => 'Safe\oci_execute', |
|
547 | + 'oci_fetch_all' => 'Safe\oci_fetch_all', |
|
548 | + 'oci_field_name' => 'Safe\oci_field_name', |
|
549 | + 'oci_field_precision' => 'Safe\oci_field_precision', |
|
550 | + 'oci_field_scale' => 'Safe\oci_field_scale', |
|
551 | + 'oci_field_size' => 'Safe\oci_field_size', |
|
552 | + 'oci_field_type' => 'Safe\oci_field_type', |
|
553 | + 'oci_field_type_raw' => 'Safe\oci_field_type_raw', |
|
554 | + 'oci_free_descriptor' => 'Safe\oci_free_descriptor', |
|
555 | + 'oci_free_statement' => 'Safe\oci_free_statement', |
|
556 | + 'oci_new_collection' => 'Safe\oci_new_collection', |
|
557 | + 'oci_new_connect' => 'Safe\oci_new_connect', |
|
558 | + 'oci_new_cursor' => 'Safe\oci_new_cursor', |
|
559 | + 'oci_new_descriptor' => 'Safe\oci_new_descriptor', |
|
560 | + 'oci_num_fields' => 'Safe\oci_num_fields', |
|
561 | + 'oci_num_rows' => 'Safe\oci_num_rows', |
|
562 | + 'oci_parse' => 'Safe\oci_parse', |
|
563 | + 'oci_pconnect' => 'Safe\oci_pconnect', |
|
564 | + 'oci_result' => 'Safe\oci_result', |
|
565 | + 'oci_rollback' => 'Safe\oci_rollback', |
|
566 | + 'oci_server_version' => 'Safe\oci_server_version', |
|
567 | + 'oci_set_action' => 'Safe\oci_set_action', |
|
568 | + 'oci_set_call_timeout' => 'Safe\oci_set_call_timeout', |
|
569 | + 'oci_set_client_identifier' => 'Safe\oci_set_client_identifier', |
|
570 | + 'oci_set_client_info' => 'Safe\oci_set_client_info', |
|
571 | + 'oci_set_db_operation' => 'Safe\oci_set_db_operation', |
|
572 | + 'oci_set_edition' => 'Safe\oci_set_edition', |
|
573 | + 'oci_set_module_name' => 'Safe\oci_set_module_name', |
|
574 | + 'oci_set_prefetch' => 'Safe\oci_set_prefetch', |
|
575 | + 'oci_statement_type' => 'Safe\oci_statement_type', |
|
576 | + 'oci_unregister_taf_callback' => 'Safe\oci_unregister_taf_callback', |
|
577 | + 'odbc_autocommit' => 'Safe\odbc_autocommit', |
|
578 | + 'odbc_binmode' => 'Safe\odbc_binmode', |
|
579 | + 'odbc_columnprivileges' => 'Safe\odbc_columnprivileges', |
|
580 | + 'odbc_columns' => 'Safe\odbc_columns', |
|
581 | + 'odbc_commit' => 'Safe\odbc_commit', |
|
582 | + 'odbc_data_source' => 'Safe\odbc_data_source', |
|
583 | + 'odbc_exec' => 'Safe\odbc_exec', |
|
584 | + 'odbc_execute' => 'Safe\odbc_execute', |
|
585 | + 'odbc_fetch_into' => 'Safe\odbc_fetch_into', |
|
586 | + 'odbc_field_len' => 'Safe\odbc_field_len', |
|
587 | + 'odbc_field_name' => 'Safe\odbc_field_name', |
|
588 | + 'odbc_field_num' => 'Safe\odbc_field_num', |
|
589 | + 'odbc_field_scale' => 'Safe\odbc_field_scale', |
|
590 | + 'odbc_field_type' => 'Safe\odbc_field_type', |
|
591 | + 'odbc_foreignkeys' => 'Safe\odbc_foreignkeys', |
|
592 | + 'odbc_gettypeinfo' => 'Safe\odbc_gettypeinfo', |
|
593 | + 'odbc_longreadlen' => 'Safe\odbc_longreadlen', |
|
594 | + 'odbc_prepare' => 'Safe\odbc_prepare', |
|
595 | + 'odbc_primarykeys' => 'Safe\odbc_primarykeys', |
|
596 | + 'odbc_result' => 'Safe\odbc_result', |
|
597 | + 'odbc_result_all' => 'Safe\odbc_result_all', |
|
598 | + 'odbc_rollback' => 'Safe\odbc_rollback', |
|
599 | + 'odbc_setoption' => 'Safe\odbc_setoption', |
|
600 | + 'odbc_specialcolumns' => 'Safe\odbc_specialcolumns', |
|
601 | + 'odbc_statistics' => 'Safe\odbc_statistics', |
|
602 | + 'odbc_tableprivileges' => 'Safe\odbc_tableprivileges', |
|
603 | + 'odbc_tables' => 'Safe\odbc_tables', |
|
604 | + 'opcache_compile_file' => 'Safe\opcache_compile_file', |
|
605 | + 'opcache_get_status' => 'Safe\opcache_get_status', |
|
606 | + 'opendir' => 'Safe\opendir', |
|
607 | + 'openlog' => 'Safe\openlog', |
|
608 | + 'openssl_cipher_iv_length' => 'Safe\openssl_cipher_iv_length', |
|
609 | + 'openssl_csr_export' => 'Safe\openssl_csr_export', |
|
610 | + 'openssl_csr_export_to_file' => 'Safe\openssl_csr_export_to_file', |
|
611 | + 'openssl_csr_get_subject' => 'Safe\openssl_csr_get_subject', |
|
612 | + 'openssl_csr_new' => 'Safe\openssl_csr_new', |
|
613 | + 'openssl_csr_sign' => 'Safe\openssl_csr_sign', |
|
614 | + 'openssl_decrypt' => 'Safe\openssl_decrypt', |
|
615 | + 'openssl_dh_compute_key' => 'Safe\openssl_dh_compute_key', |
|
616 | + 'openssl_digest' => 'Safe\openssl_digest', |
|
617 | + 'openssl_encrypt' => 'Safe\openssl_encrypt', |
|
618 | + 'openssl_open' => 'Safe\openssl_open', |
|
619 | + 'openssl_pbkdf2' => 'Safe\openssl_pbkdf2', |
|
620 | + 'openssl_pkcs7_decrypt' => 'Safe\openssl_pkcs7_decrypt', |
|
621 | + 'openssl_pkcs7_encrypt' => 'Safe\openssl_pkcs7_encrypt', |
|
622 | + 'openssl_pkcs7_read' => 'Safe\openssl_pkcs7_read', |
|
623 | + 'openssl_pkcs7_sign' => 'Safe\openssl_pkcs7_sign', |
|
624 | + 'openssl_pkcs12_export' => 'Safe\openssl_pkcs12_export', |
|
625 | + 'openssl_pkcs12_export_to_file' => 'Safe\openssl_pkcs12_export_to_file', |
|
626 | + 'openssl_pkcs12_read' => 'Safe\openssl_pkcs12_read', |
|
627 | + 'openssl_pkey_export' => 'Safe\openssl_pkey_export', |
|
628 | + 'openssl_pkey_export_to_file' => 'Safe\openssl_pkey_export_to_file', |
|
629 | + 'openssl_pkey_get_private' => 'Safe\openssl_pkey_get_private', |
|
630 | + 'openssl_pkey_get_public' => 'Safe\openssl_pkey_get_public', |
|
631 | + 'openssl_pkey_new' => 'Safe\openssl_pkey_new', |
|
632 | + 'openssl_private_decrypt' => 'Safe\openssl_private_decrypt', |
|
633 | + 'openssl_private_encrypt' => 'Safe\openssl_private_encrypt', |
|
634 | + 'openssl_public_decrypt' => 'Safe\openssl_public_decrypt', |
|
635 | + 'openssl_public_encrypt' => 'Safe\openssl_public_encrypt', |
|
636 | + 'openssl_random_pseudo_bytes' => 'Safe\openssl_random_pseudo_bytes', |
|
637 | + 'openssl_seal' => 'Safe\openssl_seal', |
|
638 | + 'openssl_sign' => 'Safe\openssl_sign', |
|
639 | + 'openssl_x509_export' => 'Safe\openssl_x509_export', |
|
640 | + 'openssl_x509_export_to_file' => 'Safe\openssl_x509_export_to_file', |
|
641 | + 'openssl_x509_fingerprint' => 'Safe\openssl_x509_fingerprint', |
|
642 | + 'openssl_x509_read' => 'Safe\openssl_x509_read', |
|
643 | + 'output_add_rewrite_var' => 'Safe\output_add_rewrite_var', |
|
644 | + 'output_reset_rewrite_vars' => 'Safe\output_reset_rewrite_vars', |
|
645 | + 'pack' => 'Safe\pack', |
|
646 | + 'parse_ini_file' => 'Safe\parse_ini_file', |
|
647 | + 'parse_ini_string' => 'Safe\parse_ini_string', |
|
648 | + 'parse_url' => 'Safe\parse_url', |
|
649 | + 'password_hash' => 'Safe\password_hash', |
|
650 | + 'pcntl_exec' => 'Safe\pcntl_exec', |
|
651 | + 'pcntl_getpriority' => 'Safe\pcntl_getpriority', |
|
652 | + 'pcntl_setpriority' => 'Safe\pcntl_setpriority', |
|
653 | + 'pcntl_signal_dispatch' => 'Safe\pcntl_signal_dispatch', |
|
654 | + 'pcntl_sigprocmask' => 'Safe\pcntl_sigprocmask', |
|
655 | + 'pcntl_strerror' => 'Safe\pcntl_strerror', |
|
656 | + 'PDF_activate_item' => 'Safe\PDF_activate_item', |
|
657 | + 'PDF_add_locallink' => 'Safe\PDF_add_locallink', |
|
658 | + 'PDF_add_nameddest' => 'Safe\PDF_add_nameddest', |
|
659 | + 'PDF_add_note' => 'Safe\PDF_add_note', |
|
660 | + 'PDF_add_pdflink' => 'Safe\PDF_add_pdflink', |
|
661 | + 'PDF_add_thumbnail' => 'Safe\PDF_add_thumbnail', |
|
662 | + 'PDF_add_weblink' => 'Safe\PDF_add_weblink', |
|
663 | + 'PDF_attach_file' => 'Safe\PDF_attach_file', |
|
664 | + 'PDF_begin_layer' => 'Safe\PDF_begin_layer', |
|
665 | + 'PDF_begin_page' => 'Safe\PDF_begin_page', |
|
666 | + 'PDF_begin_page_ext' => 'Safe\PDF_begin_page_ext', |
|
667 | + 'PDF_circle' => 'Safe\PDF_circle', |
|
668 | + 'PDF_clip' => 'Safe\PDF_clip', |
|
669 | + 'PDF_close' => 'Safe\PDF_close', |
|
670 | + 'PDF_closepath' => 'Safe\PDF_closepath', |
|
671 | + 'PDF_closepath_fill_stroke' => 'Safe\PDF_closepath_fill_stroke', |
|
672 | + 'PDF_closepath_stroke' => 'Safe\PDF_closepath_stroke', |
|
673 | + 'PDF_close_pdi' => 'Safe\PDF_close_pdi', |
|
674 | + 'PDF_close_pdi_page' => 'Safe\PDF_close_pdi_page', |
|
675 | + 'PDF_concat' => 'Safe\PDF_concat', |
|
676 | + 'PDF_continue_text' => 'Safe\PDF_continue_text', |
|
677 | + 'PDF_curveto' => 'Safe\PDF_curveto', |
|
678 | + 'PDF_delete' => 'Safe\PDF_delete', |
|
679 | + 'PDF_end_layer' => 'Safe\PDF_end_layer', |
|
680 | + 'PDF_end_page' => 'Safe\PDF_end_page', |
|
681 | + 'PDF_end_page_ext' => 'Safe\PDF_end_page_ext', |
|
682 | + 'PDF_end_pattern' => 'Safe\PDF_end_pattern', |
|
683 | + 'PDF_end_template' => 'Safe\PDF_end_template', |
|
684 | + 'PDF_fill' => 'Safe\PDF_fill', |
|
685 | + 'PDF_fill_stroke' => 'Safe\PDF_fill_stroke', |
|
686 | + 'PDF_fit_image' => 'Safe\PDF_fit_image', |
|
687 | + 'PDF_fit_pdi_page' => 'Safe\PDF_fit_pdi_page', |
|
688 | + 'PDF_fit_textline' => 'Safe\PDF_fit_textline', |
|
689 | + 'PDF_initgraphics' => 'Safe\PDF_initgraphics', |
|
690 | + 'PDF_lineto' => 'Safe\PDF_lineto', |
|
691 | + 'PDF_makespotcolor' => 'Safe\PDF_makespotcolor', |
|
692 | + 'PDF_moveto' => 'Safe\PDF_moveto', |
|
693 | + 'PDF_open_file' => 'Safe\PDF_open_file', |
|
694 | + 'PDF_place_image' => 'Safe\PDF_place_image', |
|
695 | + 'PDF_place_pdi_page' => 'Safe\PDF_place_pdi_page', |
|
696 | + 'PDF_rect' => 'Safe\PDF_rect', |
|
697 | + 'PDF_restore' => 'Safe\PDF_restore', |
|
698 | + 'PDF_rotate' => 'Safe\PDF_rotate', |
|
699 | + 'PDF_save' => 'Safe\PDF_save', |
|
700 | + 'PDF_scale' => 'Safe\PDF_scale', |
|
701 | + 'PDF_setcolor' => 'Safe\PDF_setcolor', |
|
702 | + 'PDF_setdash' => 'Safe\PDF_setdash', |
|
703 | + 'PDF_setdashpattern' => 'Safe\PDF_setdashpattern', |
|
704 | + 'PDF_setflat' => 'Safe\PDF_setflat', |
|
705 | + 'PDF_setfont' => 'Safe\PDF_setfont', |
|
706 | + 'PDF_setgray' => 'Safe\PDF_setgray', |
|
707 | + 'PDF_setgray_fill' => 'Safe\PDF_setgray_fill', |
|
708 | + 'PDF_setgray_stroke' => 'Safe\PDF_setgray_stroke', |
|
709 | + 'PDF_setlinejoin' => 'Safe\PDF_setlinejoin', |
|
710 | + 'PDF_setlinewidth' => 'Safe\PDF_setlinewidth', |
|
711 | + 'PDF_setmatrix' => 'Safe\PDF_setmatrix', |
|
712 | + 'PDF_setmiterlimit' => 'Safe\PDF_setmiterlimit', |
|
713 | + 'PDF_setrgbcolor' => 'Safe\PDF_setrgbcolor', |
|
714 | + 'PDF_setrgbcolor_fill' => 'Safe\PDF_setrgbcolor_fill', |
|
715 | + 'PDF_setrgbcolor_stroke' => 'Safe\PDF_setrgbcolor_stroke', |
|
716 | + 'PDF_set_border_color' => 'Safe\PDF_set_border_color', |
|
717 | + 'PDF_set_border_dash' => 'Safe\PDF_set_border_dash', |
|
718 | + 'PDF_set_border_style' => 'Safe\PDF_set_border_style', |
|
719 | + 'PDF_set_info' => 'Safe\PDF_set_info', |
|
720 | + 'PDF_set_layer_dependency' => 'Safe\PDF_set_layer_dependency', |
|
721 | + 'PDF_set_parameter' => 'Safe\PDF_set_parameter', |
|
722 | + 'PDF_set_text_pos' => 'Safe\PDF_set_text_pos', |
|
723 | + 'PDF_set_value' => 'Safe\PDF_set_value', |
|
724 | + 'PDF_show' => 'Safe\PDF_show', |
|
725 | + 'PDF_show_xy' => 'Safe\PDF_show_xy', |
|
726 | + 'PDF_skew' => 'Safe\PDF_skew', |
|
727 | + 'PDF_stroke' => 'Safe\PDF_stroke', |
|
728 | + 'pg_cancel_query' => 'Safe\pg_cancel_query', |
|
729 | + 'pg_client_encoding' => 'Safe\pg_client_encoding', |
|
730 | + 'pg_close' => 'Safe\pg_close', |
|
731 | + 'pg_connect' => 'Safe\pg_connect', |
|
732 | + 'pg_connection_reset' => 'Safe\pg_connection_reset', |
|
733 | + 'pg_convert' => 'Safe\pg_convert', |
|
734 | + 'pg_copy_from' => 'Safe\pg_copy_from', |
|
735 | + 'pg_copy_to' => 'Safe\pg_copy_to', |
|
736 | + 'pg_dbname' => 'Safe\pg_dbname', |
|
737 | + 'pg_delete' => 'Safe\pg_delete', |
|
738 | + 'pg_end_copy' => 'Safe\pg_end_copy', |
|
739 | + 'pg_execute' => 'Safe\pg_execute', |
|
740 | + 'pg_field_name' => 'Safe\pg_field_name', |
|
741 | + 'pg_field_table' => 'Safe\pg_field_table', |
|
742 | + 'pg_field_type' => 'Safe\pg_field_type', |
|
743 | + 'pg_flush' => 'Safe\pg_flush', |
|
744 | + 'pg_free_result' => 'Safe\pg_free_result', |
|
745 | + 'pg_host' => 'Safe\pg_host', |
|
746 | + 'pg_insert' => 'Safe\pg_insert', |
|
747 | + 'pg_last_error' => 'Safe\pg_last_error', |
|
748 | + 'pg_last_notice' => 'Safe\pg_last_notice', |
|
749 | + 'pg_last_oid' => 'Safe\pg_last_oid', |
|
750 | + 'pg_lo_close' => 'Safe\pg_lo_close', |
|
751 | + 'pg_lo_export' => 'Safe\pg_lo_export', |
|
752 | + 'pg_lo_import' => 'Safe\pg_lo_import', |
|
753 | + 'pg_lo_open' => 'Safe\pg_lo_open', |
|
754 | + 'pg_lo_read' => 'Safe\pg_lo_read', |
|
755 | + 'pg_lo_read_all' => 'Safe\pg_lo_read_all', |
|
756 | + 'pg_lo_seek' => 'Safe\pg_lo_seek', |
|
757 | + 'pg_lo_truncate' => 'Safe\pg_lo_truncate', |
|
758 | + 'pg_lo_unlink' => 'Safe\pg_lo_unlink', |
|
759 | + 'pg_lo_write' => 'Safe\pg_lo_write', |
|
760 | + 'pg_meta_data' => 'Safe\pg_meta_data', |
|
761 | + 'pg_options' => 'Safe\pg_options', |
|
762 | + 'pg_parameter_status' => 'Safe\pg_parameter_status', |
|
763 | + 'pg_pconnect' => 'Safe\pg_pconnect', |
|
764 | + 'pg_ping' => 'Safe\pg_ping', |
|
765 | + 'pg_port' => 'Safe\pg_port', |
|
766 | + 'pg_prepare' => 'Safe\pg_prepare', |
|
767 | + 'pg_put_line' => 'Safe\pg_put_line', |
|
768 | + 'pg_query' => 'Safe\pg_query', |
|
769 | + 'pg_query_params' => 'Safe\pg_query_params', |
|
770 | + 'pg_result_error_field' => 'Safe\pg_result_error_field', |
|
771 | + 'pg_result_seek' => 'Safe\pg_result_seek', |
|
772 | + 'pg_select' => 'Safe\pg_select', |
|
773 | + 'pg_send_execute' => 'Safe\pg_send_execute', |
|
774 | + 'pg_send_prepare' => 'Safe\pg_send_prepare', |
|
775 | + 'pg_send_query' => 'Safe\pg_send_query', |
|
776 | + 'pg_send_query_params' => 'Safe\pg_send_query_params', |
|
777 | + 'pg_socket' => 'Safe\pg_socket', |
|
778 | + 'pg_trace' => 'Safe\pg_trace', |
|
779 | + 'pg_tty' => 'Safe\pg_tty', |
|
780 | + 'pg_update' => 'Safe\pg_update', |
|
781 | + 'pg_version' => 'Safe\pg_version', |
|
782 | + 'phpcredits' => 'Safe\phpcredits', |
|
783 | + 'phpinfo' => 'Safe\phpinfo', |
|
784 | + 'png2wbmp' => 'Safe\png2wbmp', |
|
785 | + 'posix_access' => 'Safe\posix_access', |
|
786 | + 'posix_getgrnam' => 'Safe\posix_getgrnam', |
|
787 | + 'posix_getpgid' => 'Safe\posix_getpgid', |
|
788 | + 'posix_initgroups' => 'Safe\posix_initgroups', |
|
789 | + 'posix_kill' => 'Safe\posix_kill', |
|
790 | + 'posix_mkfifo' => 'Safe\posix_mkfifo', |
|
791 | + 'posix_mknod' => 'Safe\posix_mknod', |
|
792 | + 'posix_setegid' => 'Safe\posix_setegid', |
|
793 | + 'posix_seteuid' => 'Safe\posix_seteuid', |
|
794 | + 'posix_setgid' => 'Safe\posix_setgid', |
|
795 | + 'posix_setpgid' => 'Safe\posix_setpgid', |
|
796 | + 'posix_setrlimit' => 'Safe\posix_setrlimit', |
|
797 | + 'posix_setuid' => 'Safe\posix_setuid', |
|
798 | + 'preg_match' => 'Safe\preg_match', |
|
799 | + 'preg_match_all' => 'Safe\preg_match_all', |
|
800 | + 'preg_replace' => 'Safe\preg_replace', |
|
801 | + 'preg_split' => 'Safe\preg_split', |
|
802 | + 'proc_get_status' => 'Safe\proc_get_status', |
|
803 | + 'proc_nice' => 'Safe\proc_nice', |
|
804 | + 'pspell_add_to_personal' => 'Safe\pspell_add_to_personal', |
|
805 | + 'pspell_add_to_session' => 'Safe\pspell_add_to_session', |
|
806 | + 'pspell_clear_session' => 'Safe\pspell_clear_session', |
|
807 | + 'pspell_config_create' => 'Safe\pspell_config_create', |
|
808 | + 'pspell_config_data_dir' => 'Safe\pspell_config_data_dir', |
|
809 | + 'pspell_config_dict_dir' => 'Safe\pspell_config_dict_dir', |
|
810 | + 'pspell_config_ignore' => 'Safe\pspell_config_ignore', |
|
811 | + 'pspell_config_mode' => 'Safe\pspell_config_mode', |
|
812 | + 'pspell_config_personal' => 'Safe\pspell_config_personal', |
|
813 | + 'pspell_config_repl' => 'Safe\pspell_config_repl', |
|
814 | + 'pspell_config_runtogether' => 'Safe\pspell_config_runtogether', |
|
815 | + 'pspell_config_save_repl' => 'Safe\pspell_config_save_repl', |
|
816 | + 'pspell_new' => 'Safe\pspell_new', |
|
817 | + 'pspell_new_config' => 'Safe\pspell_new_config', |
|
818 | + 'pspell_save_wordlist' => 'Safe\pspell_save_wordlist', |
|
819 | + 'pspell_store_replacement' => 'Safe\pspell_store_replacement', |
|
820 | + 'ps_add_launchlink' => 'Safe\ps_add_launchlink', |
|
821 | + 'ps_add_locallink' => 'Safe\ps_add_locallink', |
|
822 | + 'ps_add_note' => 'Safe\ps_add_note', |
|
823 | + 'ps_add_pdflink' => 'Safe\ps_add_pdflink', |
|
824 | + 'ps_add_weblink' => 'Safe\ps_add_weblink', |
|
825 | + 'ps_arc' => 'Safe\ps_arc', |
|
826 | + 'ps_arcn' => 'Safe\ps_arcn', |
|
827 | + 'ps_begin_page' => 'Safe\ps_begin_page', |
|
828 | + 'ps_begin_pattern' => 'Safe\ps_begin_pattern', |
|
829 | + 'ps_begin_template' => 'Safe\ps_begin_template', |
|
830 | + 'ps_circle' => 'Safe\ps_circle', |
|
831 | + 'ps_clip' => 'Safe\ps_clip', |
|
832 | + 'ps_close' => 'Safe\ps_close', |
|
833 | + 'ps_closepath' => 'Safe\ps_closepath', |
|
834 | + 'ps_closepath_stroke' => 'Safe\ps_closepath_stroke', |
|
835 | + 'ps_close_image' => 'Safe\ps_close_image', |
|
836 | + 'ps_continue_text' => 'Safe\ps_continue_text', |
|
837 | + 'ps_curveto' => 'Safe\ps_curveto', |
|
838 | + 'ps_delete' => 'Safe\ps_delete', |
|
839 | + 'ps_end_page' => 'Safe\ps_end_page', |
|
840 | + 'ps_end_pattern' => 'Safe\ps_end_pattern', |
|
841 | + 'ps_end_template' => 'Safe\ps_end_template', |
|
842 | + 'ps_fill' => 'Safe\ps_fill', |
|
843 | + 'ps_fill_stroke' => 'Safe\ps_fill_stroke', |
|
844 | + 'ps_get_parameter' => 'Safe\ps_get_parameter', |
|
845 | + 'ps_hyphenate' => 'Safe\ps_hyphenate', |
|
846 | + 'ps_include_file' => 'Safe\ps_include_file', |
|
847 | + 'ps_lineto' => 'Safe\ps_lineto', |
|
848 | + 'ps_moveto' => 'Safe\ps_moveto', |
|
849 | + 'ps_new' => 'Safe\ps_new', |
|
850 | + 'ps_open_file' => 'Safe\ps_open_file', |
|
851 | + 'ps_place_image' => 'Safe\ps_place_image', |
|
852 | + 'ps_rect' => 'Safe\ps_rect', |
|
853 | + 'ps_restore' => 'Safe\ps_restore', |
|
854 | + 'ps_rotate' => 'Safe\ps_rotate', |
|
855 | + 'ps_save' => 'Safe\ps_save', |
|
856 | + 'ps_scale' => 'Safe\ps_scale', |
|
857 | + 'ps_setcolor' => 'Safe\ps_setcolor', |
|
858 | + 'ps_setdash' => 'Safe\ps_setdash', |
|
859 | + 'ps_setflat' => 'Safe\ps_setflat', |
|
860 | + 'ps_setfont' => 'Safe\ps_setfont', |
|
861 | + 'ps_setgray' => 'Safe\ps_setgray', |
|
862 | + 'ps_setlinecap' => 'Safe\ps_setlinecap', |
|
863 | + 'ps_setlinejoin' => 'Safe\ps_setlinejoin', |
|
864 | + 'ps_setlinewidth' => 'Safe\ps_setlinewidth', |
|
865 | + 'ps_setmiterlimit' => 'Safe\ps_setmiterlimit', |
|
866 | + 'ps_setoverprintmode' => 'Safe\ps_setoverprintmode', |
|
867 | + 'ps_setpolydash' => 'Safe\ps_setpolydash', |
|
868 | + 'ps_set_border_color' => 'Safe\ps_set_border_color', |
|
869 | + 'ps_set_border_dash' => 'Safe\ps_set_border_dash', |
|
870 | + 'ps_set_border_style' => 'Safe\ps_set_border_style', |
|
871 | + 'ps_set_info' => 'Safe\ps_set_info', |
|
872 | + 'ps_set_parameter' => 'Safe\ps_set_parameter', |
|
873 | + 'ps_set_text_pos' => 'Safe\ps_set_text_pos', |
|
874 | + 'ps_set_value' => 'Safe\ps_set_value', |
|
875 | + 'ps_shading' => 'Safe\ps_shading', |
|
876 | + 'ps_shading_pattern' => 'Safe\ps_shading_pattern', |
|
877 | + 'ps_shfill' => 'Safe\ps_shfill', |
|
878 | + 'ps_show' => 'Safe\ps_show', |
|
879 | + 'ps_show2' => 'Safe\ps_show2', |
|
880 | + 'ps_show_xy' => 'Safe\ps_show_xy', |
|
881 | + 'ps_show_xy2' => 'Safe\ps_show_xy2', |
|
882 | + 'ps_stroke' => 'Safe\ps_stroke', |
|
883 | + 'ps_symbol' => 'Safe\ps_symbol', |
|
884 | + 'ps_translate' => 'Safe\ps_translate', |
|
885 | + 'putenv' => 'Safe\putenv', |
|
886 | + 'readfile' => 'Safe\readfile', |
|
887 | + 'readgzfile' => 'Safe\readgzfile', |
|
888 | + 'readline_add_history' => 'Safe\readline_add_history', |
|
889 | + 'readline_callback_handler_install' => 'Safe\readline_callback_handler_install', |
|
890 | + 'readline_clear_history' => 'Safe\readline_clear_history', |
|
891 | + 'readline_completion_function' => 'Safe\readline_completion_function', |
|
892 | + 'readline_read_history' => 'Safe\readline_read_history', |
|
893 | + 'readline_write_history' => 'Safe\readline_write_history', |
|
894 | + 'readlink' => 'Safe\readlink', |
|
895 | + 'realpath' => 'Safe\realpath', |
|
896 | + 'register_tick_function' => 'Safe\register_tick_function', |
|
897 | + 'rename' => 'Safe\rename', |
|
898 | + 'rewind' => 'Safe\rewind', |
|
899 | + 'rewinddir' => 'Safe\rewinddir', |
|
900 | + 'rmdir' => 'Safe\rmdir', |
|
901 | + 'rpmaddtag' => 'Safe\rpmaddtag', |
|
902 | + 'rrd_create' => 'Safe\rrd_create', |
|
903 | + 'rsort' => 'Safe\rsort', |
|
904 | + 'sapi_windows_cp_conv' => 'Safe\sapi_windows_cp_conv', |
|
905 | + 'sapi_windows_cp_set' => 'Safe\sapi_windows_cp_set', |
|
906 | + 'sapi_windows_generate_ctrl_event' => 'Safe\sapi_windows_generate_ctrl_event', |
|
907 | + 'sapi_windows_vt100_support' => 'Safe\sapi_windows_vt100_support', |
|
908 | + 'scandir' => 'Safe\scandir', |
|
909 | + 'sem_acquire' => 'Safe\sem_acquire', |
|
910 | + 'sem_get' => 'Safe\sem_get', |
|
911 | + 'sem_release' => 'Safe\sem_release', |
|
912 | + 'sem_remove' => 'Safe\sem_remove', |
|
913 | + 'session_abort' => 'Safe\session_abort', |
|
914 | + 'session_decode' => 'Safe\session_decode', |
|
915 | + 'session_destroy' => 'Safe\session_destroy', |
|
916 | + 'session_regenerate_id' => 'Safe\session_regenerate_id', |
|
917 | + 'session_reset' => 'Safe\session_reset', |
|
918 | + 'session_unset' => 'Safe\session_unset', |
|
919 | + 'session_write_close' => 'Safe\session_write_close', |
|
920 | + 'settype' => 'Safe\settype', |
|
921 | + 'set_include_path' => 'Safe\set_include_path', |
|
922 | + 'set_time_limit' => 'Safe\set_time_limit', |
|
923 | + 'sha1_file' => 'Safe\sha1_file', |
|
924 | + 'shmop_delete' => 'Safe\shmop_delete', |
|
925 | + 'shmop_read' => 'Safe\shmop_read', |
|
926 | + 'shmop_write' => 'Safe\shmop_write', |
|
927 | + 'shm_put_var' => 'Safe\shm_put_var', |
|
928 | + 'shm_remove' => 'Safe\shm_remove', |
|
929 | + 'shm_remove_var' => 'Safe\shm_remove_var', |
|
930 | + 'shuffle' => 'Safe\shuffle', |
|
931 | + 'simplexml_import_dom' => 'Safe\simplexml_import_dom', |
|
932 | + 'simplexml_load_file' => 'Safe\simplexml_load_file', |
|
933 | + 'simplexml_load_string' => 'Safe\simplexml_load_string', |
|
934 | + 'sleep' => 'Safe\sleep', |
|
935 | + 'socket_accept' => 'Safe\socket_accept', |
|
936 | + 'socket_addrinfo_bind' => 'Safe\socket_addrinfo_bind', |
|
937 | + 'socket_addrinfo_connect' => 'Safe\socket_addrinfo_connect', |
|
938 | + 'socket_bind' => 'Safe\socket_bind', |
|
939 | + 'socket_connect' => 'Safe\socket_connect', |
|
940 | + 'socket_create' => 'Safe\socket_create', |
|
941 | + 'socket_create_listen' => 'Safe\socket_create_listen', |
|
942 | + 'socket_create_pair' => 'Safe\socket_create_pair', |
|
943 | + 'socket_export_stream' => 'Safe\socket_export_stream', |
|
944 | + 'socket_getpeername' => 'Safe\socket_getpeername', |
|
945 | + 'socket_getsockname' => 'Safe\socket_getsockname', |
|
946 | + 'socket_get_option' => 'Safe\socket_get_option', |
|
947 | + 'socket_import_stream' => 'Safe\socket_import_stream', |
|
948 | + 'socket_listen' => 'Safe\socket_listen', |
|
949 | + 'socket_read' => 'Safe\socket_read', |
|
950 | + 'socket_send' => 'Safe\socket_send', |
|
951 | + 'socket_sendmsg' => 'Safe\socket_sendmsg', |
|
952 | + 'socket_sendto' => 'Safe\socket_sendto', |
|
953 | + 'socket_set_block' => 'Safe\socket_set_block', |
|
954 | + 'socket_set_nonblock' => 'Safe\socket_set_nonblock', |
|
955 | + 'socket_set_option' => 'Safe\socket_set_option', |
|
956 | + 'socket_shutdown' => 'Safe\socket_shutdown', |
|
957 | + 'socket_write' => 'Safe\socket_write', |
|
958 | + 'socket_wsaprotocol_info_export' => 'Safe\socket_wsaprotocol_info_export', |
|
959 | + 'socket_wsaprotocol_info_import' => 'Safe\socket_wsaprotocol_info_import', |
|
960 | + 'socket_wsaprotocol_info_release' => 'Safe\socket_wsaprotocol_info_release', |
|
961 | + 'sodium_crypto_pwhash' => 'Safe\sodium_crypto_pwhash', |
|
962 | + 'sodium_crypto_pwhash_str' => 'Safe\sodium_crypto_pwhash_str', |
|
963 | + 'solr_get_version' => 'Safe\solr_get_version', |
|
964 | + 'sort' => 'Safe\sort', |
|
965 | + 'soundex' => 'Safe\soundex', |
|
966 | + 'spl_autoload_register' => 'Safe\spl_autoload_register', |
|
967 | + 'spl_autoload_unregister' => 'Safe\spl_autoload_unregister', |
|
968 | + 'sprintf' => 'Safe\sprintf', |
|
969 | + 'sqlsrv_begin_transaction' => 'Safe\sqlsrv_begin_transaction', |
|
970 | + 'sqlsrv_cancel' => 'Safe\sqlsrv_cancel', |
|
971 | + 'sqlsrv_client_info' => 'Safe\sqlsrv_client_info', |
|
972 | + 'sqlsrv_close' => 'Safe\sqlsrv_close', |
|
973 | + 'sqlsrv_commit' => 'Safe\sqlsrv_commit', |
|
974 | + 'sqlsrv_configure' => 'Safe\sqlsrv_configure', |
|
975 | + 'sqlsrv_execute' => 'Safe\sqlsrv_execute', |
|
976 | + 'sqlsrv_free_stmt' => 'Safe\sqlsrv_free_stmt', |
|
977 | + 'sqlsrv_get_field' => 'Safe\sqlsrv_get_field', |
|
978 | + 'sqlsrv_next_result' => 'Safe\sqlsrv_next_result', |
|
979 | + 'sqlsrv_num_fields' => 'Safe\sqlsrv_num_fields', |
|
980 | + 'sqlsrv_num_rows' => 'Safe\sqlsrv_num_rows', |
|
981 | + 'sqlsrv_prepare' => 'Safe\sqlsrv_prepare', |
|
982 | + 'sqlsrv_query' => 'Safe\sqlsrv_query', |
|
983 | + 'sqlsrv_rollback' => 'Safe\sqlsrv_rollback', |
|
984 | + 'ssdeep_fuzzy_compare' => 'Safe\ssdeep_fuzzy_compare', |
|
985 | + 'ssdeep_fuzzy_hash' => 'Safe\ssdeep_fuzzy_hash', |
|
986 | + 'ssdeep_fuzzy_hash_filename' => 'Safe\ssdeep_fuzzy_hash_filename', |
|
987 | + 'ssh2_auth_agent' => 'Safe\ssh2_auth_agent', |
|
988 | + 'ssh2_auth_hostbased_file' => 'Safe\ssh2_auth_hostbased_file', |
|
989 | + 'ssh2_auth_password' => 'Safe\ssh2_auth_password', |
|
990 | + 'ssh2_auth_pubkey_file' => 'Safe\ssh2_auth_pubkey_file', |
|
991 | + 'ssh2_connect' => 'Safe\ssh2_connect', |
|
992 | + 'ssh2_disconnect' => 'Safe\ssh2_disconnect', |
|
993 | + 'ssh2_exec' => 'Safe\ssh2_exec', |
|
994 | + 'ssh2_publickey_add' => 'Safe\ssh2_publickey_add', |
|
995 | + 'ssh2_publickey_init' => 'Safe\ssh2_publickey_init', |
|
996 | + 'ssh2_publickey_remove' => 'Safe\ssh2_publickey_remove', |
|
997 | + 'ssh2_scp_recv' => 'Safe\ssh2_scp_recv', |
|
998 | + 'ssh2_scp_send' => 'Safe\ssh2_scp_send', |
|
999 | + 'ssh2_sftp' => 'Safe\ssh2_sftp', |
|
1000 | + 'ssh2_sftp_chmod' => 'Safe\ssh2_sftp_chmod', |
|
1001 | + 'ssh2_sftp_mkdir' => 'Safe\ssh2_sftp_mkdir', |
|
1002 | + 'ssh2_sftp_rename' => 'Safe\ssh2_sftp_rename', |
|
1003 | + 'ssh2_sftp_rmdir' => 'Safe\ssh2_sftp_rmdir', |
|
1004 | + 'ssh2_sftp_symlink' => 'Safe\ssh2_sftp_symlink', |
|
1005 | + 'ssh2_sftp_unlink' => 'Safe\ssh2_sftp_unlink', |
|
1006 | + 'stream_context_set_params' => 'Safe\stream_context_set_params', |
|
1007 | + 'stream_copy_to_stream' => 'Safe\stream_copy_to_stream', |
|
1008 | + 'stream_filter_append' => 'Safe\stream_filter_append', |
|
1009 | + 'stream_filter_prepend' => 'Safe\stream_filter_prepend', |
|
1010 | + 'stream_filter_register' => 'Safe\stream_filter_register', |
|
1011 | + 'stream_filter_remove' => 'Safe\stream_filter_remove', |
|
1012 | + 'stream_get_contents' => 'Safe\stream_get_contents', |
|
1013 | + 'stream_isatty' => 'Safe\stream_isatty', |
|
1014 | + 'stream_resolve_include_path' => 'Safe\stream_resolve_include_path', |
|
1015 | + 'stream_set_blocking' => 'Safe\stream_set_blocking', |
|
1016 | + 'stream_set_timeout' => 'Safe\stream_set_timeout', |
|
1017 | + 'stream_socket_accept' => 'Safe\stream_socket_accept', |
|
1018 | + 'stream_socket_client' => 'Safe\stream_socket_client', |
|
1019 | + 'stream_socket_pair' => 'Safe\stream_socket_pair', |
|
1020 | + 'stream_socket_server' => 'Safe\stream_socket_server', |
|
1021 | + 'stream_socket_shutdown' => 'Safe\stream_socket_shutdown', |
|
1022 | + 'stream_supports_lock' => 'Safe\stream_supports_lock', |
|
1023 | + 'stream_wrapper_register' => 'Safe\stream_wrapper_register', |
|
1024 | + 'stream_wrapper_restore' => 'Safe\stream_wrapper_restore', |
|
1025 | + 'stream_wrapper_unregister' => 'Safe\stream_wrapper_unregister', |
|
1026 | + 'strptime' => 'Safe\strptime', |
|
1027 | + 'strtotime' => 'Safe\strtotime', |
|
1028 | + 'substr' => 'Safe\substr', |
|
1029 | + 'swoole_async_write' => 'Safe\swoole_async_write', |
|
1030 | + 'swoole_async_writefile' => 'Safe\swoole_async_writefile', |
|
1031 | + 'swoole_event_defer' => 'Safe\swoole_event_defer', |
|
1032 | + 'swoole_event_del' => 'Safe\swoole_event_del', |
|
1033 | + 'swoole_event_write' => 'Safe\swoole_event_write', |
|
1034 | + 'symlink' => 'Safe\symlink', |
|
1035 | + 'syslog' => 'Safe\syslog', |
|
1036 | + 'system' => 'Safe\system', |
|
1037 | + 'tempnam' => 'Safe\tempnam', |
|
1038 | + 'timezone_name_from_abbr' => 'Safe\timezone_name_from_abbr', |
|
1039 | + 'time_nanosleep' => 'Safe\time_nanosleep', |
|
1040 | + 'time_sleep_until' => 'Safe\time_sleep_until', |
|
1041 | + 'tmpfile' => 'Safe\tmpfile', |
|
1042 | + 'touch' => 'Safe\touch', |
|
1043 | + 'uasort' => 'Safe\uasort', |
|
1044 | + 'uksort' => 'Safe\uksort', |
|
1045 | + 'unlink' => 'Safe\unlink', |
|
1046 | + 'unpack' => 'Safe\unpack', |
|
1047 | + 'uopz_extend' => 'Safe\uopz_extend', |
|
1048 | + 'uopz_implement' => 'Safe\uopz_implement', |
|
1049 | + 'usort' => 'Safe\usort', |
|
1050 | + 'virtual' => 'Safe\virtual', |
|
1051 | + 'vsprintf' => 'Safe\vsprintf', |
|
1052 | + 'xdiff_file_bdiff' => 'Safe\xdiff_file_bdiff', |
|
1053 | + 'xdiff_file_bpatch' => 'Safe\xdiff_file_bpatch', |
|
1054 | + 'xdiff_file_diff' => 'Safe\xdiff_file_diff', |
|
1055 | + 'xdiff_file_diff_binary' => 'Safe\xdiff_file_diff_binary', |
|
1056 | + 'xdiff_file_patch_binary' => 'Safe\xdiff_file_patch_binary', |
|
1057 | + 'xdiff_file_rabdiff' => 'Safe\xdiff_file_rabdiff', |
|
1058 | + 'xdiff_string_bpatch' => 'Safe\xdiff_string_bpatch', |
|
1059 | + 'xdiff_string_patch' => 'Safe\xdiff_string_patch', |
|
1060 | + 'xdiff_string_patch_binary' => 'Safe\xdiff_string_patch_binary', |
|
1061 | + 'xmlrpc_set_type' => 'Safe\xmlrpc_set_type', |
|
1062 | + 'xml_parser_create' => 'Safe\xml_parser_create', |
|
1063 | + 'xml_parser_create_ns' => 'Safe\xml_parser_create_ns', |
|
1064 | + 'xml_set_object' => 'Safe\xml_set_object', |
|
1065 | + 'yaml_parse' => 'Safe\yaml_parse', |
|
1066 | + 'yaml_parse_file' => 'Safe\yaml_parse_file', |
|
1067 | + 'yaml_parse_url' => 'Safe\yaml_parse_url', |
|
1068 | + 'yaz_ccl_parse' => 'Safe\yaz_ccl_parse', |
|
1069 | + 'yaz_close' => 'Safe\yaz_close', |
|
1070 | + 'yaz_connect' => 'Safe\yaz_connect', |
|
1071 | + 'yaz_database' => 'Safe\yaz_database', |
|
1072 | + 'yaz_element' => 'Safe\yaz_element', |
|
1073 | + 'yaz_present' => 'Safe\yaz_present', |
|
1074 | + 'yaz_search' => 'Safe\yaz_search', |
|
1075 | + 'yaz_wait' => 'Safe\yaz_wait', |
|
1076 | + 'zip_entry_close' => 'Safe\zip_entry_close', |
|
1077 | + 'zip_entry_open' => 'Safe\zip_entry_open', |
|
1078 | + 'zip_entry_read' => 'Safe\zip_entry_read', |
|
1079 | + 'zlib_decode' => 'Safe\zlib_decode', |
|
1080 | 1080 | ]]]); |
1081 | 1081 | }; |
@@ -6,11 +6,11 @@ |
||
6 | 6 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
7 | 7 | |
8 | 8 | # This file configures rector/rector:~0.7.0 to replace all PHP functions with their equivalent "safe" functions |
9 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
9 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
10 | 10 | $services = $containerConfigurator->services(); |
11 | 11 | |
12 | 12 | $services->set(RenameFunctionRector::class) |
13 | - ->call('configure', [[ RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => [ |
|
13 | + ->call('configure', [[RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => [ |
|
14 | 14 | 'apache_getenv' => 'Safe\apache_getenv', |
15 | 15 | 'apache_get_version' => 'Safe\apache_get_version', |
16 | 16 | 'apache_request_headers' => 'Safe\apache_request_headers', |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | interface Builder |
6 | 6 | { |
7 | - /** |
|
8 | - * Returns the built node. |
|
9 | - * |
|
10 | - * @return Node The built node |
|
11 | - */ |
|
12 | - public function getNode() : Node; |
|
7 | + /** |
|
8 | + * Returns the built node. |
|
9 | + * |
|
10 | + * @return Node The built node |
|
11 | + */ |
|
12 | + public function getNode() : Node; |
|
13 | 13 | } |
@@ -2,8 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace PhpParser; |
4 | 4 | |
5 | -interface Builder |
|
6 | -{ |
|
5 | +interface Builder { |
|
7 | 6 | /** |
8 | 7 | * Returns the built node. |
9 | 8 | * |
@@ -29,413 +29,413 @@ discard block |
||
29 | 29 | |
30 | 30 | abstract class ParserAbstract implements Parser |
31 | 31 | { |
32 | - const SYMBOL_NONE = -1; |
|
32 | + const SYMBOL_NONE = -1; |
|
33 | 33 | |
34 | - /* |
|
34 | + /* |
|
35 | 35 | * The following members will be filled with generated parsing data: |
36 | 36 | */ |
37 | 37 | |
38 | - /** @var int Size of $tokenToSymbol map */ |
|
39 | - protected $tokenToSymbolMapSize; |
|
40 | - /** @var int Size of $action table */ |
|
41 | - protected $actionTableSize; |
|
42 | - /** @var int Size of $goto table */ |
|
43 | - protected $gotoTableSize; |
|
44 | - |
|
45 | - /** @var int Symbol number signifying an invalid token */ |
|
46 | - protected $invalidSymbol; |
|
47 | - /** @var int Symbol number of error recovery token */ |
|
48 | - protected $errorSymbol; |
|
49 | - /** @var int Action number signifying default action */ |
|
50 | - protected $defaultAction; |
|
51 | - /** @var int Rule number signifying that an unexpected token was encountered */ |
|
52 | - protected $unexpectedTokenRule; |
|
53 | - |
|
54 | - protected $YY2TBLSTATE; |
|
55 | - /** @var int Number of non-leaf states */ |
|
56 | - protected $numNonLeafStates; |
|
57 | - |
|
58 | - /** @var int[] Map of lexer tokens to internal symbols */ |
|
59 | - protected $tokenToSymbol; |
|
60 | - /** @var string[] Map of symbols to their names */ |
|
61 | - protected $symbolToName; |
|
62 | - /** @var array Names of the production rules (only necessary for debugging) */ |
|
63 | - protected $productions; |
|
64 | - |
|
65 | - /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this |
|
66 | - * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the |
|
67 | - * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ |
|
68 | - protected $actionBase; |
|
69 | - /** @var int[] Table of actions. Indexed according to $actionBase comment. */ |
|
70 | - protected $action; |
|
71 | - /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol |
|
72 | - * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */ |
|
73 | - protected $actionCheck; |
|
74 | - /** @var int[] Map of states to their default action */ |
|
75 | - protected $actionDefault; |
|
76 | - /** @var callable[] Semantic action callbacks */ |
|
77 | - protected $reduceCallbacks; |
|
78 | - |
|
79 | - /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this |
|
80 | - * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */ |
|
81 | - protected $gotoBase; |
|
82 | - /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ |
|
83 | - protected $goto; |
|
84 | - /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal |
|
85 | - * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */ |
|
86 | - protected $gotoCheck; |
|
87 | - /** @var int[] Map of non-terminals to the default state to goto after their reduction */ |
|
88 | - protected $gotoDefault; |
|
89 | - |
|
90 | - /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for |
|
91 | - * determining the state to goto after reduction. */ |
|
92 | - protected $ruleToNonTerminal; |
|
93 | - /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to |
|
94 | - * be popped from the stack(s) on reduction. */ |
|
95 | - protected $ruleToLength; |
|
96 | - |
|
97 | - /* |
|
38 | + /** @var int Size of $tokenToSymbol map */ |
|
39 | + protected $tokenToSymbolMapSize; |
|
40 | + /** @var int Size of $action table */ |
|
41 | + protected $actionTableSize; |
|
42 | + /** @var int Size of $goto table */ |
|
43 | + protected $gotoTableSize; |
|
44 | + |
|
45 | + /** @var int Symbol number signifying an invalid token */ |
|
46 | + protected $invalidSymbol; |
|
47 | + /** @var int Symbol number of error recovery token */ |
|
48 | + protected $errorSymbol; |
|
49 | + /** @var int Action number signifying default action */ |
|
50 | + protected $defaultAction; |
|
51 | + /** @var int Rule number signifying that an unexpected token was encountered */ |
|
52 | + protected $unexpectedTokenRule; |
|
53 | + |
|
54 | + protected $YY2TBLSTATE; |
|
55 | + /** @var int Number of non-leaf states */ |
|
56 | + protected $numNonLeafStates; |
|
57 | + |
|
58 | + /** @var int[] Map of lexer tokens to internal symbols */ |
|
59 | + protected $tokenToSymbol; |
|
60 | + /** @var string[] Map of symbols to their names */ |
|
61 | + protected $symbolToName; |
|
62 | + /** @var array Names of the production rules (only necessary for debugging) */ |
|
63 | + protected $productions; |
|
64 | + |
|
65 | + /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this |
|
66 | + * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the |
|
67 | + * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ |
|
68 | + protected $actionBase; |
|
69 | + /** @var int[] Table of actions. Indexed according to $actionBase comment. */ |
|
70 | + protected $action; |
|
71 | + /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol |
|
72 | + * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */ |
|
73 | + protected $actionCheck; |
|
74 | + /** @var int[] Map of states to their default action */ |
|
75 | + protected $actionDefault; |
|
76 | + /** @var callable[] Semantic action callbacks */ |
|
77 | + protected $reduceCallbacks; |
|
78 | + |
|
79 | + /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this |
|
80 | + * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */ |
|
81 | + protected $gotoBase; |
|
82 | + /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ |
|
83 | + protected $goto; |
|
84 | + /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal |
|
85 | + * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */ |
|
86 | + protected $gotoCheck; |
|
87 | + /** @var int[] Map of non-terminals to the default state to goto after their reduction */ |
|
88 | + protected $gotoDefault; |
|
89 | + |
|
90 | + /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for |
|
91 | + * determining the state to goto after reduction. */ |
|
92 | + protected $ruleToNonTerminal; |
|
93 | + /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to |
|
94 | + * be popped from the stack(s) on reduction. */ |
|
95 | + protected $ruleToLength; |
|
96 | + |
|
97 | + /* |
|
98 | 98 | * The following members are part of the parser state: |
99 | 99 | */ |
100 | 100 | |
101 | - /** @var Lexer Lexer that is used when parsing */ |
|
102 | - protected $lexer; |
|
103 | - /** @var mixed Temporary value containing the result of last semantic action (reduction) */ |
|
104 | - protected $semValue; |
|
105 | - /** @var array Semantic value stack (contains values of tokens and semantic action results) */ |
|
106 | - protected $semStack; |
|
107 | - /** @var array[] Start attribute stack */ |
|
108 | - protected $startAttributeStack; |
|
109 | - /** @var array[] End attribute stack */ |
|
110 | - protected $endAttributeStack; |
|
111 | - /** @var array End attributes of last *shifted* token */ |
|
112 | - protected $endAttributes; |
|
113 | - /** @var array Start attributes of last *read* token */ |
|
114 | - protected $lookaheadStartAttributes; |
|
115 | - |
|
116 | - /** @var ErrorHandler Error handler */ |
|
117 | - protected $errorHandler; |
|
118 | - /** @var int Error state, used to avoid error floods */ |
|
119 | - protected $errorState; |
|
120 | - |
|
121 | - /** |
|
122 | - * Initialize $reduceCallbacks map. |
|
123 | - */ |
|
124 | - abstract protected function initReduceCallbacks(); |
|
125 | - |
|
126 | - /** |
|
127 | - * Creates a parser instance. |
|
128 | - * |
|
129 | - * Options: Currently none. |
|
130 | - * |
|
131 | - * @param Lexer $lexer A lexer |
|
132 | - * @param array $options Options array. |
|
133 | - */ |
|
134 | - public function __construct(Lexer $lexer, array $options = []) { |
|
135 | - $this->lexer = $lexer; |
|
136 | - |
|
137 | - if (isset($options['throwOnError'])) { |
|
138 | - throw new \LogicException( |
|
139 | - '"throwOnError" is no longer supported, use "errorHandler" instead'); |
|
140 | - } |
|
141 | - |
|
142 | - $this->initReduceCallbacks(); |
|
143 | - } |
|
144 | - |
|
145 | - /** |
|
146 | - * Parses PHP code into a node tree. |
|
147 | - * |
|
148 | - * If a non-throwing error handler is used, the parser will continue parsing after an error |
|
149 | - * occurred and attempt to build a partial AST. |
|
150 | - * |
|
151 | - * @param string $code The source code to parse |
|
152 | - * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults |
|
153 | - * to ErrorHandler\Throwing. |
|
154 | - * |
|
155 | - * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and |
|
156 | - * the parser was unable to recover from an error). |
|
157 | - */ |
|
158 | - public function parse(string $code, ?ErrorHandler $errorHandler = null) { |
|
159 | - $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; |
|
160 | - |
|
161 | - $this->lexer->startLexing($code, $this->errorHandler); |
|
162 | - $result = $this->doParse(); |
|
163 | - |
|
164 | - // Clear out some of the interior state, so we don't hold onto unnecessary |
|
165 | - // memory between uses of the parser |
|
166 | - $this->startAttributeStack = []; |
|
167 | - $this->endAttributeStack = []; |
|
168 | - $this->semStack = []; |
|
169 | - $this->semValue = null; |
|
170 | - |
|
171 | - return $result; |
|
172 | - } |
|
173 | - |
|
174 | - protected function doParse() { |
|
175 | - // We start off with no lookahead-token |
|
176 | - $symbol = self::SYMBOL_NONE; |
|
177 | - |
|
178 | - // The attributes for a node are taken from the first and last token of the node. |
|
179 | - // From the first token only the startAttributes are taken and from the last only |
|
180 | - // the endAttributes. Both are merged using the array union operator (+). |
|
181 | - $startAttributes = []; |
|
182 | - $endAttributes = []; |
|
183 | - $this->endAttributes = $endAttributes; |
|
184 | - |
|
185 | - // Keep stack of start and end attributes |
|
186 | - $this->startAttributeStack = []; |
|
187 | - $this->endAttributeStack = [$endAttributes]; |
|
188 | - |
|
189 | - // Start off in the initial state and keep a stack of previous states |
|
190 | - $state = 0; |
|
191 | - $stateStack = [$state]; |
|
192 | - |
|
193 | - // Semantic value stack (contains values of tokens and semantic action results) |
|
194 | - $this->semStack = []; |
|
195 | - |
|
196 | - // Current position in the stack(s) |
|
197 | - $stackPos = 0; |
|
198 | - |
|
199 | - $this->errorState = 0; |
|
200 | - |
|
201 | - for (;;) { |
|
202 | - //$this->traceNewState($state, $symbol); |
|
203 | - |
|
204 | - if ($this->actionBase[$state] === 0) { |
|
205 | - $rule = $this->actionDefault[$state]; |
|
206 | - } else { |
|
207 | - if ($symbol === self::SYMBOL_NONE) { |
|
208 | - // Fetch the next token id from the lexer and fetch additional info by-ref. |
|
209 | - // The end attributes are fetched into a temporary variable and only set once the token is really |
|
210 | - // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is |
|
211 | - // reduced after a token was read but not yet shifted. |
|
212 | - $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $endAttributes); |
|
213 | - |
|
214 | - // map the lexer token id to the internally used symbols |
|
215 | - $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize |
|
216 | - ? $this->tokenToSymbol[$tokenId] |
|
217 | - : $this->invalidSymbol; |
|
218 | - |
|
219 | - if ($symbol === $this->invalidSymbol) { |
|
220 | - throw new \RangeException(sprintf( |
|
221 | - 'The lexer returned an invalid token (id=%d, value=%s)', |
|
222 | - $tokenId, $tokenValue |
|
223 | - )); |
|
224 | - } |
|
225 | - |
|
226 | - // Allow productions to access the start attributes of the lookahead token. |
|
227 | - $this->lookaheadStartAttributes = $startAttributes; |
|
228 | - |
|
229 | - //$this->traceRead($symbol); |
|
230 | - } |
|
231 | - |
|
232 | - $idx = $this->actionBase[$state] + $symbol; |
|
233 | - if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) |
|
234 | - || ($state < $this->YY2TBLSTATE |
|
235 | - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 |
|
236 | - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol)) |
|
237 | - && ($action = $this->action[$idx]) !== $this->defaultAction) { |
|
238 | - /* |
|
101 | + /** @var Lexer Lexer that is used when parsing */ |
|
102 | + protected $lexer; |
|
103 | + /** @var mixed Temporary value containing the result of last semantic action (reduction) */ |
|
104 | + protected $semValue; |
|
105 | + /** @var array Semantic value stack (contains values of tokens and semantic action results) */ |
|
106 | + protected $semStack; |
|
107 | + /** @var array[] Start attribute stack */ |
|
108 | + protected $startAttributeStack; |
|
109 | + /** @var array[] End attribute stack */ |
|
110 | + protected $endAttributeStack; |
|
111 | + /** @var array End attributes of last *shifted* token */ |
|
112 | + protected $endAttributes; |
|
113 | + /** @var array Start attributes of last *read* token */ |
|
114 | + protected $lookaheadStartAttributes; |
|
115 | + |
|
116 | + /** @var ErrorHandler Error handler */ |
|
117 | + protected $errorHandler; |
|
118 | + /** @var int Error state, used to avoid error floods */ |
|
119 | + protected $errorState; |
|
120 | + |
|
121 | + /** |
|
122 | + * Initialize $reduceCallbacks map. |
|
123 | + */ |
|
124 | + abstract protected function initReduceCallbacks(); |
|
125 | + |
|
126 | + /** |
|
127 | + * Creates a parser instance. |
|
128 | + * |
|
129 | + * Options: Currently none. |
|
130 | + * |
|
131 | + * @param Lexer $lexer A lexer |
|
132 | + * @param array $options Options array. |
|
133 | + */ |
|
134 | + public function __construct(Lexer $lexer, array $options = []) { |
|
135 | + $this->lexer = $lexer; |
|
136 | + |
|
137 | + if (isset($options['throwOnError'])) { |
|
138 | + throw new \LogicException( |
|
139 | + '"throwOnError" is no longer supported, use "errorHandler" instead'); |
|
140 | + } |
|
141 | + |
|
142 | + $this->initReduceCallbacks(); |
|
143 | + } |
|
144 | + |
|
145 | + /** |
|
146 | + * Parses PHP code into a node tree. |
|
147 | + * |
|
148 | + * If a non-throwing error handler is used, the parser will continue parsing after an error |
|
149 | + * occurred and attempt to build a partial AST. |
|
150 | + * |
|
151 | + * @param string $code The source code to parse |
|
152 | + * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults |
|
153 | + * to ErrorHandler\Throwing. |
|
154 | + * |
|
155 | + * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and |
|
156 | + * the parser was unable to recover from an error). |
|
157 | + */ |
|
158 | + public function parse(string $code, ?ErrorHandler $errorHandler = null) { |
|
159 | + $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; |
|
160 | + |
|
161 | + $this->lexer->startLexing($code, $this->errorHandler); |
|
162 | + $result = $this->doParse(); |
|
163 | + |
|
164 | + // Clear out some of the interior state, so we don't hold onto unnecessary |
|
165 | + // memory between uses of the parser |
|
166 | + $this->startAttributeStack = []; |
|
167 | + $this->endAttributeStack = []; |
|
168 | + $this->semStack = []; |
|
169 | + $this->semValue = null; |
|
170 | + |
|
171 | + return $result; |
|
172 | + } |
|
173 | + |
|
174 | + protected function doParse() { |
|
175 | + // We start off with no lookahead-token |
|
176 | + $symbol = self::SYMBOL_NONE; |
|
177 | + |
|
178 | + // The attributes for a node are taken from the first and last token of the node. |
|
179 | + // From the first token only the startAttributes are taken and from the last only |
|
180 | + // the endAttributes. Both are merged using the array union operator (+). |
|
181 | + $startAttributes = []; |
|
182 | + $endAttributes = []; |
|
183 | + $this->endAttributes = $endAttributes; |
|
184 | + |
|
185 | + // Keep stack of start and end attributes |
|
186 | + $this->startAttributeStack = []; |
|
187 | + $this->endAttributeStack = [$endAttributes]; |
|
188 | + |
|
189 | + // Start off in the initial state and keep a stack of previous states |
|
190 | + $state = 0; |
|
191 | + $stateStack = [$state]; |
|
192 | + |
|
193 | + // Semantic value stack (contains values of tokens and semantic action results) |
|
194 | + $this->semStack = []; |
|
195 | + |
|
196 | + // Current position in the stack(s) |
|
197 | + $stackPos = 0; |
|
198 | + |
|
199 | + $this->errorState = 0; |
|
200 | + |
|
201 | + for (;;) { |
|
202 | + //$this->traceNewState($state, $symbol); |
|
203 | + |
|
204 | + if ($this->actionBase[$state] === 0) { |
|
205 | + $rule = $this->actionDefault[$state]; |
|
206 | + } else { |
|
207 | + if ($symbol === self::SYMBOL_NONE) { |
|
208 | + // Fetch the next token id from the lexer and fetch additional info by-ref. |
|
209 | + // The end attributes are fetched into a temporary variable and only set once the token is really |
|
210 | + // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is |
|
211 | + // reduced after a token was read but not yet shifted. |
|
212 | + $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $endAttributes); |
|
213 | + |
|
214 | + // map the lexer token id to the internally used symbols |
|
215 | + $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize |
|
216 | + ? $this->tokenToSymbol[$tokenId] |
|
217 | + : $this->invalidSymbol; |
|
218 | + |
|
219 | + if ($symbol === $this->invalidSymbol) { |
|
220 | + throw new \RangeException(sprintf( |
|
221 | + 'The lexer returned an invalid token (id=%d, value=%s)', |
|
222 | + $tokenId, $tokenValue |
|
223 | + )); |
|
224 | + } |
|
225 | + |
|
226 | + // Allow productions to access the start attributes of the lookahead token. |
|
227 | + $this->lookaheadStartAttributes = $startAttributes; |
|
228 | + |
|
229 | + //$this->traceRead($symbol); |
|
230 | + } |
|
231 | + |
|
232 | + $idx = $this->actionBase[$state] + $symbol; |
|
233 | + if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) |
|
234 | + || ($state < $this->YY2TBLSTATE |
|
235 | + && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 |
|
236 | + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol)) |
|
237 | + && ($action = $this->action[$idx]) !== $this->defaultAction) { |
|
238 | + /* |
|
239 | 239 | * >= numNonLeafStates: shift and reduce |
240 | 240 | * > 0: shift |
241 | 241 | * = 0: accept |
242 | 242 | * < 0: reduce |
243 | 243 | * = -YYUNEXPECTED: error |
244 | 244 | */ |
245 | - if ($action > 0) { |
|
246 | - /* shift */ |
|
247 | - //$this->traceShift($symbol); |
|
248 | - |
|
249 | - ++$stackPos; |
|
250 | - $stateStack[$stackPos] = $state = $action; |
|
251 | - $this->semStack[$stackPos] = $tokenValue; |
|
252 | - $this->startAttributeStack[$stackPos] = $startAttributes; |
|
253 | - $this->endAttributeStack[$stackPos] = $endAttributes; |
|
254 | - $this->endAttributes = $endAttributes; |
|
255 | - $symbol = self::SYMBOL_NONE; |
|
256 | - |
|
257 | - if ($this->errorState) { |
|
258 | - --$this->errorState; |
|
259 | - } |
|
260 | - |
|
261 | - if ($action < $this->numNonLeafStates) { |
|
262 | - continue; |
|
263 | - } |
|
264 | - |
|
265 | - /* $yyn >= numNonLeafStates means shift-and-reduce */ |
|
266 | - $rule = $action - $this->numNonLeafStates; |
|
267 | - } else { |
|
268 | - $rule = -$action; |
|
269 | - } |
|
270 | - } else { |
|
271 | - $rule = $this->actionDefault[$state]; |
|
272 | - } |
|
273 | - } |
|
274 | - |
|
275 | - for (;;) { |
|
276 | - if ($rule === 0) { |
|
277 | - /* accept */ |
|
278 | - //$this->traceAccept(); |
|
279 | - return $this->semValue; |
|
280 | - } elseif ($rule !== $this->unexpectedTokenRule) { |
|
281 | - /* reduce */ |
|
282 | - //$this->traceReduce($rule); |
|
283 | - |
|
284 | - try { |
|
285 | - $this->reduceCallbacks[$rule]($stackPos); |
|
286 | - } catch (Error $e) { |
|
287 | - if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) { |
|
288 | - $e->setStartLine($startAttributes['startLine']); |
|
289 | - } |
|
290 | - |
|
291 | - $this->emitError($e); |
|
292 | - // Can't recover from this type of error |
|
293 | - return null; |
|
294 | - } |
|
295 | - |
|
296 | - /* Goto - shift nonterminal */ |
|
297 | - $lastEndAttributes = $this->endAttributeStack[$stackPos]; |
|
298 | - $ruleLength = $this->ruleToLength[$rule]; |
|
299 | - $stackPos -= $ruleLength; |
|
300 | - $nonTerminal = $this->ruleToNonTerminal[$rule]; |
|
301 | - $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; |
|
302 | - if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) { |
|
303 | - $state = $this->goto[$idx]; |
|
304 | - } else { |
|
305 | - $state = $this->gotoDefault[$nonTerminal]; |
|
306 | - } |
|
307 | - |
|
308 | - ++$stackPos; |
|
309 | - $stateStack[$stackPos] = $state; |
|
310 | - $this->semStack[$stackPos] = $this->semValue; |
|
311 | - $this->endAttributeStack[$stackPos] = $lastEndAttributes; |
|
312 | - if ($ruleLength === 0) { |
|
313 | - // Empty productions use the start attributes of the lookahead token. |
|
314 | - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; |
|
315 | - } |
|
316 | - } else { |
|
317 | - /* error */ |
|
318 | - switch ($this->errorState) { |
|
319 | - case 0: |
|
320 | - $msg = $this->getErrorMessage($symbol, $state); |
|
321 | - $this->emitError(new Error($msg, $startAttributes + $endAttributes)); |
|
322 | - // Break missing intentionally |
|
323 | - case 1: |
|
324 | - case 2: |
|
325 | - $this->errorState = 3; |
|
326 | - |
|
327 | - // Pop until error-expecting state uncovered |
|
328 | - while (!( |
|
329 | - (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 |
|
330 | - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) |
|
331 | - || ($state < $this->YY2TBLSTATE |
|
332 | - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 |
|
333 | - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) |
|
334 | - ) || ($action = $this->action[$idx]) === $this->defaultAction) { // Not totally sure about this |
|
335 | - if ($stackPos <= 0) { |
|
336 | - // Could not recover from error |
|
337 | - return null; |
|
338 | - } |
|
339 | - $state = $stateStack[--$stackPos]; |
|
340 | - //$this->tracePop($state); |
|
341 | - } |
|
342 | - |
|
343 | - //$this->traceShift($this->errorSymbol); |
|
344 | - ++$stackPos; |
|
345 | - $stateStack[$stackPos] = $state = $action; |
|
346 | - |
|
347 | - // We treat the error symbol as being empty, so we reset the end attributes |
|
348 | - // to the end attributes of the last non-error symbol |
|
349 | - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; |
|
350 | - $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1]; |
|
351 | - $this->endAttributes = $this->endAttributeStack[$stackPos - 1]; |
|
352 | - break; |
|
353 | - |
|
354 | - case 3: |
|
355 | - if ($symbol === 0) { |
|
356 | - // Reached EOF without recovering from error |
|
357 | - return null; |
|
358 | - } |
|
359 | - |
|
360 | - //$this->traceDiscard($symbol); |
|
361 | - $symbol = self::SYMBOL_NONE; |
|
362 | - break 2; |
|
363 | - } |
|
364 | - } |
|
365 | - |
|
366 | - if ($state < $this->numNonLeafStates) { |
|
367 | - break; |
|
368 | - } |
|
369 | - |
|
370 | - /* >= numNonLeafStates means shift-and-reduce */ |
|
371 | - $rule = $state - $this->numNonLeafStates; |
|
372 | - } |
|
373 | - } |
|
374 | - |
|
375 | - throw new \RuntimeException('Reached end of parser loop'); |
|
376 | - } |
|
377 | - |
|
378 | - protected function emitError(Error $error) { |
|
379 | - $this->errorHandler->handleError($error); |
|
380 | - } |
|
381 | - |
|
382 | - /** |
|
383 | - * Format error message including expected tokens. |
|
384 | - * |
|
385 | - * @param int $symbol Unexpected symbol |
|
386 | - * @param int $state State at time of error |
|
387 | - * |
|
388 | - * @return string Formatted error message |
|
389 | - */ |
|
390 | - protected function getErrorMessage(int $symbol, int $state) : string { |
|
391 | - $expectedString = ''; |
|
392 | - if ($expected = $this->getExpectedTokens($state)) { |
|
393 | - $expectedString = ', expecting ' . implode(' or ', $expected); |
|
394 | - } |
|
395 | - |
|
396 | - return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; |
|
397 | - } |
|
398 | - |
|
399 | - /** |
|
400 | - * Get limited number of expected tokens in given state. |
|
401 | - * |
|
402 | - * @param int $state State |
|
403 | - * |
|
404 | - * @return string[] Expected tokens. If too many, an empty array is returned. |
|
405 | - */ |
|
406 | - protected function getExpectedTokens(int $state) : array { |
|
407 | - $expected = []; |
|
408 | - |
|
409 | - $base = $this->actionBase[$state]; |
|
410 | - foreach ($this->symbolToName as $symbol => $name) { |
|
411 | - $idx = $base + $symbol; |
|
412 | - if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol |
|
413 | - || $state < $this->YY2TBLSTATE |
|
414 | - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 |
|
415 | - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol |
|
416 | - ) { |
|
417 | - if ($this->action[$idx] !== $this->unexpectedTokenRule |
|
418 | - && $this->action[$idx] !== $this->defaultAction |
|
419 | - && $symbol !== $this->errorSymbol |
|
420 | - ) { |
|
421 | - if (count($expected) === 4) { |
|
422 | - /* Too many expected tokens */ |
|
423 | - return []; |
|
424 | - } |
|
425 | - |
|
426 | - $expected[] = $name; |
|
427 | - } |
|
428 | - } |
|
429 | - } |
|
430 | - |
|
431 | - return $expected; |
|
432 | - } |
|
433 | - |
|
434 | - /* |
|
245 | + if ($action > 0) { |
|
246 | + /* shift */ |
|
247 | + //$this->traceShift($symbol); |
|
248 | + |
|
249 | + ++$stackPos; |
|
250 | + $stateStack[$stackPos] = $state = $action; |
|
251 | + $this->semStack[$stackPos] = $tokenValue; |
|
252 | + $this->startAttributeStack[$stackPos] = $startAttributes; |
|
253 | + $this->endAttributeStack[$stackPos] = $endAttributes; |
|
254 | + $this->endAttributes = $endAttributes; |
|
255 | + $symbol = self::SYMBOL_NONE; |
|
256 | + |
|
257 | + if ($this->errorState) { |
|
258 | + --$this->errorState; |
|
259 | + } |
|
260 | + |
|
261 | + if ($action < $this->numNonLeafStates) { |
|
262 | + continue; |
|
263 | + } |
|
264 | + |
|
265 | + /* $yyn >= numNonLeafStates means shift-and-reduce */ |
|
266 | + $rule = $action - $this->numNonLeafStates; |
|
267 | + } else { |
|
268 | + $rule = -$action; |
|
269 | + } |
|
270 | + } else { |
|
271 | + $rule = $this->actionDefault[$state]; |
|
272 | + } |
|
273 | + } |
|
274 | + |
|
275 | + for (;;) { |
|
276 | + if ($rule === 0) { |
|
277 | + /* accept */ |
|
278 | + //$this->traceAccept(); |
|
279 | + return $this->semValue; |
|
280 | + } elseif ($rule !== $this->unexpectedTokenRule) { |
|
281 | + /* reduce */ |
|
282 | + //$this->traceReduce($rule); |
|
283 | + |
|
284 | + try { |
|
285 | + $this->reduceCallbacks[$rule]($stackPos); |
|
286 | + } catch (Error $e) { |
|
287 | + if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) { |
|
288 | + $e->setStartLine($startAttributes['startLine']); |
|
289 | + } |
|
290 | + |
|
291 | + $this->emitError($e); |
|
292 | + // Can't recover from this type of error |
|
293 | + return null; |
|
294 | + } |
|
295 | + |
|
296 | + /* Goto - shift nonterminal */ |
|
297 | + $lastEndAttributes = $this->endAttributeStack[$stackPos]; |
|
298 | + $ruleLength = $this->ruleToLength[$rule]; |
|
299 | + $stackPos -= $ruleLength; |
|
300 | + $nonTerminal = $this->ruleToNonTerminal[$rule]; |
|
301 | + $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; |
|
302 | + if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) { |
|
303 | + $state = $this->goto[$idx]; |
|
304 | + } else { |
|
305 | + $state = $this->gotoDefault[$nonTerminal]; |
|
306 | + } |
|
307 | + |
|
308 | + ++$stackPos; |
|
309 | + $stateStack[$stackPos] = $state; |
|
310 | + $this->semStack[$stackPos] = $this->semValue; |
|
311 | + $this->endAttributeStack[$stackPos] = $lastEndAttributes; |
|
312 | + if ($ruleLength === 0) { |
|
313 | + // Empty productions use the start attributes of the lookahead token. |
|
314 | + $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; |
|
315 | + } |
|
316 | + } else { |
|
317 | + /* error */ |
|
318 | + switch ($this->errorState) { |
|
319 | + case 0: |
|
320 | + $msg = $this->getErrorMessage($symbol, $state); |
|
321 | + $this->emitError(new Error($msg, $startAttributes + $endAttributes)); |
|
322 | + // Break missing intentionally |
|
323 | + case 1: |
|
324 | + case 2: |
|
325 | + $this->errorState = 3; |
|
326 | + |
|
327 | + // Pop until error-expecting state uncovered |
|
328 | + while (!( |
|
329 | + (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 |
|
330 | + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) |
|
331 | + || ($state < $this->YY2TBLSTATE |
|
332 | + && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 |
|
333 | + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) |
|
334 | + ) || ($action = $this->action[$idx]) === $this->defaultAction) { // Not totally sure about this |
|
335 | + if ($stackPos <= 0) { |
|
336 | + // Could not recover from error |
|
337 | + return null; |
|
338 | + } |
|
339 | + $state = $stateStack[--$stackPos]; |
|
340 | + //$this->tracePop($state); |
|
341 | + } |
|
342 | + |
|
343 | + //$this->traceShift($this->errorSymbol); |
|
344 | + ++$stackPos; |
|
345 | + $stateStack[$stackPos] = $state = $action; |
|
346 | + |
|
347 | + // We treat the error symbol as being empty, so we reset the end attributes |
|
348 | + // to the end attributes of the last non-error symbol |
|
349 | + $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; |
|
350 | + $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1]; |
|
351 | + $this->endAttributes = $this->endAttributeStack[$stackPos - 1]; |
|
352 | + break; |
|
353 | + |
|
354 | + case 3: |
|
355 | + if ($symbol === 0) { |
|
356 | + // Reached EOF without recovering from error |
|
357 | + return null; |
|
358 | + } |
|
359 | + |
|
360 | + //$this->traceDiscard($symbol); |
|
361 | + $symbol = self::SYMBOL_NONE; |
|
362 | + break 2; |
|
363 | + } |
|
364 | + } |
|
365 | + |
|
366 | + if ($state < $this->numNonLeafStates) { |
|
367 | + break; |
|
368 | + } |
|
369 | + |
|
370 | + /* >= numNonLeafStates means shift-and-reduce */ |
|
371 | + $rule = $state - $this->numNonLeafStates; |
|
372 | + } |
|
373 | + } |
|
374 | + |
|
375 | + throw new \RuntimeException('Reached end of parser loop'); |
|
376 | + } |
|
377 | + |
|
378 | + protected function emitError(Error $error) { |
|
379 | + $this->errorHandler->handleError($error); |
|
380 | + } |
|
381 | + |
|
382 | + /** |
|
383 | + * Format error message including expected tokens. |
|
384 | + * |
|
385 | + * @param int $symbol Unexpected symbol |
|
386 | + * @param int $state State at time of error |
|
387 | + * |
|
388 | + * @return string Formatted error message |
|
389 | + */ |
|
390 | + protected function getErrorMessage(int $symbol, int $state) : string { |
|
391 | + $expectedString = ''; |
|
392 | + if ($expected = $this->getExpectedTokens($state)) { |
|
393 | + $expectedString = ', expecting ' . implode(' or ', $expected); |
|
394 | + } |
|
395 | + |
|
396 | + return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; |
|
397 | + } |
|
398 | + |
|
399 | + /** |
|
400 | + * Get limited number of expected tokens in given state. |
|
401 | + * |
|
402 | + * @param int $state State |
|
403 | + * |
|
404 | + * @return string[] Expected tokens. If too many, an empty array is returned. |
|
405 | + */ |
|
406 | + protected function getExpectedTokens(int $state) : array { |
|
407 | + $expected = []; |
|
408 | + |
|
409 | + $base = $this->actionBase[$state]; |
|
410 | + foreach ($this->symbolToName as $symbol => $name) { |
|
411 | + $idx = $base + $symbol; |
|
412 | + if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol |
|
413 | + || $state < $this->YY2TBLSTATE |
|
414 | + && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 |
|
415 | + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol |
|
416 | + ) { |
|
417 | + if ($this->action[$idx] !== $this->unexpectedTokenRule |
|
418 | + && $this->action[$idx] !== $this->defaultAction |
|
419 | + && $symbol !== $this->errorSymbol |
|
420 | + ) { |
|
421 | + if (count($expected) === 4) { |
|
422 | + /* Too many expected tokens */ |
|
423 | + return []; |
|
424 | + } |
|
425 | + |
|
426 | + $expected[] = $name; |
|
427 | + } |
|
428 | + } |
|
429 | + } |
|
430 | + |
|
431 | + return $expected; |
|
432 | + } |
|
433 | + |
|
434 | + /* |
|
435 | 435 | * Tracing functions used for debugging the parser. |
436 | 436 | */ |
437 | 437 | |
438 | - /* |
|
438 | + /* |
|
439 | 439 | protected function traceNewState($state, $symbol) { |
440 | 440 | echo '% State ' . $state |
441 | 441 | . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; |
@@ -466,595 +466,595 @@ discard block |
||
466 | 466 | } |
467 | 467 | */ |
468 | 468 | |
469 | - /* |
|
469 | + /* |
|
470 | 470 | * Helper functions invoked by semantic actions |
471 | 471 | */ |
472 | 472 | |
473 | - /** |
|
474 | - * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions. |
|
475 | - * |
|
476 | - * @param Node\Stmt[] $stmts |
|
477 | - * @return Node\Stmt[] |
|
478 | - */ |
|
479 | - protected function handleNamespaces(array $stmts) : array { |
|
480 | - $hasErrored = false; |
|
481 | - $style = $this->getNamespacingStyle($stmts); |
|
482 | - if (null === $style) { |
|
483 | - // not namespaced, nothing to do |
|
484 | - return $stmts; |
|
485 | - } elseif ('brace' === $style) { |
|
486 | - // For braced namespaces we only have to check that there are no invalid statements between the namespaces |
|
487 | - $afterFirstNamespace = false; |
|
488 | - foreach ($stmts as $stmt) { |
|
489 | - if ($stmt instanceof Node\Stmt\Namespace_) { |
|
490 | - $afterFirstNamespace = true; |
|
491 | - } elseif (!$stmt instanceof Node\Stmt\HaltCompiler |
|
492 | - && !$stmt instanceof Node\Stmt\Nop |
|
493 | - && $afterFirstNamespace && !$hasErrored) { |
|
494 | - $this->emitError(new Error( |
|
495 | - 'No code may exist outside of namespace {}', $stmt->getAttributes())); |
|
496 | - $hasErrored = true; // Avoid one error for every statement |
|
497 | - } |
|
498 | - } |
|
499 | - return $stmts; |
|
500 | - } else { |
|
501 | - // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts |
|
502 | - $resultStmts = []; |
|
503 | - $targetStmts =& $resultStmts; |
|
504 | - $lastNs = null; |
|
505 | - foreach ($stmts as $stmt) { |
|
506 | - if ($stmt instanceof Node\Stmt\Namespace_) { |
|
507 | - if ($lastNs !== null) { |
|
508 | - $this->fixupNamespaceAttributes($lastNs); |
|
509 | - } |
|
510 | - if ($stmt->stmts === null) { |
|
511 | - $stmt->stmts = []; |
|
512 | - $targetStmts =& $stmt->stmts; |
|
513 | - $resultStmts[] = $stmt; |
|
514 | - } else { |
|
515 | - // This handles the invalid case of mixed style namespaces |
|
516 | - $resultStmts[] = $stmt; |
|
517 | - $targetStmts =& $resultStmts; |
|
518 | - } |
|
519 | - $lastNs = $stmt; |
|
520 | - } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { |
|
521 | - // __halt_compiler() is not moved into the namespace |
|
522 | - $resultStmts[] = $stmt; |
|
523 | - } else { |
|
524 | - $targetStmts[] = $stmt; |
|
525 | - } |
|
526 | - } |
|
527 | - if ($lastNs !== null) { |
|
528 | - $this->fixupNamespaceAttributes($lastNs); |
|
529 | - } |
|
530 | - return $resultStmts; |
|
531 | - } |
|
532 | - } |
|
533 | - |
|
534 | - private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) { |
|
535 | - // We moved the statements into the namespace node, as such the end of the namespace node |
|
536 | - // needs to be extended to the end of the statements. |
|
537 | - if (empty($stmt->stmts)) { |
|
538 | - return; |
|
539 | - } |
|
540 | - |
|
541 | - // We only move the builtin end attributes here. This is the best we can do with the |
|
542 | - // knowledge we have. |
|
543 | - $endAttributes = ['endLine', 'endFilePos', 'endTokenPos']; |
|
544 | - $lastStmt = $stmt->stmts[count($stmt->stmts) - 1]; |
|
545 | - foreach ($endAttributes as $endAttribute) { |
|
546 | - if ($lastStmt->hasAttribute($endAttribute)) { |
|
547 | - $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute)); |
|
548 | - } |
|
549 | - } |
|
550 | - } |
|
551 | - |
|
552 | - /** |
|
553 | - * Determine namespacing style (semicolon or brace) |
|
554 | - * |
|
555 | - * @param Node[] $stmts Top-level statements. |
|
556 | - * |
|
557 | - * @return null|string One of "semicolon", "brace" or null (no namespaces) |
|
558 | - */ |
|
559 | - private function getNamespacingStyle(array $stmts) { |
|
560 | - $style = null; |
|
561 | - $hasNotAllowedStmts = false; |
|
562 | - foreach ($stmts as $i => $stmt) { |
|
563 | - if ($stmt instanceof Node\Stmt\Namespace_) { |
|
564 | - $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace'; |
|
565 | - if (null === $style) { |
|
566 | - $style = $currentStyle; |
|
567 | - if ($hasNotAllowedStmts) { |
|
568 | - $this->emitError(new Error( |
|
569 | - 'Namespace declaration statement has to be the very first statement in the script', |
|
570 | - $stmt->getLine() // Avoid marking the entire namespace as an error |
|
571 | - )); |
|
572 | - } |
|
573 | - } elseif ($style !== $currentStyle) { |
|
574 | - $this->emitError(new Error( |
|
575 | - 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', |
|
576 | - $stmt->getLine() // Avoid marking the entire namespace as an error |
|
577 | - )); |
|
578 | - // Treat like semicolon style for namespace normalization |
|
579 | - return 'semicolon'; |
|
580 | - } |
|
581 | - continue; |
|
582 | - } |
|
583 | - |
|
584 | - /* declare(), __halt_compiler() and nops can be used before a namespace declaration */ |
|
585 | - if ($stmt instanceof Node\Stmt\Declare_ |
|
586 | - || $stmt instanceof Node\Stmt\HaltCompiler |
|
587 | - || $stmt instanceof Node\Stmt\Nop) { |
|
588 | - continue; |
|
589 | - } |
|
590 | - |
|
591 | - /* There may be a hashbang line at the very start of the file */ |
|
592 | - if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) { |
|
593 | - continue; |
|
594 | - } |
|
595 | - |
|
596 | - /* Everything else if forbidden before namespace declarations */ |
|
597 | - $hasNotAllowedStmts = true; |
|
598 | - } |
|
599 | - return $style; |
|
600 | - } |
|
601 | - |
|
602 | - /** |
|
603 | - * Fix up parsing of static property calls in PHP 5. |
|
604 | - * |
|
605 | - * In PHP 5 A::$b[c][d] and A::$b[c][d]() have very different interpretation. The former is |
|
606 | - * interpreted as (A::$b)[c][d], while the latter is the same as A::{$b[c][d]}(). We parse the |
|
607 | - * latter as the former initially and this method fixes the AST into the correct form when we |
|
608 | - * encounter the "()". |
|
609 | - * |
|
610 | - * @param Node\Expr\StaticPropertyFetch|Node\Expr\ArrayDimFetch $prop |
|
611 | - * @param Node\Arg[] $args |
|
612 | - * @param array $attributes |
|
613 | - * |
|
614 | - * @return Expr\StaticCall |
|
615 | - */ |
|
616 | - protected function fixupPhp5StaticPropCall($prop, array $args, array $attributes) : Expr\StaticCall { |
|
617 | - if ($prop instanceof Node\Expr\StaticPropertyFetch) { |
|
618 | - $name = $prop->name instanceof VarLikeIdentifier |
|
619 | - ? $prop->name->toString() : $prop->name; |
|
620 | - $var = new Expr\Variable($name, $prop->name->getAttributes()); |
|
621 | - return new Expr\StaticCall($prop->class, $var, $args, $attributes); |
|
622 | - } elseif ($prop instanceof Node\Expr\ArrayDimFetch) { |
|
623 | - $tmp = $prop; |
|
624 | - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { |
|
625 | - $tmp = $tmp->var; |
|
626 | - } |
|
627 | - |
|
628 | - /** @var Expr\StaticPropertyFetch $staticProp */ |
|
629 | - $staticProp = $tmp->var; |
|
630 | - |
|
631 | - // Set start attributes to attributes of innermost node |
|
632 | - $tmp = $prop; |
|
633 | - $this->fixupStartAttributes($tmp, $staticProp->name); |
|
634 | - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { |
|
635 | - $tmp = $tmp->var; |
|
636 | - $this->fixupStartAttributes($tmp, $staticProp->name); |
|
637 | - } |
|
638 | - |
|
639 | - $name = $staticProp->name instanceof VarLikeIdentifier |
|
640 | - ? $staticProp->name->toString() : $staticProp->name; |
|
641 | - $tmp->var = new Expr\Variable($name, $staticProp->name->getAttributes()); |
|
642 | - return new Expr\StaticCall($staticProp->class, $prop, $args, $attributes); |
|
643 | - } else { |
|
644 | - throw new \Exception; |
|
645 | - } |
|
646 | - } |
|
647 | - |
|
648 | - protected function fixupStartAttributes(Node $to, Node $from) { |
|
649 | - $startAttributes = ['startLine', 'startFilePos', 'startTokenPos']; |
|
650 | - foreach ($startAttributes as $startAttribute) { |
|
651 | - if ($from->hasAttribute($startAttribute)) { |
|
652 | - $to->setAttribute($startAttribute, $from->getAttribute($startAttribute)); |
|
653 | - } |
|
654 | - } |
|
655 | - } |
|
656 | - |
|
657 | - protected function handleBuiltinTypes(Name $name) { |
|
658 | - $builtinTypes = [ |
|
659 | - 'bool' => true, |
|
660 | - 'int' => true, |
|
661 | - 'float' => true, |
|
662 | - 'string' => true, |
|
663 | - 'iterable' => true, |
|
664 | - 'void' => true, |
|
665 | - 'object' => true, |
|
666 | - 'null' => true, |
|
667 | - 'false' => true, |
|
668 | - 'mixed' => true, |
|
669 | - 'never' => true, |
|
670 | - 'true' => true, |
|
671 | - ]; |
|
672 | - |
|
673 | - if (!$name->isUnqualified()) { |
|
674 | - return $name; |
|
675 | - } |
|
676 | - |
|
677 | - $lowerName = $name->toLowerString(); |
|
678 | - if (!isset($builtinTypes[$lowerName])) { |
|
679 | - return $name; |
|
680 | - } |
|
681 | - |
|
682 | - return new Node\Identifier($lowerName, $name->getAttributes()); |
|
683 | - } |
|
684 | - |
|
685 | - /** |
|
686 | - * Get combined start and end attributes at a stack location |
|
687 | - * |
|
688 | - * @param int $pos Stack location |
|
689 | - * |
|
690 | - * @return array Combined start and end attributes |
|
691 | - */ |
|
692 | - protected function getAttributesAt(int $pos) : array { |
|
693 | - return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; |
|
694 | - } |
|
695 | - |
|
696 | - protected function getFloatCastKind(string $cast): int |
|
697 | - { |
|
698 | - $cast = strtolower($cast); |
|
699 | - if (strpos($cast, 'float') !== false) { |
|
700 | - return Double::KIND_FLOAT; |
|
701 | - } |
|
702 | - |
|
703 | - if (strpos($cast, 'real') !== false) { |
|
704 | - return Double::KIND_REAL; |
|
705 | - } |
|
706 | - |
|
707 | - return Double::KIND_DOUBLE; |
|
708 | - } |
|
709 | - |
|
710 | - protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { |
|
711 | - try { |
|
712 | - return LNumber::fromString($str, $attributes, $allowInvalidOctal); |
|
713 | - } catch (Error $error) { |
|
714 | - $this->emitError($error); |
|
715 | - // Use dummy value |
|
716 | - return new LNumber(0, $attributes); |
|
717 | - } |
|
718 | - } |
|
719 | - |
|
720 | - /** |
|
721 | - * Parse a T_NUM_STRING token into either an integer or string node. |
|
722 | - * |
|
723 | - * @param string $str Number string |
|
724 | - * @param array $attributes Attributes |
|
725 | - * |
|
726 | - * @return LNumber|String_ Integer or string node. |
|
727 | - */ |
|
728 | - protected function parseNumString(string $str, array $attributes) { |
|
729 | - if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { |
|
730 | - return new String_($str, $attributes); |
|
731 | - } |
|
732 | - |
|
733 | - $num = +$str; |
|
734 | - if (!is_int($num)) { |
|
735 | - return new String_($str, $attributes); |
|
736 | - } |
|
737 | - |
|
738 | - return new LNumber($num, $attributes); |
|
739 | - } |
|
740 | - |
|
741 | - protected function stripIndentation( |
|
742 | - string $string, int $indentLen, string $indentChar, |
|
743 | - bool $newlineAtStart, bool $newlineAtEnd, array $attributes |
|
744 | - ) { |
|
745 | - if ($indentLen === 0) { |
|
746 | - return $string; |
|
747 | - } |
|
748 | - |
|
749 | - $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)'; |
|
750 | - $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])'; |
|
751 | - $regex = '/' . $start . '([ \t]*)(' . $end . ')?/'; |
|
752 | - return preg_replace_callback( |
|
753 | - $regex, |
|
754 | - function ($matches) use ($indentLen, $indentChar, $attributes) { |
|
755 | - $prefix = substr($matches[1], 0, $indentLen); |
|
756 | - if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { |
|
757 | - $this->emitError(new Error( |
|
758 | - 'Invalid indentation - tabs and spaces cannot be mixed', $attributes |
|
759 | - )); |
|
760 | - } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { |
|
761 | - $this->emitError(new Error( |
|
762 | - 'Invalid body indentation level ' . |
|
763 | - '(expecting an indentation level of at least ' . $indentLen . ')', |
|
764 | - $attributes |
|
765 | - )); |
|
766 | - } |
|
767 | - return substr($matches[0], strlen($prefix)); |
|
768 | - }, |
|
769 | - $string |
|
770 | - ); |
|
771 | - } |
|
772 | - |
|
773 | - protected function parseDocString( |
|
774 | - string $startToken, $contents, string $endToken, |
|
775 | - array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape |
|
776 | - ) { |
|
777 | - $kind = strpos($startToken, "'") === false |
|
778 | - ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; |
|
779 | - |
|
780 | - $regex = '/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/'; |
|
781 | - $result = preg_match($regex, $startToken, $matches); |
|
782 | - assert($result === 1); |
|
783 | - $label = $matches[1]; |
|
784 | - |
|
785 | - $result = preg_match('/\A[ \t]*/', $endToken, $matches); |
|
786 | - assert($result === 1); |
|
787 | - $indentation = $matches[0]; |
|
788 | - |
|
789 | - $attributes['kind'] = $kind; |
|
790 | - $attributes['docLabel'] = $label; |
|
791 | - $attributes['docIndentation'] = $indentation; |
|
792 | - |
|
793 | - $indentHasSpaces = false !== strpos($indentation, " "); |
|
794 | - $indentHasTabs = false !== strpos($indentation, "\t"); |
|
795 | - if ($indentHasSpaces && $indentHasTabs) { |
|
796 | - $this->emitError(new Error( |
|
797 | - 'Invalid indentation - tabs and spaces cannot be mixed', |
|
798 | - $endTokenAttributes |
|
799 | - )); |
|
800 | - |
|
801 | - // Proceed processing as if this doc string is not indented |
|
802 | - $indentation = ''; |
|
803 | - } |
|
804 | - |
|
805 | - $indentLen = \strlen($indentation); |
|
806 | - $indentChar = $indentHasSpaces ? " " : "\t"; |
|
807 | - |
|
808 | - if (\is_string($contents)) { |
|
809 | - if ($contents === '') { |
|
810 | - return new String_('', $attributes); |
|
811 | - } |
|
812 | - |
|
813 | - $contents = $this->stripIndentation( |
|
814 | - $contents, $indentLen, $indentChar, true, true, $attributes |
|
815 | - ); |
|
816 | - $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); |
|
817 | - |
|
818 | - if ($kind === String_::KIND_HEREDOC) { |
|
819 | - $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); |
|
820 | - } |
|
821 | - |
|
822 | - return new String_($contents, $attributes); |
|
823 | - } else { |
|
824 | - assert(count($contents) > 0); |
|
825 | - if (!$contents[0] instanceof Node\Scalar\EncapsedStringPart) { |
|
826 | - // If there is no leading encapsed string part, pretend there is an empty one |
|
827 | - $this->stripIndentation( |
|
828 | - '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() |
|
829 | - ); |
|
830 | - } |
|
831 | - |
|
832 | - $newContents = []; |
|
833 | - foreach ($contents as $i => $part) { |
|
834 | - if ($part instanceof Node\Scalar\EncapsedStringPart) { |
|
835 | - $isLast = $i === \count($contents) - 1; |
|
836 | - $part->value = $this->stripIndentation( |
|
837 | - $part->value, $indentLen, $indentChar, |
|
838 | - $i === 0, $isLast, $part->getAttributes() |
|
839 | - ); |
|
840 | - $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); |
|
841 | - if ($isLast) { |
|
842 | - $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); |
|
843 | - } |
|
844 | - if ('' === $part->value) { |
|
845 | - continue; |
|
846 | - } |
|
847 | - } |
|
848 | - $newContents[] = $part; |
|
849 | - } |
|
850 | - return new Encapsed($newContents, $attributes); |
|
851 | - } |
|
852 | - } |
|
853 | - |
|
854 | - /** |
|
855 | - * Create attributes for a zero-length common-capturing nop. |
|
856 | - * |
|
857 | - * @param Comment[] $comments |
|
858 | - * @return array |
|
859 | - */ |
|
860 | - protected function createCommentNopAttributes(array $comments) { |
|
861 | - $comment = $comments[count($comments) - 1]; |
|
862 | - $commentEndLine = $comment->getEndLine(); |
|
863 | - $commentEndFilePos = $comment->getEndFilePos(); |
|
864 | - $commentEndTokenPos = $comment->getEndTokenPos(); |
|
865 | - |
|
866 | - $attributes = ['comments' => $comments]; |
|
867 | - if (-1 !== $commentEndLine) { |
|
868 | - $attributes['startLine'] = $commentEndLine; |
|
869 | - $attributes['endLine'] = $commentEndLine; |
|
870 | - } |
|
871 | - if (-1 !== $commentEndFilePos) { |
|
872 | - $attributes['startFilePos'] = $commentEndFilePos + 1; |
|
873 | - $attributes['endFilePos'] = $commentEndFilePos; |
|
874 | - } |
|
875 | - if (-1 !== $commentEndTokenPos) { |
|
876 | - $attributes['startTokenPos'] = $commentEndTokenPos + 1; |
|
877 | - $attributes['endTokenPos'] = $commentEndTokenPos; |
|
878 | - } |
|
879 | - return $attributes; |
|
880 | - } |
|
881 | - |
|
882 | - /** @param ElseIf_|Else_ $node */ |
|
883 | - protected function fixupAlternativeElse($node) { |
|
884 | - // Make sure a trailing nop statement carrying comments is part of the node. |
|
885 | - $numStmts = \count($node->stmts); |
|
886 | - if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { |
|
887 | - $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes(); |
|
888 | - if (isset($nopAttrs['endLine'])) { |
|
889 | - $node->setAttribute('endLine', $nopAttrs['endLine']); |
|
890 | - } |
|
891 | - if (isset($nopAttrs['endFilePos'])) { |
|
892 | - $node->setAttribute('endFilePos', $nopAttrs['endFilePos']); |
|
893 | - } |
|
894 | - if (isset($nopAttrs['endTokenPos'])) { |
|
895 | - $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']); |
|
896 | - } |
|
897 | - } |
|
898 | - } |
|
899 | - |
|
900 | - protected function checkClassModifier($a, $b, $modifierPos) { |
|
901 | - try { |
|
902 | - Class_::verifyClassModifier($a, $b); |
|
903 | - } catch (Error $error) { |
|
904 | - $error->setAttributes($this->getAttributesAt($modifierPos)); |
|
905 | - $this->emitError($error); |
|
906 | - } |
|
907 | - } |
|
908 | - |
|
909 | - protected function checkModifier($a, $b, $modifierPos) { |
|
910 | - // Jumping through some hoops here because verifyModifier() is also used elsewhere |
|
911 | - try { |
|
912 | - Class_::verifyModifier($a, $b); |
|
913 | - } catch (Error $error) { |
|
914 | - $error->setAttributes($this->getAttributesAt($modifierPos)); |
|
915 | - $this->emitError($error); |
|
916 | - } |
|
917 | - } |
|
918 | - |
|
919 | - protected function checkParam(Param $node) { |
|
920 | - if ($node->variadic && null !== $node->default) { |
|
921 | - $this->emitError(new Error( |
|
922 | - 'Variadic parameter cannot have a default value', |
|
923 | - $node->default->getAttributes() |
|
924 | - )); |
|
925 | - } |
|
926 | - } |
|
927 | - |
|
928 | - protected function checkTryCatch(TryCatch $node) { |
|
929 | - if (empty($node->catches) && null === $node->finally) { |
|
930 | - $this->emitError(new Error( |
|
931 | - 'Cannot use try without catch or finally', $node->getAttributes() |
|
932 | - )); |
|
933 | - } |
|
934 | - } |
|
935 | - |
|
936 | - protected function checkNamespace(Namespace_ $node) { |
|
937 | - if (null !== $node->stmts) { |
|
938 | - foreach ($node->stmts as $stmt) { |
|
939 | - if ($stmt instanceof Namespace_) { |
|
940 | - $this->emitError(new Error( |
|
941 | - 'Namespace declarations cannot be nested', $stmt->getAttributes() |
|
942 | - )); |
|
943 | - } |
|
944 | - } |
|
945 | - } |
|
946 | - } |
|
947 | - |
|
948 | - private function checkClassName($name, $namePos) { |
|
949 | - if (null !== $name && $name->isSpecialClassName()) { |
|
950 | - $this->emitError(new Error( |
|
951 | - sprintf('Cannot use \'%s\' as class name as it is reserved', $name), |
|
952 | - $this->getAttributesAt($namePos) |
|
953 | - )); |
|
954 | - } |
|
955 | - } |
|
956 | - |
|
957 | - private function checkImplementedInterfaces(array $interfaces) { |
|
958 | - foreach ($interfaces as $interface) { |
|
959 | - if ($interface->isSpecialClassName()) { |
|
960 | - $this->emitError(new Error( |
|
961 | - sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), |
|
962 | - $interface->getAttributes() |
|
963 | - )); |
|
964 | - } |
|
965 | - } |
|
966 | - } |
|
967 | - |
|
968 | - protected function checkClass(Class_ $node, $namePos) { |
|
969 | - $this->checkClassName($node->name, $namePos); |
|
970 | - |
|
971 | - if ($node->extends && $node->extends->isSpecialClassName()) { |
|
972 | - $this->emitError(new Error( |
|
973 | - sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), |
|
974 | - $node->extends->getAttributes() |
|
975 | - )); |
|
976 | - } |
|
977 | - |
|
978 | - $this->checkImplementedInterfaces($node->implements); |
|
979 | - } |
|
980 | - |
|
981 | - protected function checkInterface(Interface_ $node, $namePos) { |
|
982 | - $this->checkClassName($node->name, $namePos); |
|
983 | - $this->checkImplementedInterfaces($node->extends); |
|
984 | - } |
|
985 | - |
|
986 | - protected function checkEnum(Enum_ $node, $namePos) { |
|
987 | - $this->checkClassName($node->name, $namePos); |
|
988 | - $this->checkImplementedInterfaces($node->implements); |
|
989 | - } |
|
990 | - |
|
991 | - protected function checkClassMethod(ClassMethod $node, $modifierPos) { |
|
992 | - if ($node->flags & Class_::MODIFIER_STATIC) { |
|
993 | - switch ($node->name->toLowerString()) { |
|
994 | - case '__construct': |
|
995 | - $this->emitError(new Error( |
|
996 | - sprintf('Constructor %s() cannot be static', $node->name), |
|
997 | - $this->getAttributesAt($modifierPos))); |
|
998 | - break; |
|
999 | - case '__destruct': |
|
1000 | - $this->emitError(new Error( |
|
1001 | - sprintf('Destructor %s() cannot be static', $node->name), |
|
1002 | - $this->getAttributesAt($modifierPos))); |
|
1003 | - break; |
|
1004 | - case '__clone': |
|
1005 | - $this->emitError(new Error( |
|
1006 | - sprintf('Clone method %s() cannot be static', $node->name), |
|
1007 | - $this->getAttributesAt($modifierPos))); |
|
1008 | - break; |
|
1009 | - } |
|
1010 | - } |
|
1011 | - |
|
1012 | - if ($node->flags & Class_::MODIFIER_READONLY) { |
|
1013 | - $this->emitError(new Error( |
|
1014 | - sprintf('Method %s() cannot be readonly', $node->name), |
|
1015 | - $this->getAttributesAt($modifierPos))); |
|
1016 | - } |
|
1017 | - } |
|
1018 | - |
|
1019 | - protected function checkClassConst(ClassConst $node, $modifierPos) { |
|
1020 | - if ($node->flags & Class_::MODIFIER_STATIC) { |
|
1021 | - $this->emitError(new Error( |
|
1022 | - "Cannot use 'static' as constant modifier", |
|
1023 | - $this->getAttributesAt($modifierPos))); |
|
1024 | - } |
|
1025 | - if ($node->flags & Class_::MODIFIER_ABSTRACT) { |
|
1026 | - $this->emitError(new Error( |
|
1027 | - "Cannot use 'abstract' as constant modifier", |
|
1028 | - $this->getAttributesAt($modifierPos))); |
|
1029 | - } |
|
1030 | - if ($node->flags & Class_::MODIFIER_READONLY) { |
|
1031 | - $this->emitError(new Error( |
|
1032 | - "Cannot use 'readonly' as constant modifier", |
|
1033 | - $this->getAttributesAt($modifierPos))); |
|
1034 | - } |
|
1035 | - } |
|
1036 | - |
|
1037 | - protected function checkProperty(Property $node, $modifierPos) { |
|
1038 | - if ($node->flags & Class_::MODIFIER_ABSTRACT) { |
|
1039 | - $this->emitError(new Error('Properties cannot be declared abstract', |
|
1040 | - $this->getAttributesAt($modifierPos))); |
|
1041 | - } |
|
1042 | - |
|
1043 | - if ($node->flags & Class_::MODIFIER_FINAL) { |
|
1044 | - $this->emitError(new Error('Properties cannot be declared final', |
|
1045 | - $this->getAttributesAt($modifierPos))); |
|
1046 | - } |
|
1047 | - } |
|
1048 | - |
|
1049 | - protected function checkUseUse(UseUse $node, $namePos) { |
|
1050 | - if ($node->alias && $node->alias->isSpecialClassName()) { |
|
1051 | - $this->emitError(new Error( |
|
1052 | - sprintf( |
|
1053 | - 'Cannot use %s as %s because \'%2$s\' is a special class name', |
|
1054 | - $node->name, $node->alias |
|
1055 | - ), |
|
1056 | - $this->getAttributesAt($namePos) |
|
1057 | - )); |
|
1058 | - } |
|
1059 | - } |
|
473 | + /** |
|
474 | + * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions. |
|
475 | + * |
|
476 | + * @param Node\Stmt[] $stmts |
|
477 | + * @return Node\Stmt[] |
|
478 | + */ |
|
479 | + protected function handleNamespaces(array $stmts) : array { |
|
480 | + $hasErrored = false; |
|
481 | + $style = $this->getNamespacingStyle($stmts); |
|
482 | + if (null === $style) { |
|
483 | + // not namespaced, nothing to do |
|
484 | + return $stmts; |
|
485 | + } elseif ('brace' === $style) { |
|
486 | + // For braced namespaces we only have to check that there are no invalid statements between the namespaces |
|
487 | + $afterFirstNamespace = false; |
|
488 | + foreach ($stmts as $stmt) { |
|
489 | + if ($stmt instanceof Node\Stmt\Namespace_) { |
|
490 | + $afterFirstNamespace = true; |
|
491 | + } elseif (!$stmt instanceof Node\Stmt\HaltCompiler |
|
492 | + && !$stmt instanceof Node\Stmt\Nop |
|
493 | + && $afterFirstNamespace && !$hasErrored) { |
|
494 | + $this->emitError(new Error( |
|
495 | + 'No code may exist outside of namespace {}', $stmt->getAttributes())); |
|
496 | + $hasErrored = true; // Avoid one error for every statement |
|
497 | + } |
|
498 | + } |
|
499 | + return $stmts; |
|
500 | + } else { |
|
501 | + // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts |
|
502 | + $resultStmts = []; |
|
503 | + $targetStmts =& $resultStmts; |
|
504 | + $lastNs = null; |
|
505 | + foreach ($stmts as $stmt) { |
|
506 | + if ($stmt instanceof Node\Stmt\Namespace_) { |
|
507 | + if ($lastNs !== null) { |
|
508 | + $this->fixupNamespaceAttributes($lastNs); |
|
509 | + } |
|
510 | + if ($stmt->stmts === null) { |
|
511 | + $stmt->stmts = []; |
|
512 | + $targetStmts =& $stmt->stmts; |
|
513 | + $resultStmts[] = $stmt; |
|
514 | + } else { |
|
515 | + // This handles the invalid case of mixed style namespaces |
|
516 | + $resultStmts[] = $stmt; |
|
517 | + $targetStmts =& $resultStmts; |
|
518 | + } |
|
519 | + $lastNs = $stmt; |
|
520 | + } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { |
|
521 | + // __halt_compiler() is not moved into the namespace |
|
522 | + $resultStmts[] = $stmt; |
|
523 | + } else { |
|
524 | + $targetStmts[] = $stmt; |
|
525 | + } |
|
526 | + } |
|
527 | + if ($lastNs !== null) { |
|
528 | + $this->fixupNamespaceAttributes($lastNs); |
|
529 | + } |
|
530 | + return $resultStmts; |
|
531 | + } |
|
532 | + } |
|
533 | + |
|
534 | + private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) { |
|
535 | + // We moved the statements into the namespace node, as such the end of the namespace node |
|
536 | + // needs to be extended to the end of the statements. |
|
537 | + if (empty($stmt->stmts)) { |
|
538 | + return; |
|
539 | + } |
|
540 | + |
|
541 | + // We only move the builtin end attributes here. This is the best we can do with the |
|
542 | + // knowledge we have. |
|
543 | + $endAttributes = ['endLine', 'endFilePos', 'endTokenPos']; |
|
544 | + $lastStmt = $stmt->stmts[count($stmt->stmts) - 1]; |
|
545 | + foreach ($endAttributes as $endAttribute) { |
|
546 | + if ($lastStmt->hasAttribute($endAttribute)) { |
|
547 | + $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute)); |
|
548 | + } |
|
549 | + } |
|
550 | + } |
|
551 | + |
|
552 | + /** |
|
553 | + * Determine namespacing style (semicolon or brace) |
|
554 | + * |
|
555 | + * @param Node[] $stmts Top-level statements. |
|
556 | + * |
|
557 | + * @return null|string One of "semicolon", "brace" or null (no namespaces) |
|
558 | + */ |
|
559 | + private function getNamespacingStyle(array $stmts) { |
|
560 | + $style = null; |
|
561 | + $hasNotAllowedStmts = false; |
|
562 | + foreach ($stmts as $i => $stmt) { |
|
563 | + if ($stmt instanceof Node\Stmt\Namespace_) { |
|
564 | + $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace'; |
|
565 | + if (null === $style) { |
|
566 | + $style = $currentStyle; |
|
567 | + if ($hasNotAllowedStmts) { |
|
568 | + $this->emitError(new Error( |
|
569 | + 'Namespace declaration statement has to be the very first statement in the script', |
|
570 | + $stmt->getLine() // Avoid marking the entire namespace as an error |
|
571 | + )); |
|
572 | + } |
|
573 | + } elseif ($style !== $currentStyle) { |
|
574 | + $this->emitError(new Error( |
|
575 | + 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', |
|
576 | + $stmt->getLine() // Avoid marking the entire namespace as an error |
|
577 | + )); |
|
578 | + // Treat like semicolon style for namespace normalization |
|
579 | + return 'semicolon'; |
|
580 | + } |
|
581 | + continue; |
|
582 | + } |
|
583 | + |
|
584 | + /* declare(), __halt_compiler() and nops can be used before a namespace declaration */ |
|
585 | + if ($stmt instanceof Node\Stmt\Declare_ |
|
586 | + || $stmt instanceof Node\Stmt\HaltCompiler |
|
587 | + || $stmt instanceof Node\Stmt\Nop) { |
|
588 | + continue; |
|
589 | + } |
|
590 | + |
|
591 | + /* There may be a hashbang line at the very start of the file */ |
|
592 | + if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) { |
|
593 | + continue; |
|
594 | + } |
|
595 | + |
|
596 | + /* Everything else if forbidden before namespace declarations */ |
|
597 | + $hasNotAllowedStmts = true; |
|
598 | + } |
|
599 | + return $style; |
|
600 | + } |
|
601 | + |
|
602 | + /** |
|
603 | + * Fix up parsing of static property calls in PHP 5. |
|
604 | + * |
|
605 | + * In PHP 5 A::$b[c][d] and A::$b[c][d]() have very different interpretation. The former is |
|
606 | + * interpreted as (A::$b)[c][d], while the latter is the same as A::{$b[c][d]}(). We parse the |
|
607 | + * latter as the former initially and this method fixes the AST into the correct form when we |
|
608 | + * encounter the "()". |
|
609 | + * |
|
610 | + * @param Node\Expr\StaticPropertyFetch|Node\Expr\ArrayDimFetch $prop |
|
611 | + * @param Node\Arg[] $args |
|
612 | + * @param array $attributes |
|
613 | + * |
|
614 | + * @return Expr\StaticCall |
|
615 | + */ |
|
616 | + protected function fixupPhp5StaticPropCall($prop, array $args, array $attributes) : Expr\StaticCall { |
|
617 | + if ($prop instanceof Node\Expr\StaticPropertyFetch) { |
|
618 | + $name = $prop->name instanceof VarLikeIdentifier |
|
619 | + ? $prop->name->toString() : $prop->name; |
|
620 | + $var = new Expr\Variable($name, $prop->name->getAttributes()); |
|
621 | + return new Expr\StaticCall($prop->class, $var, $args, $attributes); |
|
622 | + } elseif ($prop instanceof Node\Expr\ArrayDimFetch) { |
|
623 | + $tmp = $prop; |
|
624 | + while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { |
|
625 | + $tmp = $tmp->var; |
|
626 | + } |
|
627 | + |
|
628 | + /** @var Expr\StaticPropertyFetch $staticProp */ |
|
629 | + $staticProp = $tmp->var; |
|
630 | + |
|
631 | + // Set start attributes to attributes of innermost node |
|
632 | + $tmp = $prop; |
|
633 | + $this->fixupStartAttributes($tmp, $staticProp->name); |
|
634 | + while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { |
|
635 | + $tmp = $tmp->var; |
|
636 | + $this->fixupStartAttributes($tmp, $staticProp->name); |
|
637 | + } |
|
638 | + |
|
639 | + $name = $staticProp->name instanceof VarLikeIdentifier |
|
640 | + ? $staticProp->name->toString() : $staticProp->name; |
|
641 | + $tmp->var = new Expr\Variable($name, $staticProp->name->getAttributes()); |
|
642 | + return new Expr\StaticCall($staticProp->class, $prop, $args, $attributes); |
|
643 | + } else { |
|
644 | + throw new \Exception; |
|
645 | + } |
|
646 | + } |
|
647 | + |
|
648 | + protected function fixupStartAttributes(Node $to, Node $from) { |
|
649 | + $startAttributes = ['startLine', 'startFilePos', 'startTokenPos']; |
|
650 | + foreach ($startAttributes as $startAttribute) { |
|
651 | + if ($from->hasAttribute($startAttribute)) { |
|
652 | + $to->setAttribute($startAttribute, $from->getAttribute($startAttribute)); |
|
653 | + } |
|
654 | + } |
|
655 | + } |
|
656 | + |
|
657 | + protected function handleBuiltinTypes(Name $name) { |
|
658 | + $builtinTypes = [ |
|
659 | + 'bool' => true, |
|
660 | + 'int' => true, |
|
661 | + 'float' => true, |
|
662 | + 'string' => true, |
|
663 | + 'iterable' => true, |
|
664 | + 'void' => true, |
|
665 | + 'object' => true, |
|
666 | + 'null' => true, |
|
667 | + 'false' => true, |
|
668 | + 'mixed' => true, |
|
669 | + 'never' => true, |
|
670 | + 'true' => true, |
|
671 | + ]; |
|
672 | + |
|
673 | + if (!$name->isUnqualified()) { |
|
674 | + return $name; |
|
675 | + } |
|
676 | + |
|
677 | + $lowerName = $name->toLowerString(); |
|
678 | + if (!isset($builtinTypes[$lowerName])) { |
|
679 | + return $name; |
|
680 | + } |
|
681 | + |
|
682 | + return new Node\Identifier($lowerName, $name->getAttributes()); |
|
683 | + } |
|
684 | + |
|
685 | + /** |
|
686 | + * Get combined start and end attributes at a stack location |
|
687 | + * |
|
688 | + * @param int $pos Stack location |
|
689 | + * |
|
690 | + * @return array Combined start and end attributes |
|
691 | + */ |
|
692 | + protected function getAttributesAt(int $pos) : array { |
|
693 | + return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; |
|
694 | + } |
|
695 | + |
|
696 | + protected function getFloatCastKind(string $cast): int |
|
697 | + { |
|
698 | + $cast = strtolower($cast); |
|
699 | + if (strpos($cast, 'float') !== false) { |
|
700 | + return Double::KIND_FLOAT; |
|
701 | + } |
|
702 | + |
|
703 | + if (strpos($cast, 'real') !== false) { |
|
704 | + return Double::KIND_REAL; |
|
705 | + } |
|
706 | + |
|
707 | + return Double::KIND_DOUBLE; |
|
708 | + } |
|
709 | + |
|
710 | + protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { |
|
711 | + try { |
|
712 | + return LNumber::fromString($str, $attributes, $allowInvalidOctal); |
|
713 | + } catch (Error $error) { |
|
714 | + $this->emitError($error); |
|
715 | + // Use dummy value |
|
716 | + return new LNumber(0, $attributes); |
|
717 | + } |
|
718 | + } |
|
719 | + |
|
720 | + /** |
|
721 | + * Parse a T_NUM_STRING token into either an integer or string node. |
|
722 | + * |
|
723 | + * @param string $str Number string |
|
724 | + * @param array $attributes Attributes |
|
725 | + * |
|
726 | + * @return LNumber|String_ Integer or string node. |
|
727 | + */ |
|
728 | + protected function parseNumString(string $str, array $attributes) { |
|
729 | + if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { |
|
730 | + return new String_($str, $attributes); |
|
731 | + } |
|
732 | + |
|
733 | + $num = +$str; |
|
734 | + if (!is_int($num)) { |
|
735 | + return new String_($str, $attributes); |
|
736 | + } |
|
737 | + |
|
738 | + return new LNumber($num, $attributes); |
|
739 | + } |
|
740 | + |
|
741 | + protected function stripIndentation( |
|
742 | + string $string, int $indentLen, string $indentChar, |
|
743 | + bool $newlineAtStart, bool $newlineAtEnd, array $attributes |
|
744 | + ) { |
|
745 | + if ($indentLen === 0) { |
|
746 | + return $string; |
|
747 | + } |
|
748 | + |
|
749 | + $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)'; |
|
750 | + $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])'; |
|
751 | + $regex = '/' . $start . '([ \t]*)(' . $end . ')?/'; |
|
752 | + return preg_replace_callback( |
|
753 | + $regex, |
|
754 | + function ($matches) use ($indentLen, $indentChar, $attributes) { |
|
755 | + $prefix = substr($matches[1], 0, $indentLen); |
|
756 | + if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { |
|
757 | + $this->emitError(new Error( |
|
758 | + 'Invalid indentation - tabs and spaces cannot be mixed', $attributes |
|
759 | + )); |
|
760 | + } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { |
|
761 | + $this->emitError(new Error( |
|
762 | + 'Invalid body indentation level ' . |
|
763 | + '(expecting an indentation level of at least ' . $indentLen . ')', |
|
764 | + $attributes |
|
765 | + )); |
|
766 | + } |
|
767 | + return substr($matches[0], strlen($prefix)); |
|
768 | + }, |
|
769 | + $string |
|
770 | + ); |
|
771 | + } |
|
772 | + |
|
773 | + protected function parseDocString( |
|
774 | + string $startToken, $contents, string $endToken, |
|
775 | + array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape |
|
776 | + ) { |
|
777 | + $kind = strpos($startToken, "'") === false |
|
778 | + ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; |
|
779 | + |
|
780 | + $regex = '/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/'; |
|
781 | + $result = preg_match($regex, $startToken, $matches); |
|
782 | + assert($result === 1); |
|
783 | + $label = $matches[1]; |
|
784 | + |
|
785 | + $result = preg_match('/\A[ \t]*/', $endToken, $matches); |
|
786 | + assert($result === 1); |
|
787 | + $indentation = $matches[0]; |
|
788 | + |
|
789 | + $attributes['kind'] = $kind; |
|
790 | + $attributes['docLabel'] = $label; |
|
791 | + $attributes['docIndentation'] = $indentation; |
|
792 | + |
|
793 | + $indentHasSpaces = false !== strpos($indentation, " "); |
|
794 | + $indentHasTabs = false !== strpos($indentation, "\t"); |
|
795 | + if ($indentHasSpaces && $indentHasTabs) { |
|
796 | + $this->emitError(new Error( |
|
797 | + 'Invalid indentation - tabs and spaces cannot be mixed', |
|
798 | + $endTokenAttributes |
|
799 | + )); |
|
800 | + |
|
801 | + // Proceed processing as if this doc string is not indented |
|
802 | + $indentation = ''; |
|
803 | + } |
|
804 | + |
|
805 | + $indentLen = \strlen($indentation); |
|
806 | + $indentChar = $indentHasSpaces ? " " : "\t"; |
|
807 | + |
|
808 | + if (\is_string($contents)) { |
|
809 | + if ($contents === '') { |
|
810 | + return new String_('', $attributes); |
|
811 | + } |
|
812 | + |
|
813 | + $contents = $this->stripIndentation( |
|
814 | + $contents, $indentLen, $indentChar, true, true, $attributes |
|
815 | + ); |
|
816 | + $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); |
|
817 | + |
|
818 | + if ($kind === String_::KIND_HEREDOC) { |
|
819 | + $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); |
|
820 | + } |
|
821 | + |
|
822 | + return new String_($contents, $attributes); |
|
823 | + } else { |
|
824 | + assert(count($contents) > 0); |
|
825 | + if (!$contents[0] instanceof Node\Scalar\EncapsedStringPart) { |
|
826 | + // If there is no leading encapsed string part, pretend there is an empty one |
|
827 | + $this->stripIndentation( |
|
828 | + '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() |
|
829 | + ); |
|
830 | + } |
|
831 | + |
|
832 | + $newContents = []; |
|
833 | + foreach ($contents as $i => $part) { |
|
834 | + if ($part instanceof Node\Scalar\EncapsedStringPart) { |
|
835 | + $isLast = $i === \count($contents) - 1; |
|
836 | + $part->value = $this->stripIndentation( |
|
837 | + $part->value, $indentLen, $indentChar, |
|
838 | + $i === 0, $isLast, $part->getAttributes() |
|
839 | + ); |
|
840 | + $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); |
|
841 | + if ($isLast) { |
|
842 | + $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); |
|
843 | + } |
|
844 | + if ('' === $part->value) { |
|
845 | + continue; |
|
846 | + } |
|
847 | + } |
|
848 | + $newContents[] = $part; |
|
849 | + } |
|
850 | + return new Encapsed($newContents, $attributes); |
|
851 | + } |
|
852 | + } |
|
853 | + |
|
854 | + /** |
|
855 | + * Create attributes for a zero-length common-capturing nop. |
|
856 | + * |
|
857 | + * @param Comment[] $comments |
|
858 | + * @return array |
|
859 | + */ |
|
860 | + protected function createCommentNopAttributes(array $comments) { |
|
861 | + $comment = $comments[count($comments) - 1]; |
|
862 | + $commentEndLine = $comment->getEndLine(); |
|
863 | + $commentEndFilePos = $comment->getEndFilePos(); |
|
864 | + $commentEndTokenPos = $comment->getEndTokenPos(); |
|
865 | + |
|
866 | + $attributes = ['comments' => $comments]; |
|
867 | + if (-1 !== $commentEndLine) { |
|
868 | + $attributes['startLine'] = $commentEndLine; |
|
869 | + $attributes['endLine'] = $commentEndLine; |
|
870 | + } |
|
871 | + if (-1 !== $commentEndFilePos) { |
|
872 | + $attributes['startFilePos'] = $commentEndFilePos + 1; |
|
873 | + $attributes['endFilePos'] = $commentEndFilePos; |
|
874 | + } |
|
875 | + if (-1 !== $commentEndTokenPos) { |
|
876 | + $attributes['startTokenPos'] = $commentEndTokenPos + 1; |
|
877 | + $attributes['endTokenPos'] = $commentEndTokenPos; |
|
878 | + } |
|
879 | + return $attributes; |
|
880 | + } |
|
881 | + |
|
882 | + /** @param ElseIf_|Else_ $node */ |
|
883 | + protected function fixupAlternativeElse($node) { |
|
884 | + // Make sure a trailing nop statement carrying comments is part of the node. |
|
885 | + $numStmts = \count($node->stmts); |
|
886 | + if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { |
|
887 | + $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes(); |
|
888 | + if (isset($nopAttrs['endLine'])) { |
|
889 | + $node->setAttribute('endLine', $nopAttrs['endLine']); |
|
890 | + } |
|
891 | + if (isset($nopAttrs['endFilePos'])) { |
|
892 | + $node->setAttribute('endFilePos', $nopAttrs['endFilePos']); |
|
893 | + } |
|
894 | + if (isset($nopAttrs['endTokenPos'])) { |
|
895 | + $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']); |
|
896 | + } |
|
897 | + } |
|
898 | + } |
|
899 | + |
|
900 | + protected function checkClassModifier($a, $b, $modifierPos) { |
|
901 | + try { |
|
902 | + Class_::verifyClassModifier($a, $b); |
|
903 | + } catch (Error $error) { |
|
904 | + $error->setAttributes($this->getAttributesAt($modifierPos)); |
|
905 | + $this->emitError($error); |
|
906 | + } |
|
907 | + } |
|
908 | + |
|
909 | + protected function checkModifier($a, $b, $modifierPos) { |
|
910 | + // Jumping through some hoops here because verifyModifier() is also used elsewhere |
|
911 | + try { |
|
912 | + Class_::verifyModifier($a, $b); |
|
913 | + } catch (Error $error) { |
|
914 | + $error->setAttributes($this->getAttributesAt($modifierPos)); |
|
915 | + $this->emitError($error); |
|
916 | + } |
|
917 | + } |
|
918 | + |
|
919 | + protected function checkParam(Param $node) { |
|
920 | + if ($node->variadic && null !== $node->default) { |
|
921 | + $this->emitError(new Error( |
|
922 | + 'Variadic parameter cannot have a default value', |
|
923 | + $node->default->getAttributes() |
|
924 | + )); |
|
925 | + } |
|
926 | + } |
|
927 | + |
|
928 | + protected function checkTryCatch(TryCatch $node) { |
|
929 | + if (empty($node->catches) && null === $node->finally) { |
|
930 | + $this->emitError(new Error( |
|
931 | + 'Cannot use try without catch or finally', $node->getAttributes() |
|
932 | + )); |
|
933 | + } |
|
934 | + } |
|
935 | + |
|
936 | + protected function checkNamespace(Namespace_ $node) { |
|
937 | + if (null !== $node->stmts) { |
|
938 | + foreach ($node->stmts as $stmt) { |
|
939 | + if ($stmt instanceof Namespace_) { |
|
940 | + $this->emitError(new Error( |
|
941 | + 'Namespace declarations cannot be nested', $stmt->getAttributes() |
|
942 | + )); |
|
943 | + } |
|
944 | + } |
|
945 | + } |
|
946 | + } |
|
947 | + |
|
948 | + private function checkClassName($name, $namePos) { |
|
949 | + if (null !== $name && $name->isSpecialClassName()) { |
|
950 | + $this->emitError(new Error( |
|
951 | + sprintf('Cannot use \'%s\' as class name as it is reserved', $name), |
|
952 | + $this->getAttributesAt($namePos) |
|
953 | + )); |
|
954 | + } |
|
955 | + } |
|
956 | + |
|
957 | + private function checkImplementedInterfaces(array $interfaces) { |
|
958 | + foreach ($interfaces as $interface) { |
|
959 | + if ($interface->isSpecialClassName()) { |
|
960 | + $this->emitError(new Error( |
|
961 | + sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), |
|
962 | + $interface->getAttributes() |
|
963 | + )); |
|
964 | + } |
|
965 | + } |
|
966 | + } |
|
967 | + |
|
968 | + protected function checkClass(Class_ $node, $namePos) { |
|
969 | + $this->checkClassName($node->name, $namePos); |
|
970 | + |
|
971 | + if ($node->extends && $node->extends->isSpecialClassName()) { |
|
972 | + $this->emitError(new Error( |
|
973 | + sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), |
|
974 | + $node->extends->getAttributes() |
|
975 | + )); |
|
976 | + } |
|
977 | + |
|
978 | + $this->checkImplementedInterfaces($node->implements); |
|
979 | + } |
|
980 | + |
|
981 | + protected function checkInterface(Interface_ $node, $namePos) { |
|
982 | + $this->checkClassName($node->name, $namePos); |
|
983 | + $this->checkImplementedInterfaces($node->extends); |
|
984 | + } |
|
985 | + |
|
986 | + protected function checkEnum(Enum_ $node, $namePos) { |
|
987 | + $this->checkClassName($node->name, $namePos); |
|
988 | + $this->checkImplementedInterfaces($node->implements); |
|
989 | + } |
|
990 | + |
|
991 | + protected function checkClassMethod(ClassMethod $node, $modifierPos) { |
|
992 | + if ($node->flags & Class_::MODIFIER_STATIC) { |
|
993 | + switch ($node->name->toLowerString()) { |
|
994 | + case '__construct': |
|
995 | + $this->emitError(new Error( |
|
996 | + sprintf('Constructor %s() cannot be static', $node->name), |
|
997 | + $this->getAttributesAt($modifierPos))); |
|
998 | + break; |
|
999 | + case '__destruct': |
|
1000 | + $this->emitError(new Error( |
|
1001 | + sprintf('Destructor %s() cannot be static', $node->name), |
|
1002 | + $this->getAttributesAt($modifierPos))); |
|
1003 | + break; |
|
1004 | + case '__clone': |
|
1005 | + $this->emitError(new Error( |
|
1006 | + sprintf('Clone method %s() cannot be static', $node->name), |
|
1007 | + $this->getAttributesAt($modifierPos))); |
|
1008 | + break; |
|
1009 | + } |
|
1010 | + } |
|
1011 | + |
|
1012 | + if ($node->flags & Class_::MODIFIER_READONLY) { |
|
1013 | + $this->emitError(new Error( |
|
1014 | + sprintf('Method %s() cannot be readonly', $node->name), |
|
1015 | + $this->getAttributesAt($modifierPos))); |
|
1016 | + } |
|
1017 | + } |
|
1018 | + |
|
1019 | + protected function checkClassConst(ClassConst $node, $modifierPos) { |
|
1020 | + if ($node->flags & Class_::MODIFIER_STATIC) { |
|
1021 | + $this->emitError(new Error( |
|
1022 | + "Cannot use 'static' as constant modifier", |
|
1023 | + $this->getAttributesAt($modifierPos))); |
|
1024 | + } |
|
1025 | + if ($node->flags & Class_::MODIFIER_ABSTRACT) { |
|
1026 | + $this->emitError(new Error( |
|
1027 | + "Cannot use 'abstract' as constant modifier", |
|
1028 | + $this->getAttributesAt($modifierPos))); |
|
1029 | + } |
|
1030 | + if ($node->flags & Class_::MODIFIER_READONLY) { |
|
1031 | + $this->emitError(new Error( |
|
1032 | + "Cannot use 'readonly' as constant modifier", |
|
1033 | + $this->getAttributesAt($modifierPos))); |
|
1034 | + } |
|
1035 | + } |
|
1036 | + |
|
1037 | + protected function checkProperty(Property $node, $modifierPos) { |
|
1038 | + if ($node->flags & Class_::MODIFIER_ABSTRACT) { |
|
1039 | + $this->emitError(new Error('Properties cannot be declared abstract', |
|
1040 | + $this->getAttributesAt($modifierPos))); |
|
1041 | + } |
|
1042 | + |
|
1043 | + if ($node->flags & Class_::MODIFIER_FINAL) { |
|
1044 | + $this->emitError(new Error('Properties cannot be declared final', |
|
1045 | + $this->getAttributesAt($modifierPos))); |
|
1046 | + } |
|
1047 | + } |
|
1048 | + |
|
1049 | + protected function checkUseUse(UseUse $node, $namePos) { |
|
1050 | + if ($node->alias && $node->alias->isSpecialClassName()) { |
|
1051 | + $this->emitError(new Error( |
|
1052 | + sprintf( |
|
1053 | + 'Cannot use %s as %s because \'%2$s\' is a special class name', |
|
1054 | + $node->name, $node->alias |
|
1055 | + ), |
|
1056 | + $this->getAttributesAt($namePos) |
|
1057 | + )); |
|
1058 | + } |
|
1059 | + } |
|
1060 | 1060 | } |
@@ -390,10 +390,10 @@ discard block |
||
390 | 390 | protected function getErrorMessage(int $symbol, int $state) : string { |
391 | 391 | $expectedString = ''; |
392 | 392 | if ($expected = $this->getExpectedTokens($state)) { |
393 | - $expectedString = ', expecting ' . implode(' or ', $expected); |
|
393 | + $expectedString = ', expecting '.implode(' or ', $expected); |
|
394 | 394 | } |
395 | 395 | |
396 | - return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; |
|
396 | + return 'Syntax error, unexpected '.$this->symbolToName[$symbol].$expectedString; |
|
397 | 397 | } |
398 | 398 | |
399 | 399 | /** |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | } else { |
501 | 501 | // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts |
502 | 502 | $resultStmts = []; |
503 | - $targetStmts =& $resultStmts; |
|
503 | + $targetStmts = & $resultStmts; |
|
504 | 504 | $lastNs = null; |
505 | 505 | foreach ($stmts as $stmt) { |
506 | 506 | if ($stmt instanceof Node\Stmt\Namespace_) { |
@@ -509,12 +509,12 @@ discard block |
||
509 | 509 | } |
510 | 510 | if ($stmt->stmts === null) { |
511 | 511 | $stmt->stmts = []; |
512 | - $targetStmts =& $stmt->stmts; |
|
512 | + $targetStmts = & $stmt->stmts; |
|
513 | 513 | $resultStmts[] = $stmt; |
514 | 514 | } else { |
515 | 515 | // This handles the invalid case of mixed style namespaces |
516 | 516 | $resultStmts[] = $stmt; |
517 | - $targetStmts =& $resultStmts; |
|
517 | + $targetStmts = & $resultStmts; |
|
518 | 518 | } |
519 | 519 | $lastNs = $stmt; |
520 | 520 | } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { |
@@ -748,10 +748,10 @@ discard block |
||
748 | 748 | |
749 | 749 | $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)'; |
750 | 750 | $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])'; |
751 | - $regex = '/' . $start . '([ \t]*)(' . $end . ')?/'; |
|
751 | + $regex = '/'.$start.'([ \t]*)('.$end.')?/'; |
|
752 | 752 | return preg_replace_callback( |
753 | 753 | $regex, |
754 | - function ($matches) use ($indentLen, $indentChar, $attributes) { |
|
754 | + function($matches) use ($indentLen, $indentChar, $attributes) { |
|
755 | 755 | $prefix = substr($matches[1], 0, $indentLen); |
756 | 756 | if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { |
757 | 757 | $this->emitError(new Error( |
@@ -759,8 +759,8 @@ discard block |
||
759 | 759 | )); |
760 | 760 | } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { |
761 | 761 | $this->emitError(new Error( |
762 | - 'Invalid body indentation level ' . |
|
763 | - '(expecting an indentation level of at least ' . $indentLen . ')', |
|
762 | + 'Invalid body indentation level '. |
|
763 | + '(expecting an indentation level of at least '.$indentLen.')', |
|
764 | 764 | $attributes |
765 | 765 | )); |
766 | 766 | } |
@@ -27,8 +27,7 @@ |
||
27 | 27 | use PhpParser\Node\Stmt\UseUse; |
28 | 28 | use PhpParser\Node\VarLikeIdentifier; |
29 | 29 | |
30 | -abstract class ParserAbstract implements Parser |
|
31 | -{ |
|
30 | +abstract class ParserAbstract implements Parser { |
|
32 | 31 | const SYMBOL_NONE = -1; |
33 | 32 | |
34 | 33 | /* |
@@ -12,388 +12,388 @@ |
||
12 | 12 | |
13 | 13 | class BuilderFactory |
14 | 14 | { |
15 | - /** |
|
16 | - * Creates an attribute node. |
|
17 | - * |
|
18 | - * @param string|Name $name Name of the attribute |
|
19 | - * @param array $args Attribute named arguments |
|
20 | - * |
|
21 | - * @return Node\Attribute |
|
22 | - */ |
|
23 | - public function attribute($name, array $args = []) : Node\Attribute { |
|
24 | - return new Node\Attribute( |
|
25 | - BuilderHelpers::normalizeName($name), |
|
26 | - $this->args($args) |
|
27 | - ); |
|
28 | - } |
|
29 | - |
|
30 | - /** |
|
31 | - * Creates a namespace builder. |
|
32 | - * |
|
33 | - * @param null|string|Node\Name $name Name of the namespace |
|
34 | - * |
|
35 | - * @return Builder\Namespace_ The created namespace builder |
|
36 | - */ |
|
37 | - public function namespace($name) : Builder\Namespace_ { |
|
38 | - return new Builder\Namespace_($name); |
|
39 | - } |
|
40 | - |
|
41 | - /** |
|
42 | - * Creates a class builder. |
|
43 | - * |
|
44 | - * @param string $name Name of the class |
|
45 | - * |
|
46 | - * @return Builder\Class_ The created class builder |
|
47 | - */ |
|
48 | - public function class(string $name) : Builder\Class_ { |
|
49 | - return new Builder\Class_($name); |
|
50 | - } |
|
51 | - |
|
52 | - /** |
|
53 | - * Creates an interface builder. |
|
54 | - * |
|
55 | - * @param string $name Name of the interface |
|
56 | - * |
|
57 | - * @return Builder\Interface_ The created interface builder |
|
58 | - */ |
|
59 | - public function interface(string $name) : Builder\Interface_ { |
|
60 | - return new Builder\Interface_($name); |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * Creates a trait builder. |
|
65 | - * |
|
66 | - * @param string $name Name of the trait |
|
67 | - * |
|
68 | - * @return Builder\Trait_ The created trait builder |
|
69 | - */ |
|
70 | - public function trait(string $name) : Builder\Trait_ { |
|
71 | - return new Builder\Trait_($name); |
|
72 | - } |
|
73 | - |
|
74 | - /** |
|
75 | - * Creates an enum builder. |
|
76 | - * |
|
77 | - * @param string $name Name of the enum |
|
78 | - * |
|
79 | - * @return Builder\Enum_ The created enum builder |
|
80 | - */ |
|
81 | - public function enum(string $name) : Builder\Enum_ { |
|
82 | - return new Builder\Enum_($name); |
|
83 | - } |
|
84 | - |
|
85 | - /** |
|
86 | - * Creates a trait use builder. |
|
87 | - * |
|
88 | - * @param Node\Name|string ...$traits Trait names |
|
89 | - * |
|
90 | - * @return Builder\TraitUse The create trait use builder |
|
91 | - */ |
|
92 | - public function useTrait(...$traits) : Builder\TraitUse { |
|
93 | - return new Builder\TraitUse(...$traits); |
|
94 | - } |
|
95 | - |
|
96 | - /** |
|
97 | - * Creates a trait use adaptation builder. |
|
98 | - * |
|
99 | - * @param Node\Name|string|null $trait Trait name |
|
100 | - * @param Node\Identifier|string $method Method name |
|
101 | - * |
|
102 | - * @return Builder\TraitUseAdaptation The create trait use adaptation builder |
|
103 | - */ |
|
104 | - public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation { |
|
105 | - if ($method === null) { |
|
106 | - $method = $trait; |
|
107 | - $trait = null; |
|
108 | - } |
|
109 | - |
|
110 | - return new Builder\TraitUseAdaptation($trait, $method); |
|
111 | - } |
|
112 | - |
|
113 | - /** |
|
114 | - * Creates a method builder. |
|
115 | - * |
|
116 | - * @param string $name Name of the method |
|
117 | - * |
|
118 | - * @return Builder\Method The created method builder |
|
119 | - */ |
|
120 | - public function method(string $name) : Builder\Method { |
|
121 | - return new Builder\Method($name); |
|
122 | - } |
|
123 | - |
|
124 | - /** |
|
125 | - * Creates a parameter builder. |
|
126 | - * |
|
127 | - * @param string $name Name of the parameter |
|
128 | - * |
|
129 | - * @return Builder\Param The created parameter builder |
|
130 | - */ |
|
131 | - public function param(string $name) : Builder\Param { |
|
132 | - return new Builder\Param($name); |
|
133 | - } |
|
134 | - |
|
135 | - /** |
|
136 | - * Creates a property builder. |
|
137 | - * |
|
138 | - * @param string $name Name of the property |
|
139 | - * |
|
140 | - * @return Builder\Property The created property builder |
|
141 | - */ |
|
142 | - public function property(string $name) : Builder\Property { |
|
143 | - return new Builder\Property($name); |
|
144 | - } |
|
145 | - |
|
146 | - /** |
|
147 | - * Creates a function builder. |
|
148 | - * |
|
149 | - * @param string $name Name of the function |
|
150 | - * |
|
151 | - * @return Builder\Function_ The created function builder |
|
152 | - */ |
|
153 | - public function function(string $name) : Builder\Function_ { |
|
154 | - return new Builder\Function_($name); |
|
155 | - } |
|
156 | - |
|
157 | - /** |
|
158 | - * Creates a namespace/class use builder. |
|
159 | - * |
|
160 | - * @param Node\Name|string $name Name of the entity (namespace or class) to alias |
|
161 | - * |
|
162 | - * @return Builder\Use_ The created use builder |
|
163 | - */ |
|
164 | - public function use($name) : Builder\Use_ { |
|
165 | - return new Builder\Use_($name, Use_::TYPE_NORMAL); |
|
166 | - } |
|
167 | - |
|
168 | - /** |
|
169 | - * Creates a function use builder. |
|
170 | - * |
|
171 | - * @param Node\Name|string $name Name of the function to alias |
|
172 | - * |
|
173 | - * @return Builder\Use_ The created use function builder |
|
174 | - */ |
|
175 | - public function useFunction($name) : Builder\Use_ { |
|
176 | - return new Builder\Use_($name, Use_::TYPE_FUNCTION); |
|
177 | - } |
|
178 | - |
|
179 | - /** |
|
180 | - * Creates a constant use builder. |
|
181 | - * |
|
182 | - * @param Node\Name|string $name Name of the const to alias |
|
183 | - * |
|
184 | - * @return Builder\Use_ The created use const builder |
|
185 | - */ |
|
186 | - public function useConst($name) : Builder\Use_ { |
|
187 | - return new Builder\Use_($name, Use_::TYPE_CONSTANT); |
|
188 | - } |
|
189 | - |
|
190 | - /** |
|
191 | - * Creates a class constant builder. |
|
192 | - * |
|
193 | - * @param string|Identifier $name Name |
|
194 | - * @param Node\Expr|bool|null|int|float|string|array $value Value |
|
195 | - * |
|
196 | - * @return Builder\ClassConst The created use const builder |
|
197 | - */ |
|
198 | - public function classConst($name, $value) : Builder\ClassConst { |
|
199 | - return new Builder\ClassConst($name, $value); |
|
200 | - } |
|
201 | - |
|
202 | - /** |
|
203 | - * Creates an enum case builder. |
|
204 | - * |
|
205 | - * @param string|Identifier $name Name |
|
206 | - * |
|
207 | - * @return Builder\EnumCase The created use const builder |
|
208 | - */ |
|
209 | - public function enumCase($name) : Builder\EnumCase { |
|
210 | - return new Builder\EnumCase($name); |
|
211 | - } |
|
212 | - |
|
213 | - /** |
|
214 | - * Creates node a for a literal value. |
|
215 | - * |
|
216 | - * @param Expr|bool|null|int|float|string|array $value $value |
|
217 | - * |
|
218 | - * @return Expr |
|
219 | - */ |
|
220 | - public function val($value) : Expr { |
|
221 | - return BuilderHelpers::normalizeValue($value); |
|
222 | - } |
|
223 | - |
|
224 | - /** |
|
225 | - * Creates variable node. |
|
226 | - * |
|
227 | - * @param string|Expr $name Name |
|
228 | - * |
|
229 | - * @return Expr\Variable |
|
230 | - */ |
|
231 | - public function var($name) : Expr\Variable { |
|
232 | - if (!\is_string($name) && !$name instanceof Expr) { |
|
233 | - throw new \LogicException('Variable name must be string or Expr'); |
|
234 | - } |
|
235 | - |
|
236 | - return new Expr\Variable($name); |
|
237 | - } |
|
238 | - |
|
239 | - /** |
|
240 | - * Normalizes an argument list. |
|
241 | - * |
|
242 | - * Creates Arg nodes for all arguments and converts literal values to expressions. |
|
243 | - * |
|
244 | - * @param array $args List of arguments to normalize |
|
245 | - * |
|
246 | - * @return Arg[] |
|
247 | - */ |
|
248 | - public function args(array $args) : array { |
|
249 | - $normalizedArgs = []; |
|
250 | - foreach ($args as $key => $arg) { |
|
251 | - if (!($arg instanceof Arg)) { |
|
252 | - $arg = new Arg(BuilderHelpers::normalizeValue($arg)); |
|
253 | - } |
|
254 | - if (\is_string($key)) { |
|
255 | - $arg->name = BuilderHelpers::normalizeIdentifier($key); |
|
256 | - } |
|
257 | - $normalizedArgs[] = $arg; |
|
258 | - } |
|
259 | - return $normalizedArgs; |
|
260 | - } |
|
261 | - |
|
262 | - /** |
|
263 | - * Creates a function call node. |
|
264 | - * |
|
265 | - * @param string|Name|Expr $name Function name |
|
266 | - * @param array $args Function arguments |
|
267 | - * |
|
268 | - * @return Expr\FuncCall |
|
269 | - */ |
|
270 | - public function funcCall($name, array $args = []) : Expr\FuncCall { |
|
271 | - return new Expr\FuncCall( |
|
272 | - BuilderHelpers::normalizeNameOrExpr($name), |
|
273 | - $this->args($args) |
|
274 | - ); |
|
275 | - } |
|
276 | - |
|
277 | - /** |
|
278 | - * Creates a method call node. |
|
279 | - * |
|
280 | - * @param Expr $var Variable the method is called on |
|
281 | - * @param string|Identifier|Expr $name Method name |
|
282 | - * @param array $args Method arguments |
|
283 | - * |
|
284 | - * @return Expr\MethodCall |
|
285 | - */ |
|
286 | - public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall { |
|
287 | - return new Expr\MethodCall( |
|
288 | - $var, |
|
289 | - BuilderHelpers::normalizeIdentifierOrExpr($name), |
|
290 | - $this->args($args) |
|
291 | - ); |
|
292 | - } |
|
293 | - |
|
294 | - /** |
|
295 | - * Creates a static method call node. |
|
296 | - * |
|
297 | - * @param string|Name|Expr $class Class name |
|
298 | - * @param string|Identifier|Expr $name Method name |
|
299 | - * @param array $args Method arguments |
|
300 | - * |
|
301 | - * @return Expr\StaticCall |
|
302 | - */ |
|
303 | - public function staticCall($class, $name, array $args = []) : Expr\StaticCall { |
|
304 | - return new Expr\StaticCall( |
|
305 | - BuilderHelpers::normalizeNameOrExpr($class), |
|
306 | - BuilderHelpers::normalizeIdentifierOrExpr($name), |
|
307 | - $this->args($args) |
|
308 | - ); |
|
309 | - } |
|
310 | - |
|
311 | - /** |
|
312 | - * Creates an object creation node. |
|
313 | - * |
|
314 | - * @param string|Name|Expr $class Class name |
|
315 | - * @param array $args Constructor arguments |
|
316 | - * |
|
317 | - * @return Expr\New_ |
|
318 | - */ |
|
319 | - public function new($class, array $args = []) : Expr\New_ { |
|
320 | - return new Expr\New_( |
|
321 | - BuilderHelpers::normalizeNameOrExpr($class), |
|
322 | - $this->args($args) |
|
323 | - ); |
|
324 | - } |
|
325 | - |
|
326 | - /** |
|
327 | - * Creates a constant fetch node. |
|
328 | - * |
|
329 | - * @param string|Name $name Constant name |
|
330 | - * |
|
331 | - * @return Expr\ConstFetch |
|
332 | - */ |
|
333 | - public function constFetch($name) : Expr\ConstFetch { |
|
334 | - return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); |
|
335 | - } |
|
336 | - |
|
337 | - /** |
|
338 | - * Creates a property fetch node. |
|
339 | - * |
|
340 | - * @param Expr $var Variable holding object |
|
341 | - * @param string|Identifier|Expr $name Property name |
|
342 | - * |
|
343 | - * @return Expr\PropertyFetch |
|
344 | - */ |
|
345 | - public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch { |
|
346 | - return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); |
|
347 | - } |
|
348 | - |
|
349 | - /** |
|
350 | - * Creates a class constant fetch node. |
|
351 | - * |
|
352 | - * @param string|Name|Expr $class Class name |
|
353 | - * @param string|Identifier|Expr $name Constant name |
|
354 | - * |
|
355 | - * @return Expr\ClassConstFetch |
|
356 | - */ |
|
357 | - public function classConstFetch($class, $name): Expr\ClassConstFetch { |
|
358 | - return new Expr\ClassConstFetch( |
|
359 | - BuilderHelpers::normalizeNameOrExpr($class), |
|
360 | - BuilderHelpers::normalizeIdentifierOrExpr($name) |
|
361 | - ); |
|
362 | - } |
|
363 | - |
|
364 | - /** |
|
365 | - * Creates nested Concat nodes from a list of expressions. |
|
366 | - * |
|
367 | - * @param Expr|string ...$exprs Expressions or literal strings |
|
368 | - * |
|
369 | - * @return Concat |
|
370 | - */ |
|
371 | - public function concat(...$exprs) : Concat { |
|
372 | - $numExprs = count($exprs); |
|
373 | - if ($numExprs < 2) { |
|
374 | - throw new \LogicException('Expected at least two expressions'); |
|
375 | - } |
|
376 | - |
|
377 | - $lastConcat = $this->normalizeStringExpr($exprs[0]); |
|
378 | - for ($i = 1; $i < $numExprs; $i++) { |
|
379 | - $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i])); |
|
380 | - } |
|
381 | - return $lastConcat; |
|
382 | - } |
|
383 | - |
|
384 | - /** |
|
385 | - * @param string|Expr $expr |
|
386 | - * @return Expr |
|
387 | - */ |
|
388 | - private function normalizeStringExpr($expr) : Expr { |
|
389 | - if ($expr instanceof Expr) { |
|
390 | - return $expr; |
|
391 | - } |
|
392 | - |
|
393 | - if (\is_string($expr)) { |
|
394 | - return new String_($expr); |
|
395 | - } |
|
396 | - |
|
397 | - throw new \LogicException('Expected string or Expr'); |
|
398 | - } |
|
15 | + /** |
|
16 | + * Creates an attribute node. |
|
17 | + * |
|
18 | + * @param string|Name $name Name of the attribute |
|
19 | + * @param array $args Attribute named arguments |
|
20 | + * |
|
21 | + * @return Node\Attribute |
|
22 | + */ |
|
23 | + public function attribute($name, array $args = []) : Node\Attribute { |
|
24 | + return new Node\Attribute( |
|
25 | + BuilderHelpers::normalizeName($name), |
|
26 | + $this->args($args) |
|
27 | + ); |
|
28 | + } |
|
29 | + |
|
30 | + /** |
|
31 | + * Creates a namespace builder. |
|
32 | + * |
|
33 | + * @param null|string|Node\Name $name Name of the namespace |
|
34 | + * |
|
35 | + * @return Builder\Namespace_ The created namespace builder |
|
36 | + */ |
|
37 | + public function namespace($name) : Builder\Namespace_ { |
|
38 | + return new Builder\Namespace_($name); |
|
39 | + } |
|
40 | + |
|
41 | + /** |
|
42 | + * Creates a class builder. |
|
43 | + * |
|
44 | + * @param string $name Name of the class |
|
45 | + * |
|
46 | + * @return Builder\Class_ The created class builder |
|
47 | + */ |
|
48 | + public function class(string $name) : Builder\Class_ { |
|
49 | + return new Builder\Class_($name); |
|
50 | + } |
|
51 | + |
|
52 | + /** |
|
53 | + * Creates an interface builder. |
|
54 | + * |
|
55 | + * @param string $name Name of the interface |
|
56 | + * |
|
57 | + * @return Builder\Interface_ The created interface builder |
|
58 | + */ |
|
59 | + public function interface(string $name) : Builder\Interface_ { |
|
60 | + return new Builder\Interface_($name); |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * Creates a trait builder. |
|
65 | + * |
|
66 | + * @param string $name Name of the trait |
|
67 | + * |
|
68 | + * @return Builder\Trait_ The created trait builder |
|
69 | + */ |
|
70 | + public function trait(string $name) : Builder\Trait_ { |
|
71 | + return new Builder\Trait_($name); |
|
72 | + } |
|
73 | + |
|
74 | + /** |
|
75 | + * Creates an enum builder. |
|
76 | + * |
|
77 | + * @param string $name Name of the enum |
|
78 | + * |
|
79 | + * @return Builder\Enum_ The created enum builder |
|
80 | + */ |
|
81 | + public function enum(string $name) : Builder\Enum_ { |
|
82 | + return new Builder\Enum_($name); |
|
83 | + } |
|
84 | + |
|
85 | + /** |
|
86 | + * Creates a trait use builder. |
|
87 | + * |
|
88 | + * @param Node\Name|string ...$traits Trait names |
|
89 | + * |
|
90 | + * @return Builder\TraitUse The create trait use builder |
|
91 | + */ |
|
92 | + public function useTrait(...$traits) : Builder\TraitUse { |
|
93 | + return new Builder\TraitUse(...$traits); |
|
94 | + } |
|
95 | + |
|
96 | + /** |
|
97 | + * Creates a trait use adaptation builder. |
|
98 | + * |
|
99 | + * @param Node\Name|string|null $trait Trait name |
|
100 | + * @param Node\Identifier|string $method Method name |
|
101 | + * |
|
102 | + * @return Builder\TraitUseAdaptation The create trait use adaptation builder |
|
103 | + */ |
|
104 | + public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation { |
|
105 | + if ($method === null) { |
|
106 | + $method = $trait; |
|
107 | + $trait = null; |
|
108 | + } |
|
109 | + |
|
110 | + return new Builder\TraitUseAdaptation($trait, $method); |
|
111 | + } |
|
112 | + |
|
113 | + /** |
|
114 | + * Creates a method builder. |
|
115 | + * |
|
116 | + * @param string $name Name of the method |
|
117 | + * |
|
118 | + * @return Builder\Method The created method builder |
|
119 | + */ |
|
120 | + public function method(string $name) : Builder\Method { |
|
121 | + return new Builder\Method($name); |
|
122 | + } |
|
123 | + |
|
124 | + /** |
|
125 | + * Creates a parameter builder. |
|
126 | + * |
|
127 | + * @param string $name Name of the parameter |
|
128 | + * |
|
129 | + * @return Builder\Param The created parameter builder |
|
130 | + */ |
|
131 | + public function param(string $name) : Builder\Param { |
|
132 | + return new Builder\Param($name); |
|
133 | + } |
|
134 | + |
|
135 | + /** |
|
136 | + * Creates a property builder. |
|
137 | + * |
|
138 | + * @param string $name Name of the property |
|
139 | + * |
|
140 | + * @return Builder\Property The created property builder |
|
141 | + */ |
|
142 | + public function property(string $name) : Builder\Property { |
|
143 | + return new Builder\Property($name); |
|
144 | + } |
|
145 | + |
|
146 | + /** |
|
147 | + * Creates a function builder. |
|
148 | + * |
|
149 | + * @param string $name Name of the function |
|
150 | + * |
|
151 | + * @return Builder\Function_ The created function builder |
|
152 | + */ |
|
153 | + public function function(string $name) : Builder\Function_ { |
|
154 | + return new Builder\Function_($name); |
|
155 | + } |
|
156 | + |
|
157 | + /** |
|
158 | + * Creates a namespace/class use builder. |
|
159 | + * |
|
160 | + * @param Node\Name|string $name Name of the entity (namespace or class) to alias |
|
161 | + * |
|
162 | + * @return Builder\Use_ The created use builder |
|
163 | + */ |
|
164 | + public function use($name) : Builder\Use_ { |
|
165 | + return new Builder\Use_($name, Use_::TYPE_NORMAL); |
|
166 | + } |
|
167 | + |
|
168 | + /** |
|
169 | + * Creates a function use builder. |
|
170 | + * |
|
171 | + * @param Node\Name|string $name Name of the function to alias |
|
172 | + * |
|
173 | + * @return Builder\Use_ The created use function builder |
|
174 | + */ |
|
175 | + public function useFunction($name) : Builder\Use_ { |
|
176 | + return new Builder\Use_($name, Use_::TYPE_FUNCTION); |
|
177 | + } |
|
178 | + |
|
179 | + /** |
|
180 | + * Creates a constant use builder. |
|
181 | + * |
|
182 | + * @param Node\Name|string $name Name of the const to alias |
|
183 | + * |
|
184 | + * @return Builder\Use_ The created use const builder |
|
185 | + */ |
|
186 | + public function useConst($name) : Builder\Use_ { |
|
187 | + return new Builder\Use_($name, Use_::TYPE_CONSTANT); |
|
188 | + } |
|
189 | + |
|
190 | + /** |
|
191 | + * Creates a class constant builder. |
|
192 | + * |
|
193 | + * @param string|Identifier $name Name |
|
194 | + * @param Node\Expr|bool|null|int|float|string|array $value Value |
|
195 | + * |
|
196 | + * @return Builder\ClassConst The created use const builder |
|
197 | + */ |
|
198 | + public function classConst($name, $value) : Builder\ClassConst { |
|
199 | + return new Builder\ClassConst($name, $value); |
|
200 | + } |
|
201 | + |
|
202 | + /** |
|
203 | + * Creates an enum case builder. |
|
204 | + * |
|
205 | + * @param string|Identifier $name Name |
|
206 | + * |
|
207 | + * @return Builder\EnumCase The created use const builder |
|
208 | + */ |
|
209 | + public function enumCase($name) : Builder\EnumCase { |
|
210 | + return new Builder\EnumCase($name); |
|
211 | + } |
|
212 | + |
|
213 | + /** |
|
214 | + * Creates node a for a literal value. |
|
215 | + * |
|
216 | + * @param Expr|bool|null|int|float|string|array $value $value |
|
217 | + * |
|
218 | + * @return Expr |
|
219 | + */ |
|
220 | + public function val($value) : Expr { |
|
221 | + return BuilderHelpers::normalizeValue($value); |
|
222 | + } |
|
223 | + |
|
224 | + /** |
|
225 | + * Creates variable node. |
|
226 | + * |
|
227 | + * @param string|Expr $name Name |
|
228 | + * |
|
229 | + * @return Expr\Variable |
|
230 | + */ |
|
231 | + public function var($name) : Expr\Variable { |
|
232 | + if (!\is_string($name) && !$name instanceof Expr) { |
|
233 | + throw new \LogicException('Variable name must be string or Expr'); |
|
234 | + } |
|
235 | + |
|
236 | + return new Expr\Variable($name); |
|
237 | + } |
|
238 | + |
|
239 | + /** |
|
240 | + * Normalizes an argument list. |
|
241 | + * |
|
242 | + * Creates Arg nodes for all arguments and converts literal values to expressions. |
|
243 | + * |
|
244 | + * @param array $args List of arguments to normalize |
|
245 | + * |
|
246 | + * @return Arg[] |
|
247 | + */ |
|
248 | + public function args(array $args) : array { |
|
249 | + $normalizedArgs = []; |
|
250 | + foreach ($args as $key => $arg) { |
|
251 | + if (!($arg instanceof Arg)) { |
|
252 | + $arg = new Arg(BuilderHelpers::normalizeValue($arg)); |
|
253 | + } |
|
254 | + if (\is_string($key)) { |
|
255 | + $arg->name = BuilderHelpers::normalizeIdentifier($key); |
|
256 | + } |
|
257 | + $normalizedArgs[] = $arg; |
|
258 | + } |
|
259 | + return $normalizedArgs; |
|
260 | + } |
|
261 | + |
|
262 | + /** |
|
263 | + * Creates a function call node. |
|
264 | + * |
|
265 | + * @param string|Name|Expr $name Function name |
|
266 | + * @param array $args Function arguments |
|
267 | + * |
|
268 | + * @return Expr\FuncCall |
|
269 | + */ |
|
270 | + public function funcCall($name, array $args = []) : Expr\FuncCall { |
|
271 | + return new Expr\FuncCall( |
|
272 | + BuilderHelpers::normalizeNameOrExpr($name), |
|
273 | + $this->args($args) |
|
274 | + ); |
|
275 | + } |
|
276 | + |
|
277 | + /** |
|
278 | + * Creates a method call node. |
|
279 | + * |
|
280 | + * @param Expr $var Variable the method is called on |
|
281 | + * @param string|Identifier|Expr $name Method name |
|
282 | + * @param array $args Method arguments |
|
283 | + * |
|
284 | + * @return Expr\MethodCall |
|
285 | + */ |
|
286 | + public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall { |
|
287 | + return new Expr\MethodCall( |
|
288 | + $var, |
|
289 | + BuilderHelpers::normalizeIdentifierOrExpr($name), |
|
290 | + $this->args($args) |
|
291 | + ); |
|
292 | + } |
|
293 | + |
|
294 | + /** |
|
295 | + * Creates a static method call node. |
|
296 | + * |
|
297 | + * @param string|Name|Expr $class Class name |
|
298 | + * @param string|Identifier|Expr $name Method name |
|
299 | + * @param array $args Method arguments |
|
300 | + * |
|
301 | + * @return Expr\StaticCall |
|
302 | + */ |
|
303 | + public function staticCall($class, $name, array $args = []) : Expr\StaticCall { |
|
304 | + return new Expr\StaticCall( |
|
305 | + BuilderHelpers::normalizeNameOrExpr($class), |
|
306 | + BuilderHelpers::normalizeIdentifierOrExpr($name), |
|
307 | + $this->args($args) |
|
308 | + ); |
|
309 | + } |
|
310 | + |
|
311 | + /** |
|
312 | + * Creates an object creation node. |
|
313 | + * |
|
314 | + * @param string|Name|Expr $class Class name |
|
315 | + * @param array $args Constructor arguments |
|
316 | + * |
|
317 | + * @return Expr\New_ |
|
318 | + */ |
|
319 | + public function new($class, array $args = []) : Expr\New_ { |
|
320 | + return new Expr\New_( |
|
321 | + BuilderHelpers::normalizeNameOrExpr($class), |
|
322 | + $this->args($args) |
|
323 | + ); |
|
324 | + } |
|
325 | + |
|
326 | + /** |
|
327 | + * Creates a constant fetch node. |
|
328 | + * |
|
329 | + * @param string|Name $name Constant name |
|
330 | + * |
|
331 | + * @return Expr\ConstFetch |
|
332 | + */ |
|
333 | + public function constFetch($name) : Expr\ConstFetch { |
|
334 | + return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); |
|
335 | + } |
|
336 | + |
|
337 | + /** |
|
338 | + * Creates a property fetch node. |
|
339 | + * |
|
340 | + * @param Expr $var Variable holding object |
|
341 | + * @param string|Identifier|Expr $name Property name |
|
342 | + * |
|
343 | + * @return Expr\PropertyFetch |
|
344 | + */ |
|
345 | + public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch { |
|
346 | + return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); |
|
347 | + } |
|
348 | + |
|
349 | + /** |
|
350 | + * Creates a class constant fetch node. |
|
351 | + * |
|
352 | + * @param string|Name|Expr $class Class name |
|
353 | + * @param string|Identifier|Expr $name Constant name |
|
354 | + * |
|
355 | + * @return Expr\ClassConstFetch |
|
356 | + */ |
|
357 | + public function classConstFetch($class, $name): Expr\ClassConstFetch { |
|
358 | + return new Expr\ClassConstFetch( |
|
359 | + BuilderHelpers::normalizeNameOrExpr($class), |
|
360 | + BuilderHelpers::normalizeIdentifierOrExpr($name) |
|
361 | + ); |
|
362 | + } |
|
363 | + |
|
364 | + /** |
|
365 | + * Creates nested Concat nodes from a list of expressions. |
|
366 | + * |
|
367 | + * @param Expr|string ...$exprs Expressions or literal strings |
|
368 | + * |
|
369 | + * @return Concat |
|
370 | + */ |
|
371 | + public function concat(...$exprs) : Concat { |
|
372 | + $numExprs = count($exprs); |
|
373 | + if ($numExprs < 2) { |
|
374 | + throw new \LogicException('Expected at least two expressions'); |
|
375 | + } |
|
376 | + |
|
377 | + $lastConcat = $this->normalizeStringExpr($exprs[0]); |
|
378 | + for ($i = 1; $i < $numExprs; $i++) { |
|
379 | + $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i])); |
|
380 | + } |
|
381 | + return $lastConcat; |
|
382 | + } |
|
383 | + |
|
384 | + /** |
|
385 | + * @param string|Expr $expr |
|
386 | + * @return Expr |
|
387 | + */ |
|
388 | + private function normalizeStringExpr($expr) : Expr { |
|
389 | + if ($expr instanceof Expr) { |
|
390 | + return $expr; |
|
391 | + } |
|
392 | + |
|
393 | + if (\is_string($expr)) { |
|
394 | + return new String_($expr); |
|
395 | + } |
|
396 | + |
|
397 | + throw new \LogicException('Expected string or Expr'); |
|
398 | + } |
|
399 | 399 | } |
@@ -10,8 +10,7 @@ |
||
10 | 10 | use PhpParser\Node\Scalar\String_; |
11 | 11 | use PhpParser\Node\Stmt\Use_; |
12 | 12 | |
13 | -class BuilderFactory |
|
14 | -{ |
|
13 | +class BuilderFactory { |
|
15 | 14 | /** |
16 | 15 | * Creates an attribute node. |
17 | 16 | * |
@@ -12,153 +12,153 @@ |
||
12 | 12 | */ |
13 | 13 | class Differ |
14 | 14 | { |
15 | - private $isEqual; |
|
16 | - |
|
17 | - /** |
|
18 | - * Create differ over the given equality relation. |
|
19 | - * |
|
20 | - * @param callable $isEqual Equality relation with signature function($a, $b) : bool |
|
21 | - */ |
|
22 | - public function __construct(callable $isEqual) { |
|
23 | - $this->isEqual = $isEqual; |
|
24 | - } |
|
25 | - |
|
26 | - /** |
|
27 | - * Calculate diff (edit script) from $old to $new. |
|
28 | - * |
|
29 | - * @param array $old Original array |
|
30 | - * @param array $new New array |
|
31 | - * |
|
32 | - * @return DiffElem[] Diff (edit script) |
|
33 | - */ |
|
34 | - public function diff(array $old, array $new) { |
|
35 | - list($trace, $x, $y) = $this->calculateTrace($old, $new); |
|
36 | - return $this->extractDiff($trace, $x, $y, $old, $new); |
|
37 | - } |
|
38 | - |
|
39 | - /** |
|
40 | - * Calculate diff, including "replace" operations. |
|
41 | - * |
|
42 | - * If a sequence of remove operations is followed by the same number of add operations, these |
|
43 | - * will be coalesced into replace operations. |
|
44 | - * |
|
45 | - * @param array $old Original array |
|
46 | - * @param array $new New array |
|
47 | - * |
|
48 | - * @return DiffElem[] Diff (edit script), including replace operations |
|
49 | - */ |
|
50 | - public function diffWithReplacements(array $old, array $new) { |
|
51 | - return $this->coalesceReplacements($this->diff($old, $new)); |
|
52 | - } |
|
53 | - |
|
54 | - private function calculateTrace(array $a, array $b) { |
|
55 | - $n = \count($a); |
|
56 | - $m = \count($b); |
|
57 | - $max = $n + $m; |
|
58 | - $v = [1 => 0]; |
|
59 | - $trace = []; |
|
60 | - for ($d = 0; $d <= $max; $d++) { |
|
61 | - $trace[] = $v; |
|
62 | - for ($k = -$d; $k <= $d; $k += 2) { |
|
63 | - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { |
|
64 | - $x = $v[$k+1]; |
|
65 | - } else { |
|
66 | - $x = $v[$k-1] + 1; |
|
67 | - } |
|
68 | - |
|
69 | - $y = $x - $k; |
|
70 | - while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) { |
|
71 | - $x++; |
|
72 | - $y++; |
|
73 | - } |
|
74 | - |
|
75 | - $v[$k] = $x; |
|
76 | - if ($x >= $n && $y >= $m) { |
|
77 | - return [$trace, $x, $y]; |
|
78 | - } |
|
79 | - } |
|
80 | - } |
|
81 | - throw new \Exception('Should not happen'); |
|
82 | - } |
|
83 | - |
|
84 | - private function extractDiff(array $trace, int $x, int $y, array $a, array $b) { |
|
85 | - $result = []; |
|
86 | - for ($d = \count($trace) - 1; $d >= 0; $d--) { |
|
87 | - $v = $trace[$d]; |
|
88 | - $k = $x - $y; |
|
89 | - |
|
90 | - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { |
|
91 | - $prevK = $k + 1; |
|
92 | - } else { |
|
93 | - $prevK = $k - 1; |
|
94 | - } |
|
95 | - |
|
96 | - $prevX = $v[$prevK]; |
|
97 | - $prevY = $prevX - $prevK; |
|
98 | - |
|
99 | - while ($x > $prevX && $y > $prevY) { |
|
100 | - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]); |
|
101 | - $x--; |
|
102 | - $y--; |
|
103 | - } |
|
104 | - |
|
105 | - if ($d === 0) { |
|
106 | - break; |
|
107 | - } |
|
108 | - |
|
109 | - while ($x > $prevX) { |
|
110 | - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null); |
|
111 | - $x--; |
|
112 | - } |
|
113 | - |
|
114 | - while ($y > $prevY) { |
|
115 | - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]); |
|
116 | - $y--; |
|
117 | - } |
|
118 | - } |
|
119 | - return array_reverse($result); |
|
120 | - } |
|
121 | - |
|
122 | - /** |
|
123 | - * Coalesce equal-length sequences of remove+add into a replace operation. |
|
124 | - * |
|
125 | - * @param DiffElem[] $diff |
|
126 | - * @return DiffElem[] |
|
127 | - */ |
|
128 | - private function coalesceReplacements(array $diff) { |
|
129 | - $newDiff = []; |
|
130 | - $c = \count($diff); |
|
131 | - for ($i = 0; $i < $c; $i++) { |
|
132 | - $diffType = $diff[$i]->type; |
|
133 | - if ($diffType !== DiffElem::TYPE_REMOVE) { |
|
134 | - $newDiff[] = $diff[$i]; |
|
135 | - continue; |
|
136 | - } |
|
137 | - |
|
138 | - $j = $i; |
|
139 | - while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) { |
|
140 | - $j++; |
|
141 | - } |
|
142 | - |
|
143 | - $k = $j; |
|
144 | - while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) { |
|
145 | - $k++; |
|
146 | - } |
|
147 | - |
|
148 | - if ($j - $i === $k - $j) { |
|
149 | - $len = $j - $i; |
|
150 | - for ($n = 0; $n < $len; $n++) { |
|
151 | - $newDiff[] = new DiffElem( |
|
152 | - DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new |
|
153 | - ); |
|
154 | - } |
|
155 | - } else { |
|
156 | - for (; $i < $k; $i++) { |
|
157 | - $newDiff[] = $diff[$i]; |
|
158 | - } |
|
159 | - } |
|
160 | - $i = $k - 1; |
|
161 | - } |
|
162 | - return $newDiff; |
|
163 | - } |
|
15 | + private $isEqual; |
|
16 | + |
|
17 | + /** |
|
18 | + * Create differ over the given equality relation. |
|
19 | + * |
|
20 | + * @param callable $isEqual Equality relation with signature function($a, $b) : bool |
|
21 | + */ |
|
22 | + public function __construct(callable $isEqual) { |
|
23 | + $this->isEqual = $isEqual; |
|
24 | + } |
|
25 | + |
|
26 | + /** |
|
27 | + * Calculate diff (edit script) from $old to $new. |
|
28 | + * |
|
29 | + * @param array $old Original array |
|
30 | + * @param array $new New array |
|
31 | + * |
|
32 | + * @return DiffElem[] Diff (edit script) |
|
33 | + */ |
|
34 | + public function diff(array $old, array $new) { |
|
35 | + list($trace, $x, $y) = $this->calculateTrace($old, $new); |
|
36 | + return $this->extractDiff($trace, $x, $y, $old, $new); |
|
37 | + } |
|
38 | + |
|
39 | + /** |
|
40 | + * Calculate diff, including "replace" operations. |
|
41 | + * |
|
42 | + * If a sequence of remove operations is followed by the same number of add operations, these |
|
43 | + * will be coalesced into replace operations. |
|
44 | + * |
|
45 | + * @param array $old Original array |
|
46 | + * @param array $new New array |
|
47 | + * |
|
48 | + * @return DiffElem[] Diff (edit script), including replace operations |
|
49 | + */ |
|
50 | + public function diffWithReplacements(array $old, array $new) { |
|
51 | + return $this->coalesceReplacements($this->diff($old, $new)); |
|
52 | + } |
|
53 | + |
|
54 | + private function calculateTrace(array $a, array $b) { |
|
55 | + $n = \count($a); |
|
56 | + $m = \count($b); |
|
57 | + $max = $n + $m; |
|
58 | + $v = [1 => 0]; |
|
59 | + $trace = []; |
|
60 | + for ($d = 0; $d <= $max; $d++) { |
|
61 | + $trace[] = $v; |
|
62 | + for ($k = -$d; $k <= $d; $k += 2) { |
|
63 | + if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { |
|
64 | + $x = $v[$k+1]; |
|
65 | + } else { |
|
66 | + $x = $v[$k-1] + 1; |
|
67 | + } |
|
68 | + |
|
69 | + $y = $x - $k; |
|
70 | + while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) { |
|
71 | + $x++; |
|
72 | + $y++; |
|
73 | + } |
|
74 | + |
|
75 | + $v[$k] = $x; |
|
76 | + if ($x >= $n && $y >= $m) { |
|
77 | + return [$trace, $x, $y]; |
|
78 | + } |
|
79 | + } |
|
80 | + } |
|
81 | + throw new \Exception('Should not happen'); |
|
82 | + } |
|
83 | + |
|
84 | + private function extractDiff(array $trace, int $x, int $y, array $a, array $b) { |
|
85 | + $result = []; |
|
86 | + for ($d = \count($trace) - 1; $d >= 0; $d--) { |
|
87 | + $v = $trace[$d]; |
|
88 | + $k = $x - $y; |
|
89 | + |
|
90 | + if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { |
|
91 | + $prevK = $k + 1; |
|
92 | + } else { |
|
93 | + $prevK = $k - 1; |
|
94 | + } |
|
95 | + |
|
96 | + $prevX = $v[$prevK]; |
|
97 | + $prevY = $prevX - $prevK; |
|
98 | + |
|
99 | + while ($x > $prevX && $y > $prevY) { |
|
100 | + $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]); |
|
101 | + $x--; |
|
102 | + $y--; |
|
103 | + } |
|
104 | + |
|
105 | + if ($d === 0) { |
|
106 | + break; |
|
107 | + } |
|
108 | + |
|
109 | + while ($x > $prevX) { |
|
110 | + $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null); |
|
111 | + $x--; |
|
112 | + } |
|
113 | + |
|
114 | + while ($y > $prevY) { |
|
115 | + $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]); |
|
116 | + $y--; |
|
117 | + } |
|
118 | + } |
|
119 | + return array_reverse($result); |
|
120 | + } |
|
121 | + |
|
122 | + /** |
|
123 | + * Coalesce equal-length sequences of remove+add into a replace operation. |
|
124 | + * |
|
125 | + * @param DiffElem[] $diff |
|
126 | + * @return DiffElem[] |
|
127 | + */ |
|
128 | + private function coalesceReplacements(array $diff) { |
|
129 | + $newDiff = []; |
|
130 | + $c = \count($diff); |
|
131 | + for ($i = 0; $i < $c; $i++) { |
|
132 | + $diffType = $diff[$i]->type; |
|
133 | + if ($diffType !== DiffElem::TYPE_REMOVE) { |
|
134 | + $newDiff[] = $diff[$i]; |
|
135 | + continue; |
|
136 | + } |
|
137 | + |
|
138 | + $j = $i; |
|
139 | + while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) { |
|
140 | + $j++; |
|
141 | + } |
|
142 | + |
|
143 | + $k = $j; |
|
144 | + while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) { |
|
145 | + $k++; |
|
146 | + } |
|
147 | + |
|
148 | + if ($j - $i === $k - $j) { |
|
149 | + $len = $j - $i; |
|
150 | + for ($n = 0; $n < $len; $n++) { |
|
151 | + $newDiff[] = new DiffElem( |
|
152 | + DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new |
|
153 | + ); |
|
154 | + } |
|
155 | + } else { |
|
156 | + for (; $i < $k; $i++) { |
|
157 | + $newDiff[] = $diff[$i]; |
|
158 | + } |
|
159 | + } |
|
160 | + $i = $k - 1; |
|
161 | + } |
|
162 | + return $newDiff; |
|
163 | + } |
|
164 | 164 | } |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | for ($d = 0; $d <= $max; $d++) { |
61 | 61 | $trace[] = $v; |
62 | 62 | for ($k = -$d; $k <= $d; $k += 2) { |
63 | - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { |
|
64 | - $x = $v[$k+1]; |
|
63 | + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { |
|
64 | + $x = $v[$k + 1]; |
|
65 | 65 | } else { |
66 | - $x = $v[$k-1] + 1; |
|
66 | + $x = $v[$k - 1] + 1; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | $y = $x - $k; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $v = $trace[$d]; |
88 | 88 | $k = $x - $y; |
89 | 89 | |
90 | - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { |
|
90 | + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { |
|
91 | 91 | $prevK = $k + 1; |
92 | 92 | } else { |
93 | 93 | $prevK = $k - 1; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $prevY = $prevX - $prevK; |
98 | 98 | |
99 | 99 | while ($x > $prevX && $y > $prevY) { |
100 | - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]); |
|
100 | + $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x - 1], $b[$y - 1]); |
|
101 | 101 | $x--; |
102 | 102 | $y--; |
103 | 103 | } |
@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | while ($x > $prevX) { |
110 | - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null); |
|
110 | + $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x - 1], null); |
|
111 | 111 | $x--; |
112 | 112 | } |
113 | 113 | |
114 | 114 | while ($y > $prevY) { |
115 | - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]); |
|
115 | + $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y - 1]); |
|
116 | 116 | $y--; |
117 | 117 | } |
118 | 118 | } |
@@ -10,8 +10,7 @@ |
||
10 | 10 | * |
11 | 11 | * @internal |
12 | 12 | */ |
13 | -class Differ |
|
14 | -{ |
|
13 | +class Differ { |
|
15 | 14 | private $isEqual; |
16 | 15 | |
17 | 16 | /** |
@@ -17,48 +17,48 @@ |
||
17 | 17 | */ |
18 | 18 | class PrintableNewAnonClassNode extends Expr |
19 | 19 | { |
20 | - /** @var Node\AttributeGroup[] PHP attribute groups */ |
|
21 | - public $attrGroups; |
|
22 | - /** @var int Modifiers */ |
|
23 | - public $flags; |
|
24 | - /** @var Node\Arg[] Arguments */ |
|
25 | - public $args; |
|
26 | - /** @var null|Node\Name Name of extended class */ |
|
27 | - public $extends; |
|
28 | - /** @var Node\Name[] Names of implemented interfaces */ |
|
29 | - public $implements; |
|
30 | - /** @var Node\Stmt[] Statements */ |
|
31 | - public $stmts; |
|
20 | + /** @var Node\AttributeGroup[] PHP attribute groups */ |
|
21 | + public $attrGroups; |
|
22 | + /** @var int Modifiers */ |
|
23 | + public $flags; |
|
24 | + /** @var Node\Arg[] Arguments */ |
|
25 | + public $args; |
|
26 | + /** @var null|Node\Name Name of extended class */ |
|
27 | + public $extends; |
|
28 | + /** @var Node\Name[] Names of implemented interfaces */ |
|
29 | + public $implements; |
|
30 | + /** @var Node\Stmt[] Statements */ |
|
31 | + public $stmts; |
|
32 | 32 | |
33 | - public function __construct( |
|
34 | - array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, |
|
35 | - array $stmts, array $attributes |
|
36 | - ) { |
|
37 | - parent::__construct($attributes); |
|
38 | - $this->attrGroups = $attrGroups; |
|
39 | - $this->flags = $flags; |
|
40 | - $this->args = $args; |
|
41 | - $this->extends = $extends; |
|
42 | - $this->implements = $implements; |
|
43 | - $this->stmts = $stmts; |
|
44 | - } |
|
33 | + public function __construct( |
|
34 | + array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, |
|
35 | + array $stmts, array $attributes |
|
36 | + ) { |
|
37 | + parent::__construct($attributes); |
|
38 | + $this->attrGroups = $attrGroups; |
|
39 | + $this->flags = $flags; |
|
40 | + $this->args = $args; |
|
41 | + $this->extends = $extends; |
|
42 | + $this->implements = $implements; |
|
43 | + $this->stmts = $stmts; |
|
44 | + } |
|
45 | 45 | |
46 | - public static function fromNewNode(Expr\New_ $newNode) { |
|
47 | - $class = $newNode->class; |
|
48 | - assert($class instanceof Node\Stmt\Class_); |
|
49 | - // We don't assert that $class->name is null here, to allow consumers to assign unique names |
|
50 | - // to anonymous classes for their own purposes. We simplify ignore the name here. |
|
51 | - return new self( |
|
52 | - $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, |
|
53 | - $class->stmts, $newNode->getAttributes() |
|
54 | - ); |
|
55 | - } |
|
46 | + public static function fromNewNode(Expr\New_ $newNode) { |
|
47 | + $class = $newNode->class; |
|
48 | + assert($class instanceof Node\Stmt\Class_); |
|
49 | + // We don't assert that $class->name is null here, to allow consumers to assign unique names |
|
50 | + // to anonymous classes for their own purposes. We simplify ignore the name here. |
|
51 | + return new self( |
|
52 | + $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, |
|
53 | + $class->stmts, $newNode->getAttributes() |
|
54 | + ); |
|
55 | + } |
|
56 | 56 | |
57 | - public function getType() : string { |
|
58 | - return 'Expr_PrintableNewAnonClass'; |
|
59 | - } |
|
57 | + public function getType() : string { |
|
58 | + return 'Expr_PrintableNewAnonClass'; |
|
59 | + } |
|
60 | 60 | |
61 | - public function getSubNodeNames() : array { |
|
62 | - return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; |
|
63 | - } |
|
61 | + public function getSubNodeNames() : array { |
|
62 | + return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; |
|
63 | + } |
|
64 | 64 | } |
@@ -15,8 +15,7 @@ |
||
15 | 15 | * |
16 | 16 | * @internal |
17 | 17 | */ |
18 | -class PrintableNewAnonClassNode extends Expr |
|
19 | -{ |
|
18 | +class PrintableNewAnonClassNode extends Expr { |
|
20 | 19 | /** @var Node\AttributeGroup[] PHP attribute groups */ |
21 | 20 | public $attrGroups; |
22 | 21 | /** @var int Modifiers */ |