private function deleteDirectory()
    {
        $path = $this->complement['path']['root'];

        if (! $this->validateRoute($path)) {
            return false;
        }

        $isUninstall = ($this->getState() === 'inactive');

        if (! File::deleteDirRecursively($path) && $isUninstall) {
            $type = self::getType('ucfirst', false);

            $msg = $type . " doesn't exist in '$path' or couldn't be deleted.";

            self::$errors[] = ['message' => $msg];

            return false;
        }

        return true;
    }
private function deleteDirectory()
    {
        $path = $this->complement['path']['root'];

        if (! $this->validateRoute($path)) {
            return false;
        }

        $isUninstall = ($this->getState() === 'inactive');

        if (! File::deleteDirRecursively($path) && $isUninstall) {
            $type = self::getType('ucfirst', false);

            $msg = $type . " doesn't exist in '$path' or couldn't be deleted.";

            self::$errors[] = ['message' => $msg];

            return false;
        }

        return true;
    }
private function deleteDirectory ( ) { $ path = $ this -> complement [ 'path' ] [ 'root' ] ; if ( ! $ this -> validateRoute ( $ path ) ) { return false ; } $ isUninstall = ( $ this -> getState ( ) === 'inactive' ) ; if ( ! File :: deleteDirRecursively ( $ path ) && $ isUninstall ) { $ type = self :: getType ( 'ucfirst' , false ) ; $ msg = $ type . " doesn't exist in '$path' or couldn't be deleted." ; self :: $ errors [ ] = [ 'message' => $ msg ] ; return false ; } return true ; }
Delete complement directory.

@uses \Eliasis\Complement\Complement->$complement
@uses \Eliasis\Complement\Complement::$errors
@uses \Eliasis\Complement\Traits\ComplementHandler::getType()
@uses \Josantonius\File\File::deleteDirRecursively()

@return string → complement state
Delete complement directory .