Skip to content

Commit 51f3ced

Browse files
committed
Replaced Command::(SUCCESS|FAILURE) with self::(SUCCESS|FAILURE)
1 parent 58b5c71 commit 51f3ced

14 files changed

+40
-40
lines changed

src/bundle/Core/Command/CheckURLsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
106106
}
107107
$progress->finish();
108108

109-
return Command::SUCCESS;
109+
return self::SUCCESS;
110110
}
111111

112112
private function getTotalCount(): int

src/bundle/Core/Command/CleanupVersionsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
148148
if ($contentIdsCount === 0) {
149149
$output->writeln('<info>There is no content matching the given Criteria.</info>');
150150

151-
return Command::SUCCESS;
151+
return self::SUCCESS;
152152
}
153153

154154
$output->writeln(sprintf(
@@ -229,7 +229,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
229229
$contentIdsCount
230230
));
231231

232-
return Command::SUCCESS;
232+
return self::SUCCESS;
233233
}
234234

235235
/**

src/bundle/Core/Command/CopySubtreeCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
152152
);
153153

154154
if (!$input->getOption('no-interaction') && !$questionHelper->ask($input, $output, $question)) {
155-
return Command::SUCCESS;
155+
return self::SUCCESS;
156156
}
157157

158158
$this->locationService->copySubtree(
@@ -164,7 +164,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
164164
'<info>Finished</info>'
165165
);
166166

167-
return Command::SUCCESS;
167+
return self::SUCCESS;
168168
}
169169

170170
/**

src/bundle/Core/Command/DebugConfigResolverCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9797
if ($input->getOption('json')) {
9898
$output->write(json_encode($parameterData));
9999

100-
return Command::SUCCESS;
100+
return self::SUCCESS;
101101
}
102102

103103
$output->writeln('<comment>SiteAccess name:</comment> ' . $this->siteAccess->name);
@@ -112,6 +112,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
112112
)
113113
);
114114

115-
return Command::SUCCESS;
115+
return self::SUCCESS;
116116
}
117117
}

src/bundle/Core/Command/DeleteContentTranslationCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
127127
$this->repository->rollback();
128128
$this->output->writeln('Reverting and aborting.');
129129

130-
return Command::SUCCESS;
130+
return self::SUCCESS;
131131
}
132132

133133
// Delete Translation
@@ -144,7 +144,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
144144
throw $e;
145145
}
146146

147-
return Command::SUCCESS;
147+
return self::SUCCESS;
148148
}
149149

150150
/**

src/bundle/Core/Command/ExpireUserPasswordsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
148148
if ($totalCount === 0) {
149149
$output->writeln('<info>There are no users matching given criteria</info>');
150150

151-
return Command::SUCCESS;
151+
return self::SUCCESS;
152152
}
153153

154154
$output->writeln(sprintf(
@@ -213,7 +213,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
213213
);
214214
}
215215

216-
return Command::SUCCESS;
216+
return self::SUCCESS;
217217
}
218218

219219
/**

src/bundle/Core/Command/NormalizeImagesPathsCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
113113
if ($imagePathsToNormalizeCount === 0) {
114114
$io->success('No paths to normalize.');
115115

116-
return Command::SUCCESS;
116+
return self::SUCCESS;
117117
}
118118

119119
if (!$io->confirm('Do you want to continue?')) {
120-
return Command::SUCCESS;
120+
return self::SUCCESS;
121121
}
122122

123123
$io->writeln('Normalizing image paths. Please wait...');
@@ -136,7 +136,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
136136
$io->progressFinish();
137137
$io->success('Done!');
138138

139-
return Command::SUCCESS;
139+
return self::SUCCESS;
140140
}
141141

142142
/**

src/bundle/Core/Command/RegenerateUrlAliasesCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static function (Repository $repository): int {
126126
if ($locationsCount === 0) {
127127
$output->writeln('<info>No location was found. Exiting.</info>');
128128

129-
return Command::SUCCESS;
129+
return self::SUCCESS;
130130
}
131131

132132
if (!$input->getOption('no-interaction')) {
@@ -140,10 +140,10 @@ static function (Repository $repository): int {
140140
false
141141
);
142142
if (!$helper->ask($input, $output, $question)) {
143-
return Command::SUCCESS;
143+
return self::SUCCESS;
144144
}
145145
} elseif (!$input->getOption('force')) {
146-
return Command::FAILURE;
146+
return self::FAILURE;
147147
}
148148

149149
$this->regenerateSystemUrlAliases($output, $locationsCount, $locationIds, $iterationCount);
@@ -157,7 +157,7 @@ static function (Repository $repository): int {
157157
$output->writeln("<info>Done. Deleted {$corruptedAliasesCount} entries.</info>");
158158
$output->writeln('<comment>Make sure to clear HTTP cache.</comment>');
159159

160-
return Command::SUCCESS;
160+
return self::SUCCESS;
161161
}
162162

163163
/**

src/bundle/Core/Command/ReindexCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
222222
EOT);
223223

224224
if (!$io->confirm('Continue?', true)) {
225-
return Command::SUCCESS;
225+
return self::SUCCESS;
226226
}
227227
}
228228

@@ -232,7 +232,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
232232
return $this->indexIncrementally($input, $output, $iterationCount, $commit);
233233
}
234234

235-
return Command::SUCCESS;
235+
return self::SUCCESS;
236236
}
237237

238238
/**

src/bundle/Core/Command/ResizeOriginalImagesCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
157157
)
158158
);
159159

160-
return Command::SUCCESS;
160+
return self::SUCCESS;
161161
}
162162

163163
try {
@@ -170,7 +170,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
170170
)
171171
);
172172

173-
return Command::SUCCESS;
173+
return self::SUCCESS;
174174
}
175175

176176
$query = new Query();
@@ -195,13 +195,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
195195
)
196196
);
197197

198-
return Command::SUCCESS;
198+
return self::SUCCESS;
199199
}
200200

201201
$helper = $this->getHelper('question');
202202
$question = new ConfirmationQuestion('<question>The changes you are going to perform cannot be undone. Remember to do a proper backup before. Would you like to continue?</question> ', false);
203203
if (!$helper->ask($input, $output, $question)) {
204-
return Command::SUCCESS;
204+
return self::SUCCESS;
205205
}
206206

207207
$progressBar = new ProgressBar($output, $totalCount);
@@ -228,7 +228,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
228228
)
229229
);
230230

231-
return Command::SUCCESS;
231+
return self::SUCCESS;
232232
}
233233

234234
/**

0 commit comments

Comments
 (0)