original_string: public static function get_search_area_category_by_name($name) {
          if (key_exists($name, self::get_search_area_categories())) {
              return self::get_search_area_categories()[$name];
          } else {
              return self::get_search_area_categories()[self::get_default_area_category_name()];
          }
      }
code: public static function get_search_area_category_by_name($name) {
          if (key_exists($name, self::get_search_area_categories())) {
              return self::get_search_area_categories()[$name];
          } else {
              return self::get_search_area_categories()[self::get_default_area_category_name()];
          }
      }
code_tokens: public static function get_search_area_category_by_name ( $ name ) { if ( key_exists ( $ name , self :: get_search_area_categories ( ) ) ) { return self :: get_search_area_categories ( ) [ $ name ] ; } else { return self :: get_search_area_categories ( ) [ self :: get_default_area_category_name ( ) ] ; } }
docstring: Return search area category instance by category name.
  
  @param string $name Category name. If name is not valid will return default category.
  
  @return \core_search\area_category
docstring_tokens: Return search area category instance by category name .