Convert ComposerPackageTypes constants to enum cases
This commit is contained in:
parent
b5d35ed20e
commit
3db33006b7
2 changed files with 6 additions and 6 deletions
|
@ -22,12 +22,12 @@
|
||||||
|
|
||||||
namespace ncc\Enums\Types;
|
namespace ncc\Enums\Types;
|
||||||
|
|
||||||
final class ComposerPackageTypes
|
enum ComposerPackageTypes : string
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This is the default. It will copy the files to `vendor`
|
* This is the default. It will copy the files to `vendor`
|
||||||
*/
|
*/
|
||||||
public const LIBRARY = 'library';
|
case LIBRARY = 'library';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This denotes a project rather than a library. For example
|
* This denotes a project rather than a library. For example
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
* to provide listings of projects to initialize when creating
|
* to provide listings of projects to initialize when creating
|
||||||
* a new workspace.
|
* a new workspace.
|
||||||
*/
|
*/
|
||||||
public const PROJECT = 'project';
|
case PROJECT = 'project';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An empty package that contains requirements and will trigger
|
* An empty package that contains requirements and will trigger
|
||||||
|
@ -45,11 +45,11 @@
|
||||||
* anything to the filesystem. As such, it does not require a
|
* anything to the filesystem. As such, it does not require a
|
||||||
* a dist or source key to be installable
|
* a dist or source key to be installable
|
||||||
*/
|
*/
|
||||||
public const METAPACKAGE = 'metapackage';
|
case METAPACKAGE = 'metapackage';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A package of type `composer-plugin` may provide an installer
|
* A package of type `composer-plugin` may provide an installer
|
||||||
* for other packages that have a custom type.
|
* for other packages that have a custom type.
|
||||||
*/
|
*/
|
||||||
public const COMPOSER_PLUGIN = 'composer-plugin';
|
case COMPOSER_PLUGIN = 'composer-plugin';
|
||||||
}
|
}
|
|
@ -191,7 +191,7 @@
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->type = ComposerPackageTypes::LIBRARY;
|
$this->type = ComposerPackageTypes::LIBRARY->value;
|
||||||
$this->minimum_stability = ComposerStabilityTypes::STABLE->value;
|
$this->minimum_stability = ComposerStabilityTypes::STABLE->value;
|
||||||
$this->abandoned = false;
|
$this->abandoned = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue