forked from bmitch/churn-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVcs.php
More file actions
34 lines (28 loc) · 658 Bytes
/
Vcs.php
File metadata and controls
34 lines (28 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
declare(strict_types=1);
namespace Churn\Configuration\Validator;
use Churn\Configuration\EditableConfig;
use Webmozart\Assert\Assert;
/**
* @internal
*/
final class Vcs extends BaseValidator
{
/**
* Class constructor.
*/
public function __construct()
{
parent::__construct('vcs');
}
/**
* @param EditableConfig $config The configuration object.
* @param mixed $value The value to validate.
*/
#[\Override]
protected function validateValue(EditableConfig $config, $value): void
{
Assert::string($value, 'VCS should be a string');
$config->setVCS($value);
}
}