Aggiornato Composer
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user