Code style fix

fixed code style:

phpDoc fix

Expected "foreach (...) {\n"; found "foreach(...) {\n"
Usage of ELSE IF is discouraged; use ELSEIF instead
The closing brace for the class must go on the next line after the body
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Expected "if (...) {\n"; found "if (...){\n"
Expected 1 space after "=>"; 0 found
Expected 1 space before "as"; 2 found
Whitespace found at end of line
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"


Expected "foreach (...) {\n"; found "foreach(...) {\n"
Whitespace found at end of line
The closing brace for the class must go on the next line after the body

Inline control structures are not allowed 
PHP5.4 array syntax fix