PHPDoc, CS, mistake fixes and other minor improvements

@sandeepone Also need merge to Gleez repo
Here and below — to avoid `Database::getResult()`
@sandeepone It seems, it will be convenient to rename this to `getLastResult()`  in accordance with `Database::getLastQuery` method