class PackageValidator

Package validator class

Properties

protected array $requires Package properties

Methods

__construct(array|null $requires = [])

Constructor

array
validate(array|null $requires = null)

Validate package requirements

array
parseItemName(string $name)

Parse item name

array
getResultItem(string $name, string|null $requiredVersion, string|null $packageVersion, bool $valid, bool $optional)

Get validation result item

array
validateComposerPackages()

Validate composer packages

array
validateItems(string $packageType, string $requireItemKey)

Validate required items

array
validateCore()

Validate required items

Details

at line 34
__construct(array|null $requires = [])

Constructor

Parameters

array|null $requires

at line 45
array validate(array|null $requires = null)

Validate package requirements

Parameters

array|null $requires

Return Value

array

at line 75
protected array parseItemName(string $name)

Parse item name

Parameters

string $name

Return Value

array

at line 96
protected array getResultItem(string $name, string|null $requiredVersion, string|null $packageVersion, bool $valid, bool $optional)

Get validation result item

Parameters

string $name
string|null $requiredVersion
string|null $packageVersion
bool $valid
bool $optional

Return Value

array

at line 122
array validateComposerPackages()

Validate composer packages

Return Value

array

at line 152
protected array validateItems(string $packageType, string $requireItemKey)

Validate required items

Parameters

string $packageType
string $requireItemKey

Return Value

array

at line 180
protected array validateCore()

Validate required items

Return Value

array