protected function findHooksInApiFile($moduleInstance)
    {
        $finder = new Finder();
        $files = $finder->files()
            ->name("{$moduleInstance->info['name']}.api.php")
            ->in($moduleInstance->getPath());

        foreach ($files as $file) {
            $functions = $this->getFileFunctions($file->getPathname());
            foreach ($functions as $function) {
                if (Unicode::strpos($function, 'hook')) {
                    $this->addHook($function);
                }
            }

        }
    }