original_string: protected function isEmpty($data, $flags)
      {
          if ($data === null) {
              return true;
          }
  
          if ($data === '' && ($flags & self::EMPTY_STRING)) {
              return true;
          }
  
          $arrayTypes = self::EMPTY_ARRAY | self::EMPTY_DATE | self::EMPTY_TIME;
          if ($data === [] && ($flags & $arrayTypes)) {
              return true;
          }
  
          if (is_array($data)) {
              if (($flags & self::EMPTY_FILE)
                  && isset($data['name'], $data['type'], $data['tmp_name'], $data['error'])
                  && (int)$data['error'] === UPLOAD_ERR_NO_FILE
              ) {
                  return true;
              }
  
              $allFieldsAreEmpty = true;
              foreach ($data as $field) {
                  if ($field !== null && $field !== '') {
                      $allFieldsAreEmpty = false;
                      break;
                  }
              }
  
              if ($allFieldsAreEmpty) {
                  if (($flags & self::EMPTY_DATE) && isset($data['year'])) {
                      return true;
                  }
  
                  if (($flags & self::EMPTY_TIME) && isset($data['hour'])) {
                      return true;
                  }
              }
          }
  
          return false;
      }
code: protected function isEmpty($data, $flags)
      {
          if ($data === null) {
              return true;
          }
  
          if ($data === '' && ($flags & self::EMPTY_STRING)) {
              return true;
          }
  
          $arrayTypes = self::EMPTY_ARRAY | self::EMPTY_DATE | self::EMPTY_TIME;
          if ($data === [] && ($flags & $arrayTypes)) {
              return true;
          }
  
          if (is_array($data)) {
              if (($flags & self::EMPTY_FILE)
                  && isset($data['name'], $data['type'], $data['tmp_name'], $data['error'])
                  && (int)$data['error'] === UPLOAD_ERR_NO_FILE
              ) {
                  return true;
              }
  
              $allFieldsAreEmpty = true;
              foreach ($data as $field) {
                  if ($field !== null && $field !== '') {
                      $allFieldsAreEmpty = false;
                      break;
                  }
              }
  
              if ($allFieldsAreEmpty) {
                  if (($flags & self::EMPTY_DATE) && isset($data['year'])) {
                      return true;
                  }
  
                  if (($flags & self::EMPTY_TIME) && isset($data['hour'])) {
                      return true;
                  }
              }
          }
  
          return false;
      }
code_tokens: protected function isEmpty ( $ data , $ flags ) { if ( $ data === null ) { return true ; } if ( $ data === '' && ( $ flags & self :: EMPTY_STRING ) ) { return true ; } $ arrayTypes = self :: EMPTY_ARRAY | self :: EMPTY_DATE | self :: EMPTY_TIME ; if ( $ data === [ ] && ( $ flags & $ arrayTypes ) ) { return true ; } if ( is_array ( $ data ) ) { if ( ( $ flags & self :: EMPTY_FILE ) && isset ( $ data [ 'name' ] , $ data [ 'type' ] , $ data [ 'tmp_name' ] , $ data [ 'error' ] ) && ( int ) $ data [ 'error' ] === UPLOAD_ERR_NO_FILE ) { return true ; } $ allFieldsAreEmpty = true ; foreach ( $ data as $ field ) { if ( $ field !== null && $ field !== '' ) { $ allFieldsAreEmpty = false ; break ; } } if ( $ allFieldsAreEmpty ) { if ( ( $ flags & self :: EMPTY_DATE ) && isset ( $ data [ 'year' ] ) ) { return true ; } if ( ( $ flags & self :: EMPTY_TIME ) && isset ( $ data [ 'hour' ] ) ) { return true ; } } } return false ; }
docstring: Returns true if the field is empty in the passed data array
  
  @param mixed $data Value to check against.
  @param int $flags A bitmask of EMPTY_* flags which specify what is empty
  @return bool
docstring_tokens: Returns true if the field is empty in the passed data array