
4 Principles are guiding this methodology
- Readability
- Quality Assurance
- Logic
- Reusable code
Readability
PSR-2 code styling
Function no longer than 50 lines
PHP doc Block
TypeHint your functions
More information: For better code readability we suggest PSR-2 code styling to be applied. We consider a function bigger than 25 lines is not an efficient function. For engaging this methodology we recommend 50 lines maximum per function. DocBloc are essentials. Swagger in a case of API writing is essential to be present.
A developer should be able to explain his work easily and quickly and should use materials to do so
Quality Insurance
No PHP error message
No PHP Warning messages
No PHP Notices
No hardcore credentials
Unit Testing
Details: When executing the code we expect the quality assurance team to verify that no PHP errors, warnings, notices are produced. We also expect the QA team to go throughout the code to verify that no hardcore credentials are present within the code. Unit Test writing should be edited by QA team preferably
Logic
DRY (do not repeat yourself)
KISS (Keep it Stupid Simple)
SOLID principles
Reusable Code
Use PHP throw exception
Use Object oriented techniques
Use static function
Use PHP throw exception
Use Object oriented techniques
Use static function
Add the following your PHP too get rid of PHP notices, warnings
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
Want to know more about my work around the LAMP stack world and other specialties? Sign up for our email brief for hand-picked articles, news, and more.