Phulp\Phulp::watch PHP Метод

watch() публичный Метод

public watch ( Source $src, mixed $tasks ) : Watch
$src Source
$tasks mixed
Результат Watch
    public function watch(Source $src, $tasks)
    {
        if (!is_array($tasks) && !is_callable($tasks)) {
            throw new \InvalidArgumentException('Invalid Argument for Phulp::watch');
        }
        if (is_array($tasks)) {
            Output::out('[' . Output::colorize((new \DateTime())->format('H:i:s'), 'light_gray') . '] ' . Output::colorize('the API of Phulp::watch you are using will be deprecated', 'yellow'));
            Output::out('[' . Output::colorize((new \DateTime())->format('H:i:s'), 'light_gray') . '] ' . Output::colorize('Please check the documentation. ', 'yellow'));
        }
        return new Watch($src, $tasks, $this);
    }