mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 15:25:45 +01:00
Most changes was made by php-cs-fixer. Also removes unused `RecursiveTreeIterator` class.
15 lines
290 B
PHP
15 lines
290 B
PHP
<?php
|
|
|
|
namespace Respect\Validation\Rules;
|
|
|
|
class Writable extends AbstractRule
|
|
{
|
|
public function validate($input)
|
|
{
|
|
if ($input instanceof \SplFileInfo) {
|
|
return $input->isWritable();
|
|
}
|
|
|
|
return (is_string($input) && is_writable($input));
|
|
}
|
|
}
|