Some checks failed
Deploy Application / deploy (push) Has been cancelled
51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Framework\DI\ValueObjects;
|
|
|
|
/**
|
|
* Represents a warning found during initializer analysis
|
|
*/
|
|
final readonly class InitializerWarning
|
|
{
|
|
/**
|
|
* @param string $type Warning type (typically 'warning')
|
|
* @param string $message Human-readable warning message
|
|
* @param string $class Initializer class name
|
|
* @param string $method Initializer method name
|
|
* @param string $returnType Return type of the initializer
|
|
* @param array<string> $missingDependencies List of potentially missing dependencies
|
|
*/
|
|
public function __construct(
|
|
public string $type,
|
|
public string $message,
|
|
public string $class,
|
|
public string $method,
|
|
public string $returnType,
|
|
public array $missingDependencies
|
|
) {
|
|
}
|
|
|
|
/**
|
|
* Convert to array for JSON output
|
|
*
|
|
* @return array{type: string, message: string, class: string, method: string, return_type: string, missing_dependencies: array<string>}
|
|
*/
|
|
public function toArray(): array
|
|
{
|
|
return [
|
|
'type' => $this->type,
|
|
'message' => $this->message,
|
|
'class' => $this->class,
|
|
'method' => $this->method,
|
|
'return_type' => $this->returnType,
|
|
'missing_dependencies' => $this->missingDependencies,
|
|
];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|