c2ec1c97c9
A poor man's formatter since I didn't like any of the other ones I found. The original C++ source sometimes put newlines and sometimes not.
Codemods:
codemod '([;{}])([^\n])' '\1\n\2'
codemod -m '\s*<\?php\s+' '<?php\n\n'
codemod '\t' ' '
I hand-fixed all the failing tests
35 linhas
450 B
PHP
35 linhas
450 B
PHP
<?php
|
|
|
|
if (!isset($h)) {
|
|
if (isset($g)) {
|
|
interface A {
|
|
function foo();
|
|
}
|
|
}
|
|
else {
|
|
interface A {
|
|
function foo();
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (isset($g)) {
|
|
interface X {
|
|
function foo();
|
|
}
|
|
}
|
|
else {
|
|
interface X {
|
|
function foo();
|
|
}
|
|
}
|
|
}
|
|
abstract class B implements A {
|
|
function bar() {
|
|
}
|
|
}
|
|
var_dump(get_class_methods('A'));
|
|
var_dump(get_class_methods('B'));
|
|
var_dump(get_class_methods('X'));
|
|
var_dump(get_class_methods('Y'));
|