protected function addRequiredIfNotNull(XType $type, &$rule)
    {
        if (isset($type->not_null) && $type->not_null) {
            $rule[] = $this->callExtension('not_null', [true]);
        }
    }
protected function addRequiredIfNotNull(XType $type, &$rule)
    {
        if (isset($type->not_null) && $type->not_null) {
            $rule[] = $this->callExtension('not_null', [true]);
        }
    }
protected function addRequiredIfNotNull ( XType $ type , & $ rule ) { if ( isset ( $ type -> not_null ) && $ type -> not_null ) { $ rule [ ] = $ this -> callExtension ( 'not_null' , [ true ] ) ; } }
Add the required rule.

@param XType $type
@param array $rule
Add the required rule .