original_string: public static function clearTextConcat($value)
      {
          if (is_string($value)) {
              return trim(preg_replace('/\s+/s', ' ', $value));
          }
          if (is_array($value)) {
              $result = [];
              foreach ($value as $val) {
                  $result[] = self::clearTextConcat($val);
              }
              return implode(' ', array_filter($result, 'strlen'));
          }
          return null;
      }
code: public static function clearTextConcat($value)
      {
          if (is_string($value)) {
              return trim(preg_replace('/\s+/s', ' ', $value));
          }
          if (is_array($value)) {
              $result = [];
              foreach ($value as $val) {
                  $result[] = self::clearTextConcat($val);
              }
              return implode(' ', array_filter($result, 'strlen'));
          }
          return null;
      }
code_tokens: public static function clearTextConcat ( $ value ) { if ( is_string ( $ value ) ) { return trim ( preg_replace ( '/\s+/s' , ' ' , $ value ) ) ; } if ( is_array ( $ value ) ) { $ result = [ ] ; foreach ( $ value as $ val ) { $ result [ ] = self :: clearTextConcat ( $ val ) ; } return implode ( ' ' , array_filter ( $ result , 'strlen' ) ) ; } return null ; }
docstring: Recursive clears all text in array
  @param string $value
  @return string|NULL
docstring_tokens: Recursive clears all text in array