1 | <?php |
||
27 | class PhpStormHelperApplication extends Application |
||
28 | { |
||
29 | 5 | public function __construct() |
|
30 | { |
||
31 | 5 | parent::__construct('phpstorm-helper', '@application_version@'); |
|
32 | |||
33 | 5 | $filesystem = new Filesystem(); |
|
34 | 5 | $domHelper = new DomHelper(); |
|
35 | |||
36 | 5 | $this->addCommands([ |
|
37 | 5 | new ConfigureCommand( |
|
38 | 5 | new StructureConfigurator($filesystem), |
|
39 | 5 | new GitignoreHelper($filesystem, [ |
|
40 | 5 | file_get_contents(__DIR__ . '/Resources/gitignore-rules.txt'), |
|
41 | ]), |
||
42 | 5 | new ConfigurationOptionFinder($domHelper), |
|
43 | 5 | new WorkspaceConfigurationHelper($domHelper, $filesystem) |
|
44 | ), |
||
45 | 5 | new ConfigureInstallationCommand( |
|
46 | 5 | new ExternalToolsConfigurationHelper(new DirectoryResolver(), $filesystem, $domHelper), |
|
47 | 5 | new PluginDownloader(new DirectoryResolver(), $this->createZippy(), new Client(), $filesystem) |
|
48 | ), |
||
49 | 5 | $this->createSelfUpdateCommand(), |
|
50 | ]); |
||
51 | 5 | } |
|
52 | |||
53 | 5 | private function createZippy() |
|
64 | |||
65 | 5 | private function createSelfUpdateCommand(): SelfUpdateCommand |
|
77 | } |
||
78 |