Files
michaelschiemer/src/Framework/Discovery/ValueObjects/DiscoveryOptions.php
Michael Schiemer 5050c7d73a docs: consolidate documentation into organized structure
- Move 12 markdown files from root to docs/ subdirectories
- Organize documentation by category:
  • docs/troubleshooting/ (1 file)  - Technical troubleshooting guides
  • docs/deployment/      (4 files) - Deployment and security documentation
  • docs/guides/          (3 files) - Feature-specific guides
  • docs/planning/        (4 files) - Planning and improvement proposals

Root directory cleanup:
- Reduced from 16 to 4 markdown files in root
- Only essential project files remain:
  • CLAUDE.md (AI instructions)
  • README.md (Main project readme)
  • CLEANUP_PLAN.md (Current cleanup plan)
  • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements)

This improves:
 Documentation discoverability
 Logical organization by purpose
 Clean root directory
 Better maintainability
2025-10-05 11:05:04 +02:00

113 lines
2.9 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Framework\Discovery\ValueObjects;
/**
* Configuration options for discovery process
*/
final readonly class DiscoveryOptions
{
public function __construct(
public ScanType $scanType = ScanType::FULL,
public array $paths = ['/src'],
public bool $useCache = true,
public bool $parallel = false,
public int $batchSize = 50,
public bool $showProgress = false,
public array $excludePatterns = [],
public array $includePatterns = ['*.php']
) {
}
public static function defaults(): self
{
return new self();
}
public function withScanType(ScanType $scanType): self
{
return new self(
scanType: $scanType,
paths: $this->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']
);
}
}