original_string: static public function sortByKeyRecursive(array $array)
      {
          ksort($array);
          foreach ($array as $key => $value) {
              if (is_array($value) && !empty($value)) {
                  $array[$key] = self::sortByKeyRecursive($value);
              }
          }
  
          return $array;
      }
code: static public function sortByKeyRecursive(array $array)
      {
          ksort($array);
          foreach ($array as $key => $value) {
              if (is_array($value) && !empty($value)) {
                  $array[$key] = self::sortByKeyRecursive($value);
              }
          }
  
          return $array;
      }
code_tokens: static public function sortByKeyRecursive ( array $ array ) { ksort ( $ array ) ; foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) && ! empty ( $ value ) ) { $ array [ $ key ] = self :: sortByKeyRecursive ( $ value ) ; } } return $ array ; }
docstring: Sorts an array recursively by key
  
  @param $array Array to sort recursively by key
  @return array Sorted array
docstring_tokens: Sorts an array recursively by key