Completed
Pull Request — master (#59)
by Julien
02:49
created
src/Question/CommonValidators.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
      */
12 12
     public static function getAlphaValidator(?array $additionalCharacters = null, ?string $hint = null): \Closure
13 13
     {
14
-        return function (string $value) use ($additionalCharacters, $hint) {
14
+        return function(string $value) use ($additionalCharacters, $hint) {
15 15
             $value = trim($value);
16 16
             $pattern = '/^[a-zA-Z0-9';
17 17
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public static function getAbsolutePathValidator(): \Closure
39 39
     {
40
-        return function (string $value) {
40
+        return function(string $value) {
41 41
             $value = trim($value);
42 42
             if (!\preg_match('/^[\'"]?(?:\/[^\/\n]+)*[\'"]?$/', $value)) {
43 43
                 throw new \InvalidArgumentException('Invalid value "' . $value . '". Hint: path has to be absolute without trailing "/".');
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public static function getDomainNameValidator(): \Closure
50 50
     {
51
-        return function (string $value) {
51
+        return function(string $value) {
52 52
             $value = trim($value);
53 53
             if (!\preg_match('/^(?!:\/\/)([a-zA-Z0-9-_]+\.)*[a-zA-Z0-9][a-zA-Z0-9-_]+\.[a-zA-Z]{2,11}?$/im', $value)) {
54 54
                 throw new \InvalidArgumentException('Invalid value "' . $value . '". Hint: the domain name must not start with "http(s)://".');
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     public static function getDomainNameWithPortValidator(): \Closure
61 61
     {
62
-        return function (string $value) {
62
+        return function(string $value) {
63 63
             $value = trim($value);
64 64
             if (!\preg_match('/^(?!:\/\/)([a-zA-Z0-9-_]+\.)*[a-zA-Z0-9][a-zA-Z0-9-_]+\.[a-zA-Z]{2,11}?:[0-9]*$/im', $value)) {
65 65
                 throw new \InvalidArgumentException('Invalid value "' . $value . '". Hint: the domain name must not start with "http(s)://".');
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public static function getIPv4Validator(): \Closure
72 72
     {
73
-        return function (string $value) {
73
+        return function(string $value) {
74 74
             $value = trim($value);
75 75
             if (!\preg_match('/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/', $value)) {
76 76
                 throw new \InvalidArgumentException('Invalid value "' . $value . '".');
Please login to merge, or discard this patch.
src/Question/CommonQuestions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         $question->setAutocompleterValues($availableVersions);
66 66
 
67
-        $question->setValidator(function (string $value) use ($availableVersions, $dockerHubImage) {
67
+        $question->setValidator(function(string $value) use ($availableVersions, $dockerHubImage) {
68 68
             $value = trim($value);
69 69
 
70 70
             if ($value === 'v') {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         $environmentsStr = [];
122 122
         foreach ($environments as $env) {
123
-            $environmentsStr[] = $env[CommonMetadata::ENV_NAME_KEY] . ' (of type '. $env[CommonMetadata::ENV_TYPE_KEY]  .')';
123
+            $environmentsStr[] = $env[CommonMetadata::ENV_NAME_KEY] . ' (of type ' . $env[CommonMetadata::ENV_TYPE_KEY] . ')';
124 124
         }
125 125
 
126 126
         $chosen = $this->factory->choiceQuestion('Environments', $environmentsStr, false)
Please login to merge, or discard this patch.
src/Command/AbstractEventCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@
 block discarded – undo
71 71
      */
72 72
     public function getAllEventNames(): array
73 73
     {
74
-        return array_map(function (AbstractEventCommand $event) {
74
+        return array_map(function(AbstractEventCommand $event) {
75 75
             return $event->getEventName();
76
-        }, \array_filter($this->getApplication()->all(), function (Command $command) {
76
+        }, \array_filter($this->getApplication()->all(), function(Command $command) {
77 77
             return $command instanceof AbstractEventCommand && !$command->isHidden();
78 78
         }));
79 79
     }
Please login to merge, or discard this patch.
src/Exception/CannotHandleEventException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,6 +7,6 @@
 block discarded – undo
7 7
 {
8 8
     public static function cannotHandleEvent(string $eventName): self
9 9
     {
10
-        return new self('Could not find an Aent that can handle events of type "'.$eventName.'"');
10
+        return new self('Could not find an Aent that can handle events of type "' . $eventName . '"');
11 11
     }
12 12
 }
Please login to merge, or discard this patch.