paths, useCache: $this->useCache, parallel: $this->parallel, batchSize: $this->batchSize, showProgress: $this->showProgress, excludePatterns: $this->excludePatterns, includePatterns: $this->includePatterns ); } public function withPaths(array $paths): self { return new self( scanType: $this->scanType, paths: $paths, useCache: $this->useCache, parallel: $this->parallel, batchSize: $this->batchSize, showProgress: $this->showProgress, excludePatterns: $this->excludePatterns, includePatterns: $this->includePatterns ); } public function withoutCache(): self { return new self( scanType: $this->scanType, paths: $this->paths, useCache: false, parallel: $this->parallel, batchSize: $this->batchSize, showProgress: $this->showProgress, excludePatterns: $this->excludePatterns, includePatterns: $this->includePatterns ); } /** * Create default discovery options */ public static function default(): self { return new self(); } /** * Create comprehensive discovery options */ public static function comprehensive(): self { return new self( scanType: ScanType::FULL, paths: ['/src', '/app'], useCache: true, parallel: true, batchSize: 100, showProgress: true, excludePatterns: [], includePatterns: ['*.php'] ); } /** * Create minimal discovery options */ public static function minimal(): self { return new self( scanType: ScanType::INCREMENTAL, paths: ['/src'], useCache: true, parallel: false, batchSize: 25, showProgress: false, excludePatterns: ['*/test/*', '*/tests/*'], includePatterns: ['*.php'] ); } }