ergebnis / test-util
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * Copyright (c) 2017-2020 Andreas Möller
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE.md file that was distributed with this source code.
10
 *
11
 * @see https://github.com/ergebnis/test-util
12
 */
13

14
namespace Ergebnis\Test\Util\Exception;
15

16
/**
17
 * @internal
18
 */
19
final class InvalidExcludeClassName extends \InvalidArgumentException
20
{
21
    /**
22
     * @param mixed $className
23
     *
24
     * @return self
25
     */
26 1
    public static function fromClassName($className): self
27
    {
28 1
        return new self(\sprintf(
29 1
            'Exclude class name should be a string, got "%s" instead.',
30 1
            \is_object($className) ? \get_class($className) : \gettype($className)
31
        ));
32
    }
33
}

Read our documentation on viewing source code .

Loading