subins2000 / phpF

Format PHP code
BSD 3-Clause "New" or "Revised" License
35 stars 10 forks source link

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? #9

Open xiebruce opened 5 years ago

xiebruce commented 5 years ago

I'm using CodeFormatter in sublime text 3, when I try press control+option+F to format the php code, it shows up the following error:

CodeFormatter

Format error:
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 6692
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 6692
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7613
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7613
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7730
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7730
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7770
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7770
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7778
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7778
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7790
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7790
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7795
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7795
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 8530
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 8530
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 9923
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 9923
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 9926
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 9926
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 11153
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 11153
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12425
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12425
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12445
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12445
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12469
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12469
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12987
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12987
PHP Deprecated:  The each() function is deprecated. This message will be suppressed on further calls in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 5386
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in phar:///Users/bruce/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 5386

OS: macOS Mojave 10.14.1 (18B75) PHP:

PHP 7.3.0 (cli) (built: Jan  3 2019 10:08:00) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.0, Copyright (c) 1999-2018, by Zend Technologies

Sublime: v3.1.1 build 3176

akshaykhale1992 commented 5 years ago

Yes, The formatter works for other languages but failing for PHP.

gla23 commented 5 years ago

Any fixes for this?