Overview for 'tomasvotruba'

Can PHPStan find Dead Public Methods?

Written by Tomáš Votruba / Original link on Jul. 4, 2022

This bold question has been around PHP Internet for many years... at least since 2008. In 2017 I added dead public method sniff to Symplify Coding Standard. It runs on bare PHP tokens without any type or AST, so the capability was limited. Yet it was able to detect a few unused methods. Now, 5 year…