/var/www/html_uk/wp-content/plugins/automatewoo/includes/Exceptions/InvalidPath.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

namespace AutomateWoo\Exceptions;

use 
InvalidArgumentException;

/**
 * InvalidPath class.
 *
 * @package AutomateWoo\Exceptions
 * @since   5.1.0
 */
class InvalidPath extends InvalidArgumentException implements Exception {

    
/**
     * Return a new instance of the exception when a file does not exist.
     *
     * @param string $path The provided path.
     *
     * @return static
     */
    
public static function file_does_not_exist$path ) {
        return new static( 
sprintf'Invalid argument: file "%s" does not exist.'$path ) );
    }

    
/**
     * Return a new instance of the exception when a path is not a directory.
     *
     * @param string $path The provided path.
     *
     * @return static
     */
    
public static function path_not_directory$path ) {
        return new static( 
sprintf'Invalid argument: path "%s" is not a directory.'$path ) );
    }
}