11<?php
2+
23/**
34 * Copyright © Magento, Inc. All rights reserved.
45 * See COPYING.txt for license details.
56 */
7+
68namespace Magento \Setup \Console \Command ;
79
810use Magento \Framework \App \ObjectManager ;
3032 */
3133class DiCompileCommand extends Command
3234{
33- /** Command name */
34- const NAME = 'setup:di:compile ' ;
35+ public const NAME = 'setup:di:compile ' ;
3536
3637 /**
3738 * @var \Magento\Framework\App\DeploymentConfig
@@ -79,8 +80,6 @@ class DiCompileCommand extends Command
7980 private $ file ;
8081
8182 /**
82- * Constructor
83- *
8483 * @param DeploymentConfig $deploymentConfig
8584 * @param DirectoryList $directoryList
8685 * @param Manager $taskManager
@@ -89,6 +88,7 @@ class DiCompileCommand extends Command
8988 * @param DriverInterface $fileDriver
9089 * @param \Magento\Framework\Component\ComponentRegistrar $componentRegistrar
9190 * @param File|null $file
91+ *
9292 * @throws \Magento\Setup\Exception
9393 */
9494 public function __construct (
@@ -151,6 +151,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
151151 foreach ($ errors as $ line ) {
152152 $ output ->writeln ($ line );
153153 }
154+
154155 // we must have an exit code higher than zero to indicate something was wrong
155156 return Cli::RETURN_FAILURE ;
156157 }
@@ -224,13 +225,15 @@ function (OperationInterface $operation) use ($progressBar) {
224225 // we must have an exit code higher than zero to indicate something was wrong
225226 return Cli::RETURN_FAILURE ;
226227 }
228+
227229 return Cli::RETURN_SUCCESS ;
228230 }
229231
230232 /**
231233 * Build list of module path regexps which should be excluded from compilation
232234 *
233235 * @param string[] $modulePaths
236+ *
234237 * @return string[]
235238 */
236239 private function getExcludedModulePaths (array $ modulePaths )
@@ -251,6 +254,7 @@ private function getExcludedModulePaths(array $modulePaths)
251254 $ vendorPathsRegExps [] = $ vendorDir
252255 . '/(?: ' . join ('| ' , $ vendorModules ) . ') ' ;
253256 }
257+
254258 $ basePathsRegExps [] = preg_quote ($ basePath , '# ' )
255259 . '/(?: ' . join ('| ' , $ vendorPathsRegExps ) . ') ' ;
256260 }
@@ -266,6 +270,7 @@ private function getExcludedModulePaths(array $modulePaths)
266270 * Build list of library path regexps which should be excluded from compilation
267271 *
268272 * @param string[] $libraryPaths
273+ *
269274 * @return string[]
270275 */
271276 private function getExcludedLibraryPaths (array $ libraryPaths )
@@ -288,6 +293,7 @@ function ($libraryPath) {
288293 * Get excluded setup application paths
289294 *
290295 * @param string $setupPath
296+ *
291297 * @return string[]
292298 */
293299 private function getExcludedSetupPaths ($ setupPath )
@@ -301,6 +307,7 @@ private function getExcludedSetupPaths($setupPath)
301307 * Delete directories by their code from "var" directory
302308 *
303309 * @param array $directoryCodeList
310+ *
304311 * @return void
305312 */
306313 private function cleanupFilesystem ($ directoryCodeList )
@@ -314,6 +321,7 @@ private function cleanupFilesystem($directoryCodeList)
314321 * Configure Object Manager
315322 *
316323 * @param OutputInterface $output
324+ *
317325 * @return void
318326 */
319327 private function configureObjectManager (OutputInterface $ output )
@@ -365,6 +373,7 @@ private function configureObjectManager(OutputInterface $output)
365373 * Returns operations configuration
366374 *
367375 * @param array $compiledPathsList
376+ *
368377 * @return array
369378 */
370379 private function getOperationsConfiguration (
0 commit comments