Product
None
Description
The coding guidelines have examples which don't work, and, never have:
https://craftcms.com/docs/5.x/extend/coding-guidelines.html
For example:
Use those instead of their magic properties:
// Bad:
\Craft::$app->entries->saveEntry($entry);
// Better:
\Craft::$app->getEntries()->saveEntry($entry);
Neither of these lines of code work in Craft 3, 4 or 5, where they are shown.
The correct code should be:
Craft::$app->getElements()->saveElement($entry);
I believe this was corrupted when rewritten from Craft 2:
craft()->entries->saveEntry($entry);