@@ 813-823 (lines=11) @@ | ||
810 | } |
|
811 | } |
|
812 | ||
813 | public static function file($value, $message = '') |
|
814 | { |
|
815 | static::fileExists($value, $message); |
|
816 | ||
817 | if (!is_file($value)) { |
|
818 | static::reportInvalidArgument(sprintf( |
|
819 | $message ?: 'The path %s is not a file.', |
|
820 | static::valueToString($value) |
|
821 | )); |
|
822 | } |
|
823 | } |
|
824 | ||
825 | public static function directory($value, $message = '') |
|
826 | { |
|
@@ 825-835 (lines=11) @@ | ||
822 | } |
|
823 | } |
|
824 | ||
825 | public static function directory($value, $message = '') |
|
826 | { |
|
827 | static::fileExists($value, $message); |
|
828 | ||
829 | if (!is_dir($value)) { |
|
830 | static::reportInvalidArgument(sprintf( |
|
831 | $message ?: 'The path %s is no directory.', |
|
832 | static::valueToString($value) |
|
833 | )); |
|
834 | } |
|
835 | } |
|
836 | ||
837 | public static function readable($value, $message = '') |
|
838 | { |