Some of the changes in "more updates for better coding standard" are pretty savage and I am sure there are going to be lots of breakages. I'm not even sure they are entirely logical either.
Why change getProductDiscounts to getDiscounts etc etc? Removing the 'Products' makes no real difference apart, from breaking lots of code.
I'm was also reading https://github.com/opencart/opencart/wi ... -standards to see where this new 'standard' but it seems non existent. I also tried to find the code sniffer file, but that seems to have gotten lost as well.
"There is a PHP_CodeSniffer standard here: https://github.com/opencart/opencart/tr ... s/OpenCart"
Actually, no there isn't. There's a nice 404 instead.
Not exactly encouraging devs to write decent code.
https://github.com/opencart/opencart/issues/7899
Tabs? Nope - all my stuff uses spaces. Always has, always will. It's how my IDE is setup and my formatter uses spaces. Because a space is always a space, no matter where, but tabs for formatting mean layouts vary wildly in their look (I guess at least PHP doesn' t use them for syntax....). So no, it won't encourage me to add any code because I just never use tabs. Probably just me. Funnily Wordpress say
Ridiculous then. That's what is called double standards. I am surprised that a space is 'less flexible across clients'. You mean there are apps & stuff out there that don't use spaces? Well I never....Your indentation should always reflect logical structure. Use real tabs and not spaces, as this allows the most flexibility across clients.
Exception: if you have a block of code that would be more readable if things are aligned, use spaces:
I digress.
Seems that no one is paying much attention to documentation and it shows. Having been a GSoD mentor last year working with a professional tech doc writer, it impressed on me even more than normal how important good docs are. It really needs tightening up. Broken links are really frustrating.
I REALLY like OpenCart, but good lord, some of it is badly thought out. An API where you can get some information, but not essential stuff like discounts? Really? It is just all over the place and inconsistent. In 2020 a decent API with full admin control is mandatory.
An API that doesn't actually let you modify the core thing in the Cart which is products? And the routine in there to get the Discounts is reliant on your customer groups? Writing our own hacks is just silly, and as a not brilliant coder I worry that I might leave holes in things.
OK, so I guess that it enables you to sell admin add ons or somesuch. But it really just looks half baked with some bits that you need, but not others.
Hey ho.