FOS\UserBundle\Tests\Validation\UserValidationTest::hasViolationForPropertyPath PHP Method

hasViolationForPropertyPath() protected method

protected hasViolationForPropertyPath ( $violations, $propertyPath )
    protected function hasViolationForPropertyPath($violations, $propertyPath)
    {
        if (!is_object($violations)) {
            return false;
        }
        foreach ($violations as $violation) {
            if ($violation->getPropertyPath() == $propertyPath) {
                return true;
            }
        }
        return false;
    }