DevCallbackGuard::getMessageFromException()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 2
1
<?php declare(strict_types=1);
2
3
/*
4
 * This file is part of the pinepain/js-sandbox PHP library.
5
 *
6
 * Copyright (c) 2016-2017 Bogdan Padalko <[email protected]>
7
 *
8
 * Licensed under the MIT license: http://opensource.org/licenses/MIT
9
 *
10
 * For the full copyright and license information, please view the
11
 * LICENSE file that was distributed with this source or visit
12
 * http://opensource.org/licenses/MIT
13
 */
14
15
16
namespace Pinepain\JsSandbox\Wrappers\CallbackGuards;
17
18
19
use Throwable;
20
21
22
class DevCallbackGuard extends CallbackGuard
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function getMessageFromException(Throwable $e): string
28
    {
29
        $message = parent::getMessageFromException($e);
30
        $message .= ': ' . $e->getMessage() . PHP_EOL . $e->getTraceAsString();
31
32
        return $message;
33
    }
34
}
35