I have looked carefully but not found yet to see if OpenCart has adopted one of the PHP style guides. (My apologies if it has)
For example
PSR-0: Autoloader Standardhttp://www.php-fig.org/psr/psr-4/
PSR-1: Basic Coding Standardhttp://www.php-fig.org/psr/psr-1/
PSR-2: Coding Style Guidehttp://www.php-fig.org/psr/psr-2/
Zend coding standardhttp://framework.zend.com/manual/1.12/e ... rview.html
Pear coding standards [urlhttp://pear.php.net/manual/en/coding-standards.php][/url]
Other frameworks I've used are quite strict Magento and concrete5 to name just two
It would seems useful if everyone sang by the same hymn sheet.
OpenCart code is pretty dang consistent -- except for the part about whitespace:

Theres prob 2000 extra spaces/tabs scattered everywhere. Worse yet certain hasty vQmods use a trailing whitespace in their search targets (ouch). Mind your whitespace allWhitespace -
After any code, but before a new line - there should be no white space. The same is true for an empty line. After the closing PHP tag it is extremely important to remove any white space.

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.
Who is online
Users browsing this forum: No registered users and 9 guests