Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jul 21, 2017
1 parent 33e80fc commit 56f103c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/Illuminate/View/ViewServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,32 @@ public function registerFactory()

$finder = $app['view.finder'];

$env = $this->newFactory($resolver, $finder, $app['events']);
$factory = $this->createFactory($resolver, $finder, $app['events']);

// We will also set the container instance on this view environment since the
// view composers may be classes registered in the container, which allows
// for great testable, flexible composers for the application developer.
$env->setContainer($app);
$factory->setContainer($app);

$env->share('app', $app);
$factory->share('app', $app);

return $env;
return $factory;
});
}

/**
* Create a new Factory Instance.
*
* @param \Illuminate\View\Engines\EngineResolver $resolver
* @param \Illuminate\View\ViewFinderInterface $finder
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return \Illuminate\View\Factory
*/
protected function createFactory($resolver, $finder, $events)
{
return new Factory($resolver, $finder, $events);
}

/**
* Register the view finder implementation.
*
Expand Down Expand Up @@ -133,17 +146,4 @@ public function registerBladeEngine($resolver)
return new CompilerEngine($this->app['blade.compiler']);
});
}

/**
* Create a new Factory Instance.
*
* @param \Illuminate\View\Engines\EngineResolver $resolver
* @param \Illuminate\View\ViewFinderInterface $finder
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return \Illuminate\View\Factory
*/
protected function newFactory($resolver, $finder, $events)
{
return new Factory($resolver, $finder, $events);
}
}

0 comments on commit 56f103c

Please sign in to comment.