| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * @codingStandardsIgnoreStart |
||||
| 4 | * |
||||
| 5 | * @author Barney Hanlon <[email protected]> |
||||
| 6 | * @copyright Barney Hanlon 2017 |
||||
| 7 | * @license https://opensource.org/licenses/MIT |
||||
| 8 | * |
||||
| 9 | * @codingStandardsIgnoreEnd |
||||
| 10 | */ |
||||
| 11 | |||||
| 12 | namespace Shrikeh\GuzzleMiddleware\TimerLogger\Formatter\Traits; |
||||
| 13 | |||||
| 14 | use Exception; |
||||
| 15 | |||||
| 16 | /** |
||||
| 17 | * Trait FormatterStartExceptionTrait. |
||||
| 18 | */ |
||||
| 19 | trait FormatterExceptionTrait |
||||
| 20 | { |
||||
| 21 | /** |
||||
| 22 | * @param \Exception|null $e An optional previous Exception |
||||
| 23 | * |
||||
| 24 | * @return static |
||||
| 25 | */ |
||||
| 26 | public static function msg( |
||||
| 27 | Exception $e = null |
||||
| 28 | ) { |
||||
| 29 | return new self( |
||||
| 30 | self::MSG_MESSAGE, |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
The call to
Shrikeh\GuzzleMiddleware...ionTrait::__construct() has too many arguments starting with self::MSG_MESSAGE.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. Loading history...
|
|||||
| 31 | self::MSG_CODE, |
||||
|
0 ignored issues
–
show
|
|||||
| 32 | $e |
||||
| 33 | ); |
||||
| 34 | } |
||||
| 35 | |||||
| 36 | /** |
||||
| 37 | * @param \Exception|null $e An optional previous Exception |
||||
| 38 | * |
||||
| 39 | * @return static |
||||
| 40 | */ |
||||
| 41 | public static function level( |
||||
| 42 | Exception $e = null |
||||
| 43 | ) { |
||||
| 44 | return new self( |
||||
| 45 | self::LEVEL_MESSAGE, |
||||
|
0 ignored issues
–
show
The call to
Shrikeh\GuzzleMiddleware...ionTrait::__construct() has too many arguments starting with self::LEVEL_MESSAGE.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. Loading history...
|
|||||
| 46 | self::LEVEL_CODE, |
||||
|
0 ignored issues
–
show
|
|||||
| 47 | $e |
||||
| 48 | ); |
||||
| 49 | } |
||||
| 50 | } |
||||
| 51 |