forked from TYPO3/coding-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateCommand.php
More file actions
41 lines (34 loc) · 1.01 KB
/
Copy pathUpdateCommand.php
File metadata and controls
41 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 project.
*
* (c) 2019-2026 Benni Mack
* Simon Gilli
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CodingStandards\Console\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use TYPO3\CodingStandards\Setup;
/**
* @internal
*/
final class UpdateCommand extends Command
{
protected function configure(): void
{
$this->setName('update');
$this->setDescription('Update the TYPO3 rule sets');
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
$result = (new Setup($this->getTargetDir($input), new SymfonyStyle($input, $output)))->copyEditorConfig(true);
return $result ? 0 : 1;
}
}