original_string: public function getServiceTypes($group = null)
      {
          ksort($this->types, SORT_NATURAL); // sort by name for display
          if (!empty($group)) {
              if (!empty($group) && !is_array($group)) {
                  $group = array_map('trim', explode(',', trim($group, ',')));
              }
              $group = array_map('strtolower', (array)$group);
              $types = [];
              foreach ($this->types as $type) {
                  if (in_array(strtolower($type->getGroup()), $group)) {
                      $types[$type->getName()] = $type;
                  }
              }
  
              return $types;
          }
  
          return $this->types;
      }
code: public function getServiceTypes($group = null)
      {
          ksort($this->types, SORT_NATURAL); // sort by name for display
          if (!empty($group)) {
              if (!empty($group) && !is_array($group)) {
                  $group = array_map('trim', explode(',', trim($group, ',')));
              }
              $group = array_map('strtolower', (array)$group);
              $types = [];
              foreach ($this->types as $type) {
                  if (in_array(strtolower($type->getGroup()), $group)) {
                      $types[$type->getName()] = $type;
                  }
              }
  
              return $types;
          }
  
          return $this->types;
      }
code_tokens: public function getServiceTypes ( $ group = null ) { ksort ( $ this -> types , SORT_NATURAL ) ; // sort by name for display if ( ! empty ( $ group ) ) { if ( ! empty ( $ group ) && ! is_array ( $ group ) ) { $ group = array_map ( 'trim' , explode ( ',' , trim ( $ group , ',' ) ) ) ; } $ group = array_map ( 'strtolower' , ( array ) $ group ) ; $ types = [ ] ; foreach ( $ this -> types as $ type ) { if ( in_array ( strtolower ( $ type -> getGroup ( ) ) , $ group ) ) { $ types [ $ type -> getName ( ) ] = $ type ; } } return $ types ; } return $ this -> types ; }
docstring: Return all of the known service types.
  
  @param string $group
  
  @return \DreamFactory\Core\Contracts\ServiceTypeInterface[]
docstring_tokens: Return all of the known service types .