Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Cloner.php

class Cloner

@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

@internal This class is not covered by the backward compatibility promise for PHPUnit

Hierarchy

  • class \PHPUnit\Util\Cloner

Expanded class hierarchy of Cloner

2 files declare their use of Cloner
Invocation.php in vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php
TestCase.php in vendor/phpunit/phpunit/src/Framework/TestCase.php

File

vendor/phpunit/phpunit/src/Util/Cloner.php, line 19

Namespace

PHPUnit\Util
View source
final class Cloner {
    
    /**
     * @psalm-template OriginalType of object
     *
     * @psalm-param OriginalType $original
     *
     * @psalm-return OriginalType
     */
    public static function clone(object $original) : object {
        try {
            return clone $original;
        } catch (Throwable) {
            return $original;
        }
    }

}

Members

Title Sort descending Modifiers Object type Summary
Cloner::clone public static function @psalm-template OriginalType of object
RSS feed
Powered by Drupal