Fix: resolve more issues reported by PHP Analyzer