Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of PHPUnit.
4
 *
5
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace PHPUnit\Util;
11
 
12
use Throwable;
13
 
14
/**
15
 * @internal This class is not covered by the backward compatibility promise for PHPUnit
16
 */
17
final class Cloner
18
{
19
    /**
20
     * @psalm-template OriginalType
21
     *
22
     * @psalm-param OriginalType $original
23
     *
24
     * @psalm-return OriginalType
25
     */
26
    public static function clone(object $original): object
27
    {
28
        try {
29
            return clone $original;
30
        } catch (Throwable $t) {
31
            return $original;
32
        }
33
    }
34
}