original_string: public static function get_context_data(\context $context, \stdClass $user) : \stdClass {
          global $DB;
  
          $basedata = (object) [];
          if ($context instanceof \context_module) {
              return static::get_context_module_data($context, $user);
          }
          if ($context instanceof \context_block) {
              return static::get_context_block_data($context, $user);
          }
  
          return $basedata;
      }
code: public static function get_context_data(\context $context, \stdClass $user) : \stdClass {
          global $DB;
  
          $basedata = (object) [];
          if ($context instanceof \context_module) {
              return static::get_context_module_data($context, $user);
          }
          if ($context instanceof \context_block) {
              return static::get_context_block_data($context, $user);
          }
  
          return $basedata;
      }
code_tokens: public static function get_context_data ( \ context $ context , \ stdClass $ user ) : \ stdClass { global $ DB ; $ basedata = ( object ) [ ] ; if ( $ context instanceof \ context_module ) { return static :: get_context_module_data ( $ context , $ user ) ; } if ( $ context instanceof \ context_block ) { return static :: get_context_block_data ( $ context , $ user ) ; } return $ basedata ; }
docstring: Get all general data for this context.
  
  @param   \context        $context The context to retrieve data for.
  @param   \stdClass       $user The user being written.
  @return  \stdClass
docstring_tokens: Get all general data for this context .