Post by clorne » Fri Nov 21, 2014 2:54 am

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.

Active Member

Posts

Joined
Fri Dec 23, 2011 6:03 pm

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by clorne » Fri Nov 21, 2014 3:51 pm

Thanks, missed that. Interesting, I will try to use it and watch for future developments.

Active Member

Posts

Joined
Fri Dec 23, 2011 6:03 pm

Post by Dhaupin » Sat Nov 29, 2014 4:53 am

OpenCart code is pretty dang consistent -- except for the part about whitespace:
Whitespace -
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.
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 all :)

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA
Who is online

Users browsing this forum: No registered users and 9 guests