original_string: public function setupServices()
      {
          $settings = $this->getApp()->container->get('settings');
  
          if (!empty($settings['services'])) {
              if (!is_array($settings['services'])) {
                  throw InvalidServiceConfigException::build([], ['serviceConfig' => $settings['services']]);
              }
  
              foreach ($settings['services'] as $service => $config) {
                  $this->setupService($service, $config);
              }
          }
      }
code: public function setupServices()
      {
          $settings = $this->getApp()->container->get('settings');
  
          if (!empty($settings['services'])) {
              if (!is_array($settings['services'])) {
                  throw InvalidServiceConfigException::build([], ['serviceConfig' => $settings['services']]);
              }
  
              foreach ($settings['services'] as $service => $config) {
                  $this->setupService($service, $config);
              }
          }
      }
code_tokens: public function setupServices ( ) { $ settings = $ this -> getApp ( ) -> container -> get ( 'settings' ) ; if ( ! empty ( $ settings [ 'services' ] ) ) { if ( ! is_array ( $ settings [ 'services' ] ) ) { throw InvalidServiceConfigException :: build ( [ ] , [ 'serviceConfig' => $ settings [ 'services' ] ] ) ; } foreach ( $ settings [ 'services' ] as $ service => $ config ) { $ this -> setupService ( $ service , $ config ) ; } } }
docstring: Registers the services with the application
docstring_tokens: Registers the services with the application