Correction of many warnings code inspection.
Adjustments code according to the standards.
Adding missing PHPDoc comment.