private function isTaskImplementation($class)
    {
        if (!isset($this->implementations[$class])) {
            $reflectionClass = new \ReflectionClass($class);
            $this->implementations[$class] = $reflectionClass->implementsInterface(TaskInterface::class);
        }

        return $this->implementations[$class];
    }