Fix: resolve more issues identified by PHP Analyzer