protected function getSwaggerDocumentation(): Swagger
    {
        if (!$this->cache instanceof Cache) {
            return \Swagger\scan($this->scanDir, $this->scanOptions);
        }

        return $this->cache->getOrSet($this->cacheKey, function () {
            return \Swagger\scan($this->scanDir, $this->scanOptions);
        }, $this->cacheDuration);
    }
protected function getSwaggerDocumentation(): Swagger
    {
        if (!$this->cache instanceof Cache) {
            return \Swagger\scan($this->scanDir, $this->scanOptions);
        }

        return $this->cache->getOrSet($this->cacheKey, function () {
            return \Swagger\scan($this->scanDir, $this->scanOptions);
        }, $this->cacheDuration);
    }
protected function getSwaggerDocumentation ( ) : Swagger { if ( ! $ this -> cache instanceof Cache ) { return \ Swagger \ scan ( $ this -> scanDir , $ this -> scanOptions ) ; } return $ this -> cache -> getOrSet ( $ this -> cacheKey , function ( ) { return \ Swagger \ scan ( $ this -> scanDir , $ this -> scanOptions ) ; } , $ this -> cacheDuration ) ; }
Scan the filesystem for swagger annotations and build swagger-documentation.

@return Swagger
Scan the filesystem for swagger annotations and build swagger - documentation .