private function removeApiControllerIfEmpty() { $file = $this->extractFromFiles['Api Methods']; $content = file_get_contents($file); if (!str_contains($content, '// Begin')) { unlink($file); } }