Skip to content

Commit 1764ff7

Browse files
committed
formatting
1 parent cba2b53 commit 1764ff7

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

src/Illuminate/Foundation/Application.php

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -767,25 +767,11 @@ public function registerDeferredProvider($provider, $service = null)
767767
*/
768768
public function make($abstract, array $parameters = [])
769769
{
770-
$abstract = $this->getAlias($abstract);
771-
772-
$this->loadDeferredProviderIfNeeded($abstract);
770+
$this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
773771

774772
return parent::make($abstract, $parameters);
775773
}
776774

777-
/**
778-
* Load deferred provider if $abstract is deferred service and instance was not loaded.
779-
*
780-
* @param string $abstract
781-
*/
782-
private function loadDeferredProviderIfNeeded($abstract)
783-
{
784-
if ($this->isDeferredService($abstract) && ! isset($this->instances[$abstract])) {
785-
$this->loadDeferredProvider($abstract);
786-
}
787-
}
788-
789775
/**
790776
* Resolve the given type from the container.
791777
*
@@ -798,13 +784,24 @@ private function loadDeferredProviderIfNeeded($abstract)
798784
*/
799785
protected function resolve($abstract, $parameters = [], $raiseEvents = true)
800786
{
801-
$abstract = $this->getAlias($abstract);
802-
803-
$this->loadDeferredProviderIfNeeded($abstract);
787+
$this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
804788

805789
return parent::resolve($abstract, $parameters, $raiseEvents);
806790
}
807791

792+
/**
793+
* Load the deferred provider if the given type is a deferred service and the instance has not been loaded.
794+
*
795+
* @param string $abstract
796+
* @return void
797+
*/
798+
protected function loadDeferredProviderIfNeeded($abstract)
799+
{
800+
if ($this->isDeferredService($abstract) && ! isset($this->instances[$abstract])) {
801+
$this->loadDeferredProvider($abstract);
802+
}
803+
}
804+
808805
/**
809806
* Determine if the given abstract type has been bound.
810807
*

0 commit comments

Comments
 (0)