Exakat 2.1.6 Review Exakat 2.1.6 keeps the pace with PHP 8.0 development, and tops the count of 400 analysis. While we are waiting for the finalization of the attributes syntax, the first PHP 8.0 analysis is out : it checks for typos in named arguments. And, for the current PHP version, the Type suggestion report […]
Exakat 2.1.5 Review Exakat 2.1.5 is bringing a large chest of treasures : PHP 8.0 support, with named parameters, attributes, match and added a new inventory for too many chained object. The engine upgraded the storage of Typehint and Default values, which lead to several modernisation and coverage extensions, such as ‘typehint are for interface […]
Method fossilisation Fossilisation happens when things get harder to update. It is a process, more than a final state. In particular, it happens to methods when the signature is shared across multiple classes. With interfaces and inheritance, changing some of the elements of a method’s signature means refactoring the code in several other locations. The […]
Not using @ is the poster child of good practices. It’s also looked upon, as an impossible goal. Did you know that the @ operator is only merely used by 50% of PHP applications ? Same for parenthesis with include and co : don’t use them, like 50% of the developpers. This is how the […]
Overall Typehint Usage PHP typehints were introduced in PHP 5. Ever since, they have grown in features and usage. Where are we at the moment ? We scanned the Open Source community repositories. 89% of all PHP code source use types hinting, at least a little. Typehint Coverage This number is very high, yet it […]
Exakat 1.9.9 Review Exakat focuses on automated updates this week : two new reports (and sections) provide recommendations to use Rector and Php-cs-fixer for fixing, en masse, issues found during an audit. Also, no less than 9 new rules were added to Exakat, and a new inventory for mbstring encoding. The Exakat 1.9.9 review is the best […]
Exakat 1.9.8 Review This week, Exakat upgrades the presentation of the inventories. It refactored the method definition detection, and added new rule for hiding parameters and wrong case. Several modernisations were applied, in particular to the ‘Insufficient typehint’ rule. Coding is inherently risky, and it helps to readd the Exakat 1.9.7 review. Upgraded Inventories Code […]
This week, Exakat added a new inventory for too many chained object. The engine upgraded the storage of Typehint and Default values, which lead to several modernisation and coverage extensions, such as ‘typehint are for interface or abstract classes’, and ‘Never used parameters’. Code is like a series of baby steps, and a good Exakat […]
Most Popular PHP Magic Methods PHP features the concept of magic methods : methods that have a special function. They are related to other PHP features, and are automatically called on an object, when available. For example, the __toString() method is called whenever an object is converted to a string : this may be with […]
Setting exceptions at the right place : when you need to throw an exception somewhere else than the most useful line of code