public function validatePropertyVisibility($visibility)
    {
        if (!in_array($visibility, $this->propertyVisibilities)) {
            throw $this->getException(
                'The property visibility isn\'t valid ("%s" given, expecting one of following: %s)',
                [$visibility, implode(', ', $this->propertyVisibilities)]
            );
        }

        return $visibility;
    }
public function validatePropertyVisibility($visibility)
    {
        if (!in_array($visibility, $this->propertyVisibilities)) {
            throw $this->getException(
                'The property visibility isn\'t valid ("%s" given, expecting one of following: %s)',
                [$visibility, implode(', ', $this->propertyVisibilities)]
            );
        }

        return $visibility;
    }
public function validatePropertyVisibility ( $ visibility ) { if ( ! in_array ( $ visibility , $ this -> propertyVisibilities ) ) { throw $ this -> getException ( 'The property visibility isn\'t valid ("%s" given, expecting one of following: %s)' , [ $ visibility , implode ( ', ' , $ this -> propertyVisibilities ) ] ) ; } return $ visibility ; }
Validates property visibility

@param string $visibility

@return string
@throws \InvalidArgumentException When the visibility is not found in the list of allowed ones.
Validates property visibility