@@ -51,18 +51,18 @@ protected function configure()
51
51
'category ' ,
52
52
null ,
53
53
InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL ,
54
- sprintf ('filter by a category (%s). ' , implode (', ' , self ::$ categories ))
54
+ \ sprintf ('filter by a category (%s). ' , \ implode (', ' , self ::$ categories ))
55
55
)
56
56
->setDescription ('Display current GraphQL services (types, resolvers and mutations) ' );
57
57
}
58
58
59
59
protected function execute (InputInterface $ input , OutputInterface $ output )
60
60
{
61
61
$ categoriesOption = $ input ->getOption ('category ' );
62
- $ categoriesOption = is_array ($ categoriesOption ) ? $ categoriesOption : [$ categoriesOption ];
63
- $ notAllowed = array_diff ($ categoriesOption , self ::$ categories );
62
+ $ categoriesOption = \ is_array ($ categoriesOption ) ? $ categoriesOption : [$ categoriesOption ];
63
+ $ notAllowed = \ array_diff ($ categoriesOption , self ::$ categories );
64
64
if (!empty ($ notAllowed )) {
65
- throw new \InvalidArgumentException (sprintf ('Invalid category (%s) ' , implode (', ' , $ notAllowed )));
65
+ throw new \InvalidArgumentException (\ sprintf ('Invalid category (%s) ' , \ implode (', ' , $ notAllowed )));
66
66
}
67
67
68
68
$ categories = empty ($ categoriesOption ) ? self ::$ categories : $ categoriesOption ;
@@ -71,7 +71,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
71
71
$ tableHeaders = ['solution id ' , 'aliases ' ];
72
72
73
73
foreach ($ categories as $ category ) {
74
- $ io ->title (sprintf ('GraphQL %ss Services ' , ucfirst ($ category )));
74
+ $ io ->title (\ sprintf ('GraphQL %ss Services ' , \ ucfirst ($ category )));
75
75
76
76
/** @var FluentResolverInterface $resolver */
77
77
$ resolver = $ this ->{$ category .'Resolver ' };
@@ -87,22 +87,22 @@ protected function execute(InputInterface $input, OutputInterface $output)
87
87
private function renderTable (FluentResolverInterface $ resolver , array $ tableHeaders , SymfonyStyle $ io )
88
88
{
89
89
$ tableRows = [];
90
- $ solutionIDs = array_keys ($ resolver ->getSolutions ());
91
- sort ($ solutionIDs );
90
+ $ solutionIDs = \ array_keys ($ resolver ->getSolutions ());
91
+ \ sort ($ solutionIDs );
92
92
foreach ($ solutionIDs as $ solutionID ) {
93
93
$ aliases = $ resolver ->getSolutionAliases ($ solutionID );
94
94
$ tableRows [$ solutionID ] = [$ solutionID , self ::serializeAliases ($ aliases )];
95
95
}
96
- ksort ($ tableRows );
96
+ \ ksort ($ tableRows );
97
97
$ io ->table ($ tableHeaders , $ tableRows );
98
98
$ io ->write ("\n\n" );
99
99
}
100
100
101
101
private static function serializeAliases (array $ aliases )
102
102
{
103
- ksort ($ aliases );
103
+ \ ksort ($ aliases );
104
104
105
- return implode ("\n" , $ aliases );
105
+ return \ implode ("\n" , $ aliases );
106
106
}
107
107
108
108
public static function getCategories ()
0 commit comments