original_string: protected static function get_registration($confirmed = true) {
          global $DB;
  
          if (self::$registration === null) {
              self::$registration = $DB->get_record('registration_hubs', ['huburl' => HUB_MOODLEORGHUBURL]);
          }
  
          if (self::$registration && (bool)self::$registration->confirmed == (bool)$confirmed) {
              return self::$registration;
          }
  
          return null;
      }
code: protected static function get_registration($confirmed = true) {
          global $DB;
  
          if (self::$registration === null) {
              self::$registration = $DB->get_record('registration_hubs', ['huburl' => HUB_MOODLEORGHUBURL]);
          }
  
          if (self::$registration && (bool)self::$registration->confirmed == (bool)$confirmed) {
              return self::$registration;
          }
  
          return null;
      }
code_tokens: protected static function get_registration ( $ confirmed = true ) { global $ DB ; if ( self :: $ registration === null ) { self :: $ registration = $ DB -> get_record ( 'registration_hubs' , [ 'huburl' => HUB_MOODLEORGHUBURL ] ) ; } if ( self :: $ registration && ( bool ) self :: $ registration -> confirmed == ( bool ) $ confirmed ) { return self :: $ registration ; } return null ; }
docstring: Get site registration
  
  @param bool $confirmed
  @return stdClass|null
docstring_tokens: Get site registration