Files
michaelschiemer/src/Framework/MagicLinks/ValueObjects/ExecutionContext.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

56 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Framework\MagicLinks\ValueObjects;
final readonly class ExecutionContext
{
private function __construct(
private array $data
) {
}
public static function empty(): self
{
return new self([]);
}
public static function fromArray(array $data): self
{
return new self($data);
}
public function with(string $key, mixed $value): self
{
$data = $this->data;
$data[$key] = $value;
return new self($data);
}
public function get(string $key, mixed $default = null): mixed
{
return $this->data[$key] ?? $default;
}
public function has(string $key): bool
{
return isset($this->data[$key]);
}
public function toArray(): array
{
return $this->data;
}
public function isEmpty(): bool
{
return empty($this->data);
}
public function merge(self $other): self
{
return new self(array_merge($this->data, $other->data));
}
}