Aggiornato Composer

This commit is contained in:
Paolo A
2024-05-17 12:24:19 +00:00
parent 4ac62108b5
commit ec201d75b2
2238 changed files with 38684 additions and 59785 deletions

View File

@@ -6,16 +6,19 @@
namespace Whoops\Exception;
use Whoops\Inspector\InspectorInterface;
class Formatter
{
/**
* Returns all basic information about the exception in a simple array
* for further convertion to other languages
* @param Inspector $inspector
* @param bool $shouldAddTrace
* @param InspectorInterface $inspector
* @param bool $shouldAddTrace
* @param array<callable> $frameFilters
* @return array
*/
public static function formatExceptionAsDataArray(Inspector $inspector, $shouldAddTrace)
public static function formatExceptionAsDataArray(InspectorInterface $inspector, $shouldAddTrace, array $frameFilters = [])
{
$exception = $inspector->getException();
$response = [
@@ -27,7 +30,7 @@ class Formatter
];
if ($shouldAddTrace) {
$frames = $inspector->getFrames();
$frames = $inspector->getFrames($frameFilters);
$frameData = [];
foreach ($frames as $frame) {
@@ -47,7 +50,7 @@ class Formatter
return $response;
}
public static function formatExceptionPlain(Inspector $inspector)
public static function formatExceptionPlain(InspectorInterface $inspector)
{
$message = $inspector->getException()->getMessage();
$frames = $inspector->getFrames();