src/AppBundle/Security/Tienda/Inventario/RegistroVoter.php
/**
     * Determines if the attribute and subject are supported by this voter.
     *
     * @param string $attribute An attribute
     * @param mixed $subject The subject to secure, e.g. an object the user wants to access or any other PHP type
     *
     * @return bool True if the attribute and subject are supported, false otherwise
     */
Determines if the attribute and subject are supported by this voter.
@param string $attribute An attribute
@param mixed $subject The subject to secure, e.g. an object the user wants to access or any other PHP type

@return bool True if the attribute and subject are supported, false otherwise
Determines if the attribute and subject are supported by this voter . @param string $attribute An attribute @param mixed $subject The subject to secure e . g . an object the user wants to access or any other PHP type @return bool True if the attribute and subject are supported false otherwise
protected function supports($attribute, $subject)
    {
        if (!in_array($attribute, [self::EDIT])) {
            return false;
        }
        if (!$subject instanceof Registro) {
            return false;
        }
        return true;
    }
protected function supports ( $ attribute , $ subject ) { if ( ! in_array ( $ attribute , [ self :: EDIT ] ) ) { return false ; } if ( ! $ subject instanceof Registro ) { return false ; } return true ; }
Determines if the attribute and subject are supported by this voter.
Determines if the attribute and subject are supported by this voter .