@@ -164,7 +164,7 @@ function () use ($debugbar) {
164
164
$ this ->addCollector (new RequestDataCollector ());
165
165
}
166
166
167
- if ($ this ->shouldCollect ('events ' , false ) and isset ($ this ->app ['events ' ])) {
167
+ if ($ this ->shouldCollect ('events ' , false ) && isset ($ this ->app ['events ' ])) {
168
168
try {
169
169
$ startTime = defined ('LARAVEL_START ' ) ? LARAVEL_START : null ;
170
170
$ eventCollector = new EventCollector ($ startTime );
@@ -182,7 +182,7 @@ function () use ($debugbar) {
182
182
}
183
183
}
184
184
185
- if ($ this ->shouldCollect ('views ' , true ) and isset ($ this ->app ['events ' ])) {
185
+ if ($ this ->shouldCollect ('views ' , true ) && isset ($ this ->app ['events ' ])) {
186
186
try {
187
187
$ collectData = $ this ->app ['config ' ]->get ('debugbar.options.views.data ' , true );
188
188
$ this ->addCollector (new ViewCollector ($ collectData ));
@@ -251,7 +251,7 @@ function ($level, $message, $context) use ($logger) {
251
251
}
252
252
}
253
253
254
- if ($ this ->shouldCollect ('db ' , true ) and isset ($ this ->app ['db ' ])) {
254
+ if ($ this ->shouldCollect ('db ' , true ) && isset ($ this ->app ['db ' ])) {
255
255
$ db = $ this ->app ['db ' ];
256
256
if ($ debugbar ->hasCollector ('time ' ) && $ this ->app ['config ' ]->get (
257
257
'debugbar.options.db.timeline ' ,
@@ -305,7 +305,7 @@ function ($query, $bindings, $time, $connectionName) use ($db, $queryCollector)
305
305
try {
306
306
$ mailer = $ this ->app ['mailer ' ]->getSwiftMailer ();
307
307
$ this ->addCollector (new SwiftMailCollector ($ mailer ));
308
- if ($ this ->app ['config ' ]->get ('debugbar.options.mail.full_log ' ) and $ this ->hasCollector (
308
+ if ($ this ->app ['config ' ]->get ('debugbar.options.mail.full_log ' ) && $ this ->hasCollector (
309
309
'messages '
310
310
)
311
311
) {
@@ -476,7 +476,7 @@ public function modifyResponse($request, $response)
476
476
}
477
477
}
478
478
479
- if ($ this ->shouldCollect ('symfony_request ' , true ) and !$ this ->hasCollector ('request ' )) {
479
+ if ($ this ->shouldCollect ('symfony_request ' , true ) && !$ this ->hasCollector ('request ' )) {
480
480
try {
481
481
$ this ->addCollector (new SymfonyRequestCollector ($ request , $ response , $ sessionManager ));
482
482
} catch (\Exception $ e ) {
@@ -497,7 +497,7 @@ public function modifyResponse($request, $response)
497
497
$ app ['log ' ]->error ('Debugbar exception: ' . $ e ->getMessage ());
498
498
}
499
499
} elseif (
500
- $ this ->isJsonRequest ($ request ) and
500
+ $ this ->isJsonRequest ($ request ) &&
501
501
$ app ['config ' ]->get ('debugbar.capture_ajax ' , true )
502
502
) {
503
503
try {
@@ -506,7 +506,7 @@ public function modifyResponse($request, $response)
506
506
$ app ['log ' ]->error ('Debugbar exception: ' . $ e ->getMessage ());
507
507
}
508
508
} elseif (
509
- ($ response ->headers ->has ('Content-Type ' ) and
509
+ ($ response ->headers ->has ('Content-Type ' ) &&
510
510
strpos ($ response ->headers ->get ('Content-Type ' ), 'html ' ) === false )
511
511
|| $ request ->getRequestFormat () !== 'html '
512
512
) {
@@ -548,7 +548,7 @@ protected function isDebugbarRequest()
548
548
{
549
549
return $ this ->app ['request ' ]->segment (1 ) == '_debugbar ' ;
550
550
}
551
-
551
+
552
552
/**
553
553
* @param \Symfony\Component\HttpFoundation\Request $request
554
554
* @return bool
0 commit comments