@@ -44,9 +44,9 @@ |
||
44 | 44 | * @override \ComponentManager\PackageSource\PackageSource |
45 | 45 | */ |
46 | 46 | public function obtainPackage($tempDirectory, |
47 | - ResolvedComponentVersion $resolvedComponentVersion, |
|
48 | - Filesystem $filesystem, |
|
49 | - LoggerInterface $logger) { |
|
47 | + ResolvedComponentVersion $resolvedComponentVersion, |
|
48 | + Filesystem $filesystem, |
|
49 | + LoggerInterface $logger) { |
|
50 | 50 | $componentVersion = $resolvedComponentVersion->getVersion(); |
51 | 51 | |
52 | 52 | $sources = $componentVersion->getSources(); |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | * @return string |
81 | 81 | */ |
82 | 82 | protected function getArchiveFilename(Component $component, |
83 | - ComponentVersion $version) { |
|
83 | + ComponentVersion $version) { |
|
84 | 84 | return sprintf(static::ARCHIVE_FILENAME_FORMAT, $component->getName(), |
85 | - $version->getVersion()); |
|
85 | + $version->getVersion()); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -94,18 +94,18 @@ discard block |
||
94 | 94 | * @return string |
95 | 95 | */ |
96 | 96 | protected function getTargetDirectory(Component $component, |
97 | - ComponentVersion $version) { |
|
97 | + ComponentVersion $version) { |
|
98 | 98 | return sprintf(static::TARGET_DIRECTORY_FORMAT, $component->getName(), |
99 | - $version->getVersion()); |
|
99 | + $version->getVersion()); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
103 | 103 | * @override \ComponentManager\PackageSource\PackageSource |
104 | 104 | */ |
105 | 105 | public function obtainPackage($tempDirectory, |
106 | - ResolvedComponentVersion $resolvedComponentVersion, |
|
107 | - Filesystem $filesystem, |
|
108 | - LoggerInterface $logger) { |
|
106 | + ResolvedComponentVersion $resolvedComponentVersion, |
|
107 | + Filesystem $filesystem, |
|
108 | + LoggerInterface $logger) { |
|
109 | 109 | $component = $resolvedComponentVersion->getComponent(); |
110 | 110 | $version = $resolvedComponentVersion->getVersion(); |
111 | 111 | $sources = $version->getSources(); |
@@ -171,14 +171,14 @@ discard block |
||
171 | 171 | * @throws InstallationFailureException |
172 | 172 | */ |
173 | 173 | protected function trySource($tempDirectory, LoggerInterface $logger, |
174 | - Component $component, ComponentVersion $version, |
|
175 | - ZipComponentSource $source) { |
|
174 | + Component $component, ComponentVersion $version, |
|
175 | + ZipComponentSource $source) { |
|
176 | 176 | $archiveFilename = $tempDirectory |
177 | - . PlatformUtil::directorySeparator() |
|
178 | - . $this->getArchiveFilename($component, $version); |
|
177 | + . PlatformUtil::directorySeparator() |
|
178 | + . $this->getArchiveFilename($component, $version); |
|
179 | 179 | $targetDirectory = $tempDirectory |
180 | - . PlatformUtil::directorySeparator() |
|
181 | - . $this->getTargetDirectory($component, $version); |
|
180 | + . PlatformUtil::directorySeparator() |
|
181 | + . $this->getTargetDirectory($component, $version); |
|
182 | 182 | |
183 | 183 | $logger->debug('Trying zip source', [ |
184 | 184 | 'archiveFilename' => $archiveFilename, |
@@ -212,8 +212,8 @@ discard block |
||
212 | 212 | } |
213 | 213 | |
214 | 214 | $moduleRootDirectory = $targetDirectory |
215 | - . PlatformUtil::directorySeparator() |
|
216 | - . $component->getPluginName(); |
|
215 | + . PlatformUtil::directorySeparator() |
|
216 | + . $component->getPluginName(); |
|
217 | 217 | if (!is_dir($moduleRootDirectory)) { |
218 | 218 | throw new InstallationFailureException( |
219 | 219 | "Module directory {$moduleRootDirectory} did not exist", |
@@ -39,9 +39,9 @@ |
||
39 | 39 | * @override \ComponentManager\PackageSource\PackageSource |
40 | 40 | */ |
41 | 41 | public function obtainPackage($tempDirectory, |
42 | - ResolvedComponentVersion $resolvedComponentVersion, |
|
43 | - Filesystem $filesystem, |
|
44 | - LoggerInterface $logger) { |
|
42 | + ResolvedComponentVersion $resolvedComponentVersion, |
|
43 | + Filesystem $filesystem, |
|
44 | + LoggerInterface $logger) { |
|
45 | 45 | $version = $resolvedComponentVersion->getVersion(); |
46 | 46 | $sources = $version->getSources(); |
47 | 47 |
@@ -77,7 +77,7 @@ |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | $path = $this->rootDirectory . PlatformUtil::directorySeparator() |
80 | - . static::CONFIG_FILENAME; |
|
80 | + . static::CONFIG_FILENAME; |
|
81 | 81 | if (is_file($path)) { |
82 | 82 | require_once $path; |
83 | 83 |
@@ -45,8 +45,8 @@ |
||
45 | 45 | ->setHelp(static::HELP) |
46 | 46 | ->setDefinition(new InputDefinition([ |
47 | 47 | new InputArgument(Argument::ARGUMENT_ACTION, |
48 | - InputArgument::REQUIRED, |
|
49 | - Argument::ARGUMENT_ACTION_HELP), |
|
48 | + InputArgument::REQUIRED, |
|
49 | + Argument::ARGUMENT_ACTION_HELP), |
|
50 | 50 | new InputOption(Argument::ARGUMENT_MOODLE_DIR, null, |
51 | 51 | InputOption::VALUE_REQUIRED, |
52 | 52 | Argument::ARGUMENT_MOODLE_DIR_HELP), |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | const HELP = <<<HELP |
35 | 35 | Queries properties of the Moodle installation in the present working directory. |
36 | -HELP; |
|
36 | +help; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @override \Symfony\Component\Console\Command\Command |
@@ -62,12 +62,12 @@ |
||
62 | 62 | |
63 | 63 | $tempDirectory = PlatformUtil::createTempDirectory(); |
64 | 64 | $archive = $tempDirectory |
65 | - . PlatformUtil::directorySeparator() |
|
66 | - . 'moodle.zip'; |
|
65 | + . PlatformUtil::directorySeparator() |
|
66 | + . 'moodle.zip'; |
|
67 | 67 | $destination = $tempDirectory |
68 | - . PlatformUtil::directorySeparator() . 'moodle'; |
|
68 | + . PlatformUtil::directorySeparator() . 'moodle'; |
|
69 | 69 | $projectLockFilename = $destination . PlatformUtil::directorySeparator() |
70 | - . 'componentmgr.lock.json'; |
|
70 | + . 'componentmgr.lock.json'; |
|
71 | 71 | |
72 | 72 | /** @var \Symfony\Component\Filesystem\Filesystem $filesystem */ |
73 | 73 | $filesystem = $this->container->get('filesystem'); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | const HELP = <<<HELP |
30 | 30 | Packages a Moodle site from a project file. |
31 | -HELP; |
|
31 | +help; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @override \ComponentManager\Command\AbstractCommand |
@@ -44,8 +44,8 @@ |
||
44 | 44 | ->setHelp(static::HELP) |
45 | 45 | ->setDefinition(new InputDefinition([ |
46 | 46 | new InputArgument(Argument::ARGUMENT_SCRIPT, |
47 | - InputArgument::REQUIRED, |
|
48 | - Argument::ARGUMENT_SCRIPT_HELP), |
|
47 | + InputArgument::REQUIRED, |
|
48 | + Argument::ARGUMENT_SCRIPT_HELP), |
|
49 | 49 | ])); |
50 | 50 | } |
51 | 51 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | const HELP = <<<HELP |
34 | 34 | Executes the specified script for a component. |
35 | -HELP; |
|
35 | +help; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * @override \Symfony\Component\Console\Command\Command |
@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | const HELP = <<<HELP |
39 | 39 | Installs, into the Moodle installation in the present working directory, all of the components listed in its componentmgr.json file. |
40 | -HELP; |
|
40 | +help; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @override \Symfony\Component\Console\Command\Command |
@@ -74,16 +74,16 @@ |
||
74 | 74 | if ($this->project === null) { |
75 | 75 | if ($projectFilename === null) { |
76 | 76 | $projectFilename = PlatformUtil::workingDirectory() |
77 | - . PlatformUtil::directorySeparator() |
|
78 | - . 'componentmgr.json'; |
|
77 | + . PlatformUtil::directorySeparator() |
|
78 | + . 'componentmgr.json'; |
|
79 | 79 | } else { |
80 | 80 | $projectFilename = PlatformUtil::expandPath($projectFilename); |
81 | 81 | } |
82 | 82 | |
83 | 83 | if ($projectLockFilename === null) { |
84 | 84 | $projectLockFilename = PlatformUtil::workingDirectory() |
85 | - . PlatformUtil::directorySeparator() |
|
86 | - . 'componentmgr.lock.json'; |
|
85 | + . PlatformUtil::directorySeparator() |
|
86 | + . 'componentmgr.lock.json'; |
|
87 | 87 | } else { |
88 | 88 | $projectLockFilename = PlatformUtil::expandPath( |
89 | 89 | $projectLockFilename); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @return \ComponentManager\Moodle |
53 | 53 | */ |
54 | - protected function getMoodle($moodleDirectory=null) { |
|
54 | + protected function getMoodle($moodleDirectory = null) { |
|
55 | 55 | if ($this->moodle === null) { |
56 | 56 | $moodleDirectory = ($moodleDirectory === null) |
57 | 57 | ? PlatformUtil::workingDirectory() : $moodleDirectory; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * |
71 | 71 | * @return \ComponentManager\Project\Project |
72 | 72 | */ |
73 | - protected function getProject($projectFilename=null, $projectLockFilename=null) { |
|
73 | + protected function getProject($projectFilename = null, $projectLockFilename = null) { |
|
74 | 74 | if ($this->project === null) { |
75 | 75 | if ($projectFilename === null) { |
76 | 76 | $projectFilename = PlatformUtil::workingDirectory() |