Skip to content

Commit

Permalink
add support for arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 29, 2024
1 parent e1c1ec6 commit b2551ee
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Illuminate/Foundation/Configuration/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function map($from, $to = null)
* @param \Psr\Log\LogLevel::* $level
* @return $this
*/
public function level($type, $level)
public function level(string $type, string $level)
{
$this->handler->level($type, $level);

Expand All @@ -100,12 +100,14 @@ public function context(Closure $contextCallback)
/**
* Indicate that the given exception type should not be reported.
*
* @param string $class
* @param array|string $class
* @return $this
*/
public function dontReport(string $class)
public function dontReport(array|string $class)
{
$this->handler->dontReport($class);
foreach (Arr::wrap($class) as $exceptionClass) {

Check failure on line 108 in src/Illuminate/Foundation/Configuration/Exceptions.php

View workflow job for this annotation

GitHub Actions / Source Code

Call to static method wrap() on an unknown class Illuminate\Foundation\Configuration\Arr.
$this->handler->dontReport($exceptionClass);
}

return $this;
}
Expand All @@ -128,7 +130,7 @@ public function dontReportDuplicates()
* @param array|string $attributes
* @return $this
*/
public function dontFlash($attributes)
public function dontFlash(array|string $attributes)
{
$this->handler->dontFlash($attributes);

Expand Down

0 comments on commit b2551ee

Please sign in to comment.