A few extra steps with PHP’s Override attribute The Override attribute was introduced in PHP 8.3. It is a new attribute, that marks methods that must be overriding a parent’s class method: one of the parent must define a method with the same name. When this is the case, all is fine. If no parent […]
Let’s make PHP more abstract abstract is a conception keyword. It is decided during the conception phase that some classes and some methods uses the abstract keyword. Later, that keyword might disappear as needed, yet abstract never appears sponteanously. Nobody decides abstraction late in the coding phase. That seems to be a lack of practise […]
Classic Code Review for PHP Classes Classes help organise the code by breaking it into smaller components, that combined together to build powerful applications. Property definitions, abstract classes, local variables and identical methods are all code smells that evolve directly inside large repositories with many classes. Here some common code smells that arise in OOP […]