original_string: protected function _addValidatorProps($validator = [])
      {
          foreach ($validator as $key => $value) {
              if (!isset($value) || empty($value)) {
                  continue;
              }
              if ($key === 'rule' && is_array($value) && !is_callable($value)) {
                  $this->_pass = array_slice($value, 1);
                  $value = array_shift($value);
              }
              if (in_array($key, ['rule', 'on', 'message', 'last', 'provider', 'pass'])) {
                  $this->{"_$key"} = $value;
              }
          }
      }
code: protected function _addValidatorProps($validator = [])
      {
          foreach ($validator as $key => $value) {
              if (!isset($value) || empty($value)) {
                  continue;
              }
              if ($key === 'rule' && is_array($value) && !is_callable($value)) {
                  $this->_pass = array_slice($value, 1);
                  $value = array_shift($value);
              }
              if (in_array($key, ['rule', 'on', 'message', 'last', 'provider', 'pass'])) {
                  $this->{"_$key"} = $value;
              }
          }
      }
code_tokens: protected function _addValidatorProps ( $ validator = [ ] ) { foreach ( $ validator as $ key => $ value ) { if ( ! isset ( $ value ) || empty ( $ value ) ) { continue ; } if ( $ key === 'rule' && is_array ( $ value ) && ! is_callable ( $ value ) ) { $ this -> _pass = array_slice ( $ value , 1 ) ; $ value = array_shift ( $ value ) ; } if ( in_array ( $ key , [ 'rule' , 'on' , 'message' , 'last' , 'provider' , 'pass' ] ) ) { $ this -> { "_$key" } = $ value ; } } }
docstring: Sets the rule properties from the rule entry in validate
  
  @param array $validator [optional]
  @return void
docstring_tokens: Sets the rule properties from the rule entry in validate