Gets the essential information for debugging

@return string The report for debugging
551094
public static function toDebugReport()
    {
        $report  = "PHP SDK (SquareConnect) Debug Report:\n";
        $report .= "    OS: ".php_uname()."\n";
        $report .= "    PHP Version: ".phpversion()."\n";
        $report .= "    OpenAPI Spec Version: 2.0\n";
        $report .= "    SDK Package Version: 2.20190410.1\n";
        $report .= "    Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n";

        return $report;
    }
545543
public static function pre()
    {
        $nbArgs = func_num_args();
        
        $content = '';
        for ($i = 0; $i < $nbArgs; $i++) {
            $mixed = func_get_arg($i);
            
            $content .= print_r($mixed, 1);
        }
        
        if (php_sapi_name() == 'cli') {
            $output = $content;
        }
        else {
            $output = '<pre class="debug">' . $content . '</pre>';
        }
        
        return $output;
    }
606894
public function debugInfo()
    {
        return [
            'exists' => $this->exists(),
            'isFile' => $this->isFile(),
            'isImage' => $this->isImage(),
            'path' => $this->path,
            'lastModified' => $this->lastModified,
            'name' => $this->name,
            'dir' => $this->dir,
            'mimeType' => $this->mimeType,
            'extension' => $this->extension,
            'size' => $this->size,
            'type' => $this->type,
            'getFullName' => $this->getFullName()
        ];
    }
956868
public static function get_reports()
    {
        $reports = ClassInfo::subclassesFor(get_called_class());

        $reportsArray = [];
        if ($reports && count($reports) > 0) {
            $excludedReports = static::get_excluded_reports();
            // Collect reports into array with an attribute for 'sort'
            foreach ($reports as $report) {
                // Don't use the Report superclass, or any excluded report classes
                if (in_array($report, $excludedReports)) {
                    continue;
                }
                $reflectionClass = new ReflectionClass($report);
                // Don't use abstract classes
                if ($reflectionClass->isAbstract()) {
                    continue;
                }

                /** @var Report $reportObj */
                $reportObj = $report::create();
                if ($reportObj->hasMethod('sort')) {
                    // Use the sort method to specify the sort field
                    $reportObj->sort = $reportObj->sort();
                }
                $reportsArray[$report] = $reportObj;
            }
        }

        uasort($reportsArray, function ($a, $b) {
            if ($a->sort == $b->sort) {
                return 0;
            } else {
                return ($a->sort < $b->sort) ? -1 : 1;
            }
        });

        return $reportsArray;
    }
1194921
private function getBacktraceUse()
    {
        $debugBacktrace = collect(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 30))->filter(function ($backtrace) {
            $backtraceClass = (isset($backtrace['class'])) ? $backtrace['class'] : null;

            return $backtraceClass === $this->listenClass;
        })->first();
        $checkBacktrace = null;
        $backtraceFile = (isset($debugBacktrace['file'])) ? $debugBacktrace['file'] : null;
        $backtraceFunction = (isset($debugBacktrace['function'])) ? $debugBacktrace['function'] : null;
        if (!is_null($debugBacktrace) && str_contains($backtraceFile, 'Illuminate/Database/Eloquent/SoftDeletingScope.php') && $backtraceFunction == 'update') {
            $checkBacktrace = [
                'object'   => $debugBacktrace['object'],
                'function' => $debugBacktrace['function'],
                'args'     => $debugBacktrace['args'][0],
            ];
        }

        return $checkBacktrace;
    }
1241252
public function __trace()
    {
        $info['_attributes'] = $this->_attributes;
        $info['_changes'] = $this->_changes;
        $info['_checked'] = $this->_checked;
//        $info['_proto'] = $this->_proto;
//        $info['_parent'] = $this->_parent;
        $info['_children'] = $this->_children;

//        if ($this->_errors) $info['_errors'] = $this->_errors->toArrayCompact(false);
        return $info;
    }
1154730
public function debug()
	{
	    $errorToreturn = '';
		if($this->_debug && $this->hasError() ){
			$message = $this->getMessage();
			$trace = $this->getTrace();
			$critical = $this->getCritical();

			for($i= 0, $count = sizeOf($message); $i<$count;$i++ ) {

				if($critical[$i]){
                    echo '<strong style="color:red">';
				} else  {
					continue;
				}

				CheckoutApi_Utility_Utilities::dump($message[$i] .'==> { ');
				
				foreach($trace[$i] as $errorIndex => $errors) {
                    echo   "<pre>";
                    echo    $errorIndex ."=>  "; print_r($errors);

                    echo   "</pre>";
				}
				
				if($critical[$i])	{
                    echo   '</strong>';
				}
				
				CheckoutApi_Utility_Utilities::dump('} ');
				
			}
			
		}
		return $errorToreturn;
	}
367919
public function getSeverityDescriptionString()
    {
        $returnValue = (string) '';

        switch ($this->severity) {
        	case common_Logger::TRACE_LEVEL:
        		$returnValue = "TRACE";break;
        	case common_Logger::DEBUG_LEVEL:
        		$returnValue = "DEBUG";break;
        	case common_Logger::INFO_LEVEL:
        		$returnValue = "INFO";break;
        	case common_Logger::WARNING_LEVEL:
        		$returnValue = "WARNING";break;
        	case common_Logger::ERROR_LEVEL:
        		$returnValue = "ERROR";break;
        	case common_Logger::FATAL_LEVEL:
        		$returnValue = "FATAL";break;
        	default:
        		$returnValue = "UNKNOWN";
        }

        return (string) $returnValue;
    }
998067
private function _info()
    {
        if (empty($this->_output)) {
            return;
        }
        $model = array();
        $percCharge = array();
        $lines = explode(PHP_EOL, implode($this->_output));
        if (count($lines)>1) {
            $model = explode('FW:', $lines[1]);
            if (strpos($model[0], 'InternalBattery') === false) {
                $dev = new UPSDevice();
                $percCharge = explode(';', $lines[1]);
                $dev->setName('UPS');
                if ($model !== false) {
                    $dev->setModel(substr(trim($model[0]), 1));
                }
                if ($percCharge !== false) {
                    $dev->setBatterCharge(trim(substr($percCharge[0], -4, 3)));
                    $dev->setStatus(trim($percCharge[1]));
                    if (isset($percCharge[2])) {
                        $time = explode(':', $percCharge[2]);
                        $hours = $time[0];
                        $minutes = $hours*60+substr($time[1], 0, 2);
                        $dev->setTimeLeft($minutes);
                    }
                }
                $dev->setMode("pmset");
                $this->upsinfo->setUpsDevices($dev);
            }
        }
    }
812028
public function ___debugInfo()
    {
        return array(
            'name'  => isset($this->propertyNode) ? $this->propertyNode->name->toString() : 'unknown',
            'class' => $this->className
        );
    }
925147
public function getStatus()
    {
        $reports = [];
        $solrConnections = GeneralUtility::makeInstance(ConnectionManager::class)->getAllConnections();

        foreach ($solrConnections as $solrConnection) {
            $adminService = $solrConnection->getAdminService();
            if ($adminService->ping()) {
                $installationStatus = $this->checkPluginInstallationStatus($adminService);
                $versionStatus = $this->checkPluginVersion($adminService);

                if (!is_null($installationStatus)) {
                    $reports[] = $installationStatus;
                }

                if (!is_null($versionStatus)) {
                    $reports[] = $versionStatus;
                }
            }
        }

        return $reports;
    }
447231
protected function _getCallerInfo()
	{
		if (!function_exists('debug_backtrace')) {
			return null;
		}

		$backtrace = debug_backtrace();
		$info = array();
		$continue = true;

		while ($continue && next($backtrace)) {

			$step = current($backtrace);
			$class = @$step['class'];

			// We're looking for something outside of language.php
			if ($class != 'AnLanguage' && $class != 'AnTranslate') {

                $info['function']	= @$step['function'];
				$info['class']		= $class;
				$info['step']		= prev($backtrace);

				// Determine the file and name of the file
				$info['file'] = @ $step['file'];
				$info['line'] = @ $step['line'];

				$continue = false;
			}
		}

		return $info;
	}
289251
public static function debugTrail() {
		$trail = debug_backtrace();
		$trail = array_reverse($trail);
		array_pop($trail);

		$path = array();
		foreach ($trail as $dat) {
			$pathFragment = $dat['class'] . $dat['type'] . $dat['function'];
				// add the path of the included file
			if (in_array($dat['function'], array('require', 'include', 'require_once', 'include_once'))) {
				$pathFragment .= '(' . substr($dat['args'][0], strlen(PATH_site)) . '),' . substr($dat['file'], strlen(PATH_site));
			}
			$path[] = $pathFragment . '#' . $dat['line'];
		}

		return implode(' // ', $path);
	}
222836
def debug(self):
        ''''''
        url = '{}/debug/status'.format(self.url)
        data = self._get(url)
        return data.json()
1185439
public function debugGet() {
		$aResult = $this->_coll()->findOne([static::$_mKey => $this->_mID]);
		unset($aResult[static::$_mKey]);
		return $aResult;
	}
1027979
public static function getReportArray()
    {
        $composerArray = self::getComposerArray();
        $packages = self::getPackagesAndDependencies($composerArray['require']);
        $version = self::getDecomposerVersion($composerArray, $packages);

        $reportArray['Server Environment'] = self::getServerEnv();
        $reportArray['Laravel Environment'] = self::getLaravelEnv($version);
        $reportArray['Installed Packages'] = self::getPackagesArray($composerArray['require']);

        empty(self::getExtraStats()) ? '' : $reportArray['Extra Stats'] = self::getExtraStats();

        return $reportArray;
    }
1020615
public function info()
    {
        $data = [
            'displayName' => [
                'value' => $this->name
            ],
            'spanId' => $this->spanId,
            'startTime' => $this->startTime,
            'endTime' => $this->endTime
        ];
        if ($this->parentSpanId) {
            $data['parentSpanId'] = $this->parentSpanId;
        }
        if ($this->attributes) {
            $data['attributes'] = $this->attributes->info();
        }
        if ($this->timeEvents) {
            $data['timeEvents'] = [
                'timeEvent' => array_map(function ($timeEvent) {
                    return $timeEvent->info();
                }, $this->timeEvents)
            ];
        }
        if ($this->links) {
            $data['links'] = [
                'link' => array_map(function ($link) {
                    return $link->info();
                }, $this->links)
            ];
        }
        if ($this->status) {
            $data['status'] = $this->status->info();
        }
        if ($this->stackTrace) {
            $data['stackTrace'] = $this->stackTrace->info();
        }
        if ($this->sameProcessAsParentSpan !== null) {
            $data['sameProcessAsParentSpan'] = $this->sameProcessAsParentSpan;
        }
        return $data;
    }