Code Duplication    Length = 18-18 lines in 2 locations

src/Api/Asset/DuplicateAssetMappingException.php 1 location

@@ 24-41 (lines=18) @@
21
 *
22
 * @author Bernhard Schussek <[email protected]>
23
 */
24
class DuplicateAssetMappingException extends Exception
25
{
26
    /**
27
     * Creates an exception for a UUID that exists already.
28
     *
29
     * @param Uuid           $uuid  The UUID of the mapping.
30
     * @param Exception|null $cause The exception that caused this exception.
31
     *
32
     * @return static The created exception.
33
     */
34
    public static function forUuid(Uuid $uuid, Exception $cause = null)
35
    {
36
        return new static(sprintf(
37
            'The asset mapping "%s" exists already.',
38
            $uuid->toString()
39
        ), 0, $cause);
40
    }
41
}
42

src/Api/Asset/NoSuchAssetMappingException.php 1 location

@@ 24-41 (lines=18) @@
21
 *
22
 * @author Bernhard Schussek <[email protected]>
23
 */
24
class NoSuchAssetMappingException extends Exception
25
{
26
    /**
27
     * Creates an exception for a UUID that was not found.
28
     *
29
     * @param Uuid           $uuid  The UUID of the mapping.
30
     * @param Exception|null $cause The exception that caused this exception.
31
     *
32
     * @return static The created exception.
33
     */
34
    public static function forUuid(Uuid $uuid, Exception $cause = null)
35
    {
36
        return new static(sprintf(
37
            'The asset mapping "%s" does not exist.',
38
            $uuid->toString()
39
        ), 0, $cause);
40
    }
41
}
42