Skip to content

Commit

Permalink
Merge pull request barryvdh#336 from Tjoosten/master
Browse files Browse the repository at this point in the history
Raplce and & or
  • Loading branch information
barryvdh committed Apr 21, 2015
2 parents 0576b25 + 6c22a2b commit 813c5a9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function () use ($debugbar) {
$this->addCollector(new RequestDataCollector());
}

if ($this->shouldCollect('events', false) and isset($this->app['events'])) {
if ($this->shouldCollect('events', false) && isset($this->app['events'])) {
try {
$startTime = defined('LARAVEL_START') ? LARAVEL_START : null;
$eventCollector = new EventCollector($startTime);
Expand All @@ -182,7 +182,7 @@ function () use ($debugbar) {
}
}

if ($this->shouldCollect('views', true) and isset($this->app['events'])) {
if ($this->shouldCollect('views', true) && isset($this->app['events'])) {
try {
$collectData = $this->app['config']->get('debugbar.options.views.data', true);
$this->addCollector(new ViewCollector($collectData));
Expand Down Expand Up @@ -251,7 +251,7 @@ function ($level, $message, $context) use ($logger) {
}
}

if ($this->shouldCollect('db', true) and isset($this->app['db'])) {
if ($this->shouldCollect('db', true) && isset($this->app['db'])) {
$db = $this->app['db'];
if ($debugbar->hasCollector('time') && $this->app['config']->get(
'debugbar.options.db.timeline',
Expand Down Expand Up @@ -305,7 +305,7 @@ function ($query, $bindings, $time, $connectionName) use ($db, $queryCollector)
try {
$mailer = $this->app['mailer']->getSwiftMailer();
$this->addCollector(new SwiftMailCollector($mailer));
if ($this->app['config']->get('debugbar.options.mail.full_log') and $this->hasCollector(
if ($this->app['config']->get('debugbar.options.mail.full_log') && $this->hasCollector(
'messages'
)
) {
Expand Down Expand Up @@ -437,7 +437,7 @@ public function getJavascriptRenderer($baseUrl = null, $basePath = null)
public function modifyResponse($request, $response)
{
$app = $this->app;
if ($app->runningInConsole() or !$this->isEnabled() || $this->isDebugbarRequest()) {
if ($app->runningInConsole() || !$this->isEnabled() || $this->isDebugbarRequest()) {
return $response;
}

Expand Down Expand Up @@ -476,7 +476,7 @@ public function modifyResponse($request, $response)
}
}

if ($this->shouldCollect('symfony_request', true) and !$this->hasCollector('request')) {
if ($this->shouldCollect('symfony_request', true) && !$this->hasCollector('request')) {
try {
$this->addCollector(new SymfonyRequestCollector($request, $response, $sessionManager));
} catch (\Exception $e) {
Expand All @@ -497,7 +497,7 @@ public function modifyResponse($request, $response)
$app['log']->error('Debugbar exception: ' . $e->getMessage());
}
} elseif (
$this->isJsonRequest($request) and
$this->isJsonRequest($request) &&
$app['config']->get('debugbar.capture_ajax', true)
) {
try {
Expand All @@ -506,7 +506,7 @@ public function modifyResponse($request, $response)
$app['log']->error('Debugbar exception: ' . $e->getMessage());
}
} elseif (
($response->headers->has('Content-Type') and
($response->headers->has('Content-Type') &&
strpos($response->headers->get('Content-Type'), 'html') === false)
|| $request->getRequestFormat() !== 'html'
) {
Expand Down Expand Up @@ -548,7 +548,7 @@ protected function isDebugbarRequest()
{
return $this->app['request']->segment(1) == '_debugbar';
}

/**
* @param \Symfony\Component\HttpFoundation\Request $request
* @return bool
Expand Down

0 comments on commit 813c5a9

Please sign in to comment.