55/**
66 * A default bootstrap for the Laravel framework
77 */
8- class Laravel implements BootstrapInterface, HooksInterface, RequestClassProviderInterface,
8+ class Laravel implements
9+ BootstrapInterface,
10+ HooksInterface,
11+ RequestClassProviderInterface,
912 ApplicationEnvironmentAwareInterface
1013{
1114 /**
@@ -21,15 +24,15 @@ class Laravel implements BootstrapInterface, HooksInterface, RequestClassProvide
2124 /**
2225 * Store the application
2326 *
24- * @var \Symfony\Component\HttpKernel\HttpKernelInterface
27+ * @var \Illuminate\Foundation\Application|null
2528 */
2629 protected $ app ;
2730
2831 /**
2932 * Instantiate the bootstrap, storing the $appenv
3033 *
3134 * @param string|null $appenv The environment your application will use to bootstrap (if any)
32- * @param $debug
35+ * @param boolean $debug
3336 */
3437 public function initialize ($ appenv , $ debug )
3538 {
@@ -42,7 +45,8 @@ public function initialize($appenv, $debug)
4245 /**
4346 * {@inheritdoc}
4447 */
45- public function requestClass () {
48+ public function requestClass ()
49+ {
4650 return '\Illuminate\Http\Request ' ;
4751 }
4852
@@ -53,7 +57,7 @@ public function getApplication()
5357 {
5458 if (file_exists ('bootstrap/autoload.php ' )) {
5559 require_once 'bootstrap/autoload.php ' ;
56- } else if (file_exists ('vendor/autoload.php ' )) {
60+ } elseif (file_exists ('vendor/autoload.php ' )) {
5761 require_once 'vendor/autoload.php ' ;
5862 }
5963
@@ -80,8 +84,8 @@ public function getApplication()
8084
8185 $ kernel = $ this ->app ->make ($ isLaravel ? 'Illuminate\Contracts\Http\Kernel ' : 'Laravel\Lumen\Application ' );
8286
83- $ this ->app ->afterResolving ('auth ' , function ($ auth ) {
84- $ auth ->extend ('session ' , function ($ app , $ name , $ config ) {
87+ $ this ->app ->afterResolving ('auth ' , function ($ auth ) {
88+ $ auth ->extend ('session ' , function ($ app , $ name , $ config ) {
8589 $ provider = $ app ['auth ' ]->createUserProvider ($ config ['provider ' ]);
8690 $ guard = new \PHPPM \Laravel \SessionGuard ($ name , $ provider , $ app ['session.store ' ], null , $ app );
8791 if (method_exists ($ guard , 'setCookieJar ' )) {
@@ -99,7 +103,7 @@ public function getApplication()
99103 });
100104
101105 $ app = $ this ->app ;
102- $ this ->app ->extend ('session.store ' , function () use ($ app ) {
106+ $ this ->app ->extend ('session.store ' , function () use ($ app ) {
103107 $ manager = $ app ['session ' ];
104108 return $ manager ->driver ();
105109 });
@@ -119,7 +123,7 @@ public function preHandle($app)
119123 * @param \Illuminate\Contracts\Foundation\Application $app
120124 */
121125 public function postHandle ($ app )
122- {
126+ {
123127 //check if this is a lumen framework, if so, do not reset
124128 //note that lumen does not have the getProvider method
125129 if (method_exists ($ this ->app , 'getProvider ' )) {
@@ -128,16 +132,14 @@ public function postHandle($app)
128132 $ this ->resetProvider ('\Illuminate\Cookie\CookieServiceProvider ' );
129133 $ this ->resetProvider ('\Illuminate\Session\SessionServiceProvider ' );
130134 }
131-
132135 }
133136
134137 /**
135138 * @param string $providerName
136139 */
137140 protected function resetProvider ($ providerName )
138141 {
139- if (!$ this ->app ->getProvider ($ providerName ))
140- {
142+ if (!$ this ->app ->getProvider ($ providerName )) {
141143 return ;
142144 }
143145
0 commit comments