1
1
<?php
2
2
3
- declare (strict_types=1 );
4
-
5
3
namespace App \Command ;
6
4
7
- use App \{
8
- ComponentConfiguration ,
9
- Exception \ValidationException
10
- };
11
- use Symfony \Component \Console \{
12
- Command \Command ,
13
- Input \InputArgument ,
14
- Input \InputInterface ,
15
- Output \OutputInterface
16
- };
5
+ use App \ComponentConfiguration ;
6
+ use App \Exception \ValidationException ;
7
+ use Symfony \Component \Console \Command \Command ;
8
+ use Symfony \Component \Console \Input \InputArgument ;
9
+ use Symfony \Component \Console \Input \InputInterface ;
10
+ use Symfony \Component \Console \Output \OutputInterface ;
17
11
18
12
abstract class AbstractCommand extends Command
19
13
{
@@ -27,17 +21,17 @@ abstract class AbstractCommand extends Command
27
21
/** @var ?string */
28
22
private $ resultTypeSlug ;
29
23
30
- public function isValidateDev (): bool
24
+ public function isValidateDev ()
31
25
{
32
26
return $ this ->validateDev ;
33
27
}
34
28
35
- public function isRepositoriesCreated (): bool
29
+ public function isRepositoriesCreated ()
36
30
{
37
31
return $ this ->repositoriesCreated ;
38
32
}
39
33
40
- public function getResultTypeSlug (): ? string
34
+ public function getResultTypeSlug ()
41
35
{
42
36
return $ this ->resultTypeSlug ;
43
37
}
@@ -59,26 +53,26 @@ protected function execute(InputInterface $input, OutputInterface $output)
59
53
return 0 ;
60
54
}
61
55
62
- protected function validationSuccess (OutputInterface $ output , string $ message ): self
56
+ protected function validationSuccess (OutputInterface $ output , $ message )
63
57
{
64
58
$ output ->writeln (" \e[42m > \e[00m \e[32mValidated \e[00m " . $ this ->validationPrefix . $ message );
65
59
66
60
return $ this ;
67
61
}
68
62
69
- protected function validationFailed (OutputInterface $ output , string $ error ): void
63
+ protected function validationFailed (OutputInterface $ output , $ error )
70
64
{
71
65
throw new ValidationException ($ output , $ this ->validationPrefix . $ error );
72
66
}
73
67
74
- protected function warning (OutputInterface $ output , string $ message ): self
68
+ protected function warning (OutputInterface $ output , $ message )
75
69
{
76
70
$ output ->writeln (" \e[43m > \e[00m \e[43m " . $ this ->validationPrefix . $ message . " \e[00m " );
77
71
78
72
return $ this ;
79
73
}
80
74
81
- protected function repositoriesNotCreatedWarning (OutputInterface $ output ): self
75
+ protected function repositoriesNotCreatedWarning (OutputInterface $ output )
82
76
{
83
77
$ this ->warning (
84
78
$ output ,
@@ -90,17 +84,17 @@ protected function repositoriesNotCreatedWarning(OutputInterface $output): self
90
84
return $ this ;
91
85
}
92
86
93
- protected function getInstallationPath (): string
87
+ protected function getInstallationPath ()
94
88
{
95
89
return '/var/www/phpbenchmarks ' ;
96
90
}
97
91
98
- protected function getCommonRepositoryName (): string
92
+ protected function getCommonRepositoryName ()
99
93
{
100
94
return 'phpbenchmarks/ ' . ComponentConfiguration::COMMON_REPOSITORY ;
101
95
}
102
96
103
- protected function getCommonDevBranchName (): string
97
+ protected function getCommonDevBranchName ()
104
98
{
105
99
return
106
100
'dev- '
@@ -112,7 +106,7 @@ protected function getCommonDevBranchName(): string
112
106
. '_prepare ' ;
113
107
}
114
108
115
- protected function getCommonProdBranchPrefix (OutputInterface $ output ): string
109
+ protected function getCommonProdBranchPrefix (OutputInterface $ output )
116
110
{
117
111
switch ($ this ->getResultTypeSlug ()) {
118
112
case 'hello-world ' : $ commonMinorVersion = 1 ; break ;
0 commit comments