protected function alreadyInParameters($class, array $parameters)
    {
        $result = Arr::first($parameters, function ($key, $value) use ($class)
        {
            return ($value instanceof $class);
        });

        return ! is_null($result);
    }