protected function setClassNamespace()
    {
        $classDirectories = $this->addon->config('addon.directories', []);

        if (count($this->addon->config('addon.directories', [])) === 0) {
            return;
        }

        $files = Finder::create();

        foreach ($classDirectories as $path) {
            $files->in($this->addon->path($path));
        }

        $files->name('*.php');

        $search = [
            $this->currentNamespace.'\\',
            'namespace '.$this->currentNamespace.';',
        ];

        $replace = [
            $this->newNamespace.'\\',
            'namespace '.$this->newNamespace.';',
        ];

        foreach ($files as $file) {
            $this->replaceIn($file, $search, $replace);
        }
    }