uuid: - value: 465add9b-a2c7-48f1-84de-966fbbd20c27 langcode: - value: en type: - target_id: daily_email target_type: node_type target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7 revision_timestamp: - value: '2025-05-11T09:00:14+00:00' revision_uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 revision_log: { } status: - value: true uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 title: - value: 'Making PHPStan stricter' created: - value: '2024-05-05T00:00:00+00:00' changed: - value: '2025-05-11T09:00:14+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2024/05/05/making-phpstan-stricter langcode: en body: - value: |

Continuing yesterday's thought on strictness in PHP, today I want to talk about adding more strictness to PHPStan.

Adding the PHPStan Strict Rules extension makes PHPStan stricter by adding new, more opinionated rules.

For example:

You can enable and disable rules as needed but, like setting the PHPStan level, ideally I like to enable them all by default and see how strict I go.

It depends on the code being tested and the preference of the team, though I find the stricter the rules, the less bugs there are.

format: full_html processed: |

Continuing yesterday's thought on strictness in PHP, today I want to talk about adding more strictness to PHPStan.

Adding the PHPStan Strict Rules extension makes PHPStan stricter by adding new, more opinionated rules.

For example:

You can enable and disable rules as needed but, like setting the PHPStan level, ideally I like to enable them all by default and see how strict I go.

It depends on the code being tested and the preference of the team, though I find the stricter the rules, the less bugs there are.

summary: null field_daily_email_cta: { }