JFIF  x x C         C     "        } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz        w !1AQ aq"2B #3Rbr{ gilour

File "BaseContextProviderDetector.php"

Full Path: /var/www/laravel_filter/vendor/spatie/flare-client-php/src/Context/BaseContextProviderDetector.php
File size: 699 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Spatie\FlareClient\Context;

class BaseContextProviderDetector implements ContextProviderDetector
{
    public function detectCurrentContext(): ContextProvider
    {
        if ($this->runningInConsole()) {
            return new ConsoleContextProvider($_SERVER['argv'] ?? []);
        }

        return new RequestContextProvider();
    }

    protected function runningInConsole(): bool
    {
        if (isset($_ENV['APP_RUNNING_IN_CONSOLE'])) {
            return $_ENV['APP_RUNNING_IN_CONSOLE'] === 'true';
        }

        if (isset($_ENV['FLARE_FAKE_WEB_REQUEST'])) {
            return false;
        }

        return in_array(php_sapi_name(), ['cli', 'phpdb']);
    }
}