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
42 linhas
639 B
PHP
42 linhas
639 B
PHP
<?php
|
|
|
|
class FOo {
|
|
public function exclAIM() {
|
|
echo "FOo::exclAIM\n";
|
|
}
|
|
public function teST() {
|
|
echo "FOo::teST\n";
|
|
}
|
|
public function __CaLL($name, $args) {
|
|
echo "FOo::" . $name . "\n";
|
|
}
|
|
}
|
|
class TesT {
|
|
public static function ExclAim() {
|
|
$obj = new fOO();
|
|
$obj->{
|
|
__fUNCTION__}
|
|
= 1;
|
|
$obj->{
|
|
__cLASS__}
|
|
= 2;
|
|
$obj->__FuNCTION__ = 3;
|
|
$obj->__ClASS__ = 4;
|
|
$obj->{
|
|
__FUnCTION__}
|
|
();
|
|
$obj->{
|
|
__CLaSS__}
|
|
();
|
|
$obj->__FUNcTION__();
|
|
$obj->__CLAsS__();
|
|
$arr = array();
|
|
foreach ($obj as $k => $v) {
|
|
$arr[$k] = $v;
|
|
}
|
|
ksort($arr);
|
|
var_dump($arr);
|
|
}
|
|
}
|
|
tEst::eXclaiM();
|