I'm working on a new project with existing sources. And the guy who's writte code used a weird format code. See bellow :
public function analyzeCalcul
( $calcul
, $selection
) {
$pattern = "/[0-9".$this -> revertSymbol."?]+/" ;
preg_match_all ($pattern, $calcul, $out) ;
// on regarde les numeros de questions
if (!count ($out)) {
$OneErrorToAff = ErrorModel::newError () ;
$OneErrorToAff -> AffOneError
( __LINE__
, __FILE__
, __CLASS__
, "pattern pour le calcul de facette non trouvé ???"
) ;
throw new Exception ($OneErrorToAff -> getStrError ()) ;
}
}
For my opinion, is not human readable, to many line breaker it's insane :O I want format it in PSR 2, I can do it one file by file but the project is kind of big so I'm looking for an automation of it.
I tried many online tools but only file by file. I used PhpStorm, and I don't see any tricks for thoose line breaker.
Any suggestion about it ?