---
title: "Discussion on \"Using assert to fix PHPStan errors\" | Hashnode"
description: "Discussion on \"Using assert to fix PHPStan errors\". I’ve been using more and more PHPStan recently and it’s been a real pleasure to improve my codebases.\nBeing strict is nice, but sometimes it can also be inconvenient. A lot of built-in methods in php can return false. Or sometimes, you have a “mixed”..."
url: "https://hashnode.com/posts/using-assert-to-fix-phpstan-errors/66ed5136a7ee95a2a46ec089"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using assert to fix PHPStan errors](https://blog.lekoala.be/using-assert-to-fix-phpstan-errors?utm_source=hashnode&utm_medium=feed)

I’ve been using more and more PHPStan recently and it’s been a real pleasure to improve my codebases. Being strict is nice, but sometimes it can also be inconvenient. A lot of built-in methods in php can return false. Or sometimes, you have a “mixed”...

Sep 20, 2024 · 1 min read · blog.lekoala.be  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#phpstan](https://hashnode.com/tag/phpstan)

## Written by

[Thomas Portelange](https://hashnode.com/@lekoala)

@lekoala · Belgium

  
[View profile](https://hashnode.com/@lekoala)

A PHP/JS Web Developer based in Belgium

A Web Developer based in Belgium, specialized in PHP &amp; JS development

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
