Skip to content
Permalink
Browse files

formatting and method name change

  • Loading branch information
taylorotwell committed Jan 6, 2020
1 parent 0459c4b commit 9b73540cbe7ebb67b0a0a127743791511e5ae8fe
Showing with 12 additions and 12 deletions.
  1. +12 −12 src/Illuminate/Foundation/PackageManifest.php
@@ -59,36 +59,36 @@ public function __construct(Filesystem $files, $basePath, $manifestPath)
}

/**
* Get all of the $name values for all packages.
* Get all of the service provider class names for all packages.
*
* @param string $name
* @return array
*/
public function getRegisteredExtra($name)
public function providers()
{
return collect($this->getManifest())->flatMap(function ($configuration) use ($name) {
return (array) ($configuration[$name] ?? []);
})->filter()->all();
return $this->config('providers');
}

/**
* Get all of the service provider class names for all packages.
* Get all of the aliases for all packages.
*
* @return array
*/
public function providers()
public function aliases()
{
return $this->getRegisteredExtra('providers');
return $this->config('aliases');
}

/**
* Get all of the aliases for all packages.
* Get all of the values for all packages for the given configuration name.
*
* @param string $key
* @return array
*/
public function aliases()
public function config($key)
{
return $this->getRegisteredExtra('aliases');
return collect($this->getManifest())->flatMap(function ($configuration) use ($key) {
return (array) ($configuration[$key] ?? []);
})->filter()->all();
}

/**

0 comments on commit 9b73540

Please sign in to comment.
You can’t perform that action at this time.