@@ -3,8 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Mouf\Utils\Patcher\PatchInterface; |
5 | 5 | use Mouf\Utils\Patcher\PatchService; |
6 | -use Symfony\Component\Console\Helper\Table; |
|
7 | -use Symfony\Component\Console\Input\InputArgument; |
|
8 | 6 | use Symfony\Component\Console\Input\InputOption; |
9 | 7 | use Symfony\Component\Console\Output\OutputInterface; |
10 | 8 | use Symfony\Component\Console\Input\InputInterface; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | <input name="name" type="hidden" value="<?php echo plainstring_to_htmlprotected($this->instanceName); ?>"></input> |
9 | 9 | <input name="selfedit" type="hidden" value="<?php echo plainstring_to_htmlprotected($this->selfedit); ?>"></input> |
10 | 10 | <?php foreach ($this->nbPatchesByType as $name => $number): ?> |
11 | - <label class="checkbox"><input type="checkbox" name="types[]" value="<?= plainstring_to_htmlprotected($name) ?>" <?php if ($name == '') { echo "checked readonly"; } ?> /> <?= plainstring_to_htmlprotected($name?:'default') ?> (<?= $number ?> patch<?= $number > 1 ? 'es':'' ?>)</label> |
|
11 | + <label class="checkbox"><input type="checkbox" name="types[]" value="<?= plainstring_to_htmlprotected($name) ?>" <?php if ($name == '') { echo "checked readonly"; } ?> /> <?= plainstring_to_htmlprotected($name ?: 'default') ?> (<?= $number ?> patch<?= $number > 1 ? 'es' : '' ?>)</label> |
|
12 | 12 | <?php endforeach; ?> |
13 | 13 | |
14 | 14 | <button class="btn btn-large btn-success"><i class="icon-arrow-right icon-white"></i> Apply selected patches</button> |
@@ -197,15 +197,15 @@ |
||
197 | 197 | |
198 | 198 | $html = '<strong>Patcher</strong>: <a href="'.ROOT_URL.'vendor/mouf/mouf/patcher/?name='.$instanceName.'" class="btn btn-large btn-success patch-run-all"><i class="icon-arrow-right icon-white"></i> Apply '; |
199 | 199 | if ($nbAwaitingPatchs != 0) { |
200 | - $html .= $nbAwaitingPatchs." awaiting patch".(($nbAwaitingPatchs != 1)?"es":""); |
|
200 | + $html .= $nbAwaitingPatchs." awaiting patch".(($nbAwaitingPatchs != 1) ? "es" : ""); |
|
201 | 201 | if ($nbPatchesInError != 0) { |
202 | - $html .=" and"; |
|
202 | + $html .= " and"; |
|
203 | 203 | } |
204 | 204 | } |
205 | 205 | if ($nbPatchesInError != 0) { |
206 | - $html .=$nbPatchesInError." patch".(($nbPatchesInError != 1)?"es":"")." in error"; |
|
206 | + $html .= $nbPatchesInError." patch".(($nbPatchesInError != 1) ? "es" : "")." in error"; |
|
207 | 207 | } |
208 | - $html .='</a>'; |
|
208 | + $html .= '</a>'; |
|
209 | 209 | |
210 | 210 | |
211 | 211 | return new MoufValidatorResult($status, $html); |
@@ -86,7 +86,7 @@ |
||
86 | 86 | * |
87 | 87 | * @return string |
88 | 88 | */ |
89 | - public function getLastErrorMessage(): ?string; |
|
89 | + public function getLastErrorMessage(): ? string; |
|
90 | 90 | |
91 | 91 | /** |
92 | 92 | * Returns the URL that can be used to edit this patch. |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace Mouf\Utils\Patcher; |
5 | 5 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $patches = $this->patchService->getView(); |
55 | 55 | |
56 | 56 | $rows = array_map(function($row) { |
57 | - return [ $row['uniqueName'], $this->renderStatus($row['status']), $row['patch_type'] ?: '(default)' ]; |
|
57 | + return [$row['uniqueName'], $this->renderStatus($row['status']), $row['patch_type'] ?: '(default)']; |
|
58 | 58 | }, $patches); |
59 | 59 | |
60 | 60 | $table = new Table($output); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $patchService = InstallUtils::getOrCreateInstance('patchService', PatchService::class, $moufManager); |
40 | 40 | |
41 | 41 | if (empty($patchService->getConstructorArgumentProperty('types')->getValue())) { |
42 | - $patchService->getConstructorArgumentProperty('types')->setValue([ $patchDefaultType, $patchTestDataType ]); |
|
42 | + $patchService->getConstructorArgumentProperty('types')->setValue([$patchDefaultType, $patchTestDataType]); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | $consoleUtils = new ConsoleUtils($moufManager); |