8000 [9.x] Add support for lazy loading commands by paras-malhotra · Pull Request #34873 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

[9.x] Add support for lazy loading commands #34873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix styleci
  • Loading branch information
paras-malhotra committed Oct 17, 2020
commit 958d02b6c6a0921e783c8bd46d95fe67ce2853a7
2 changes: 1 addition & 1 deletion src/Illuminate/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public function resolveCommands($commands)
}

/**
* Set the Container Command Loader
* Set the Container Command Loader.
*
* @return $this
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Illuminate/Console/ContainerCommandLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ContainerCommandLoader implements CommandLoaderInterface

/**
* A map of command names to classes.
*
*
* @var array
*/
protected $commandMap;
Expand All @@ -42,7 +42,7 @@ public function __construct(ContainerInterface $container, array $commandMap)
*/
public function get(string $name)
{
if (!$this->has($name)) {
if (! $this->has($name)) {
throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
}

Expand All @@ -62,11 +62,11 @@ public function has(string $name)

/**
* Get the command names.
*
*
* @return string[]
*/
public function getNames()
{
return array_keys($this->commandMap);
}
}
}
0