original_string: public function hasService($name, $resolve = TRUE) {
          if(array_key_exists($name, $this->services)) {
              return TRUE;
          }
  
          if(!$resolve) {
              return FALSE;
          }
  
          $classname = "Loops\\Service\\".Misc::camelize($name);
  
          if(class_exists($classname)) {
              $reflection = new ReflectionClass($classname);
  
              if($reflection->implementsInterface("Loops\ServiceInterface")) {
                  if(!$classname::hasService($this)) {
                      return FALSE;
                  }
                  $this->registerService($name, $classname, [], $classname::isShared($this));
              }
          }
  
          return $this->hasService($name, FALSE);
      }
code: public function hasService($name, $resolve = TRUE) {
          if(array_key_exists($name, $this->services)) {
              return TRUE;
          }
  
          if(!$resolve) {
              return FALSE;
          }
  
          $classname = "Loops\\Service\\".Misc::camelize($name);
  
          if(class_exists($classname)) {
              $reflection = new ReflectionClass($classname);
  
              if($reflection->implementsInterface("Loops\ServiceInterface")) {
                  if(!$classname::hasService($this)) {
                      return FALSE;
                  }
                  $this->registerService($name, $classname, [], $classname::isShared($this));
              }
          }
  
          return $this->hasService($name, FALSE);
      }
code_tokens: public function hasService ( $ name , $ resolve = TRUE ) { if ( array_key_exists ( $ name , $ this -> services ) ) { return TRUE ; } if ( ! $ resolve ) { return FALSE ; } $ classname = "Loops\\Service\\" . Misc :: camelize ( $ name ) ; if ( class_exists ( $ classname ) ) { $ reflection = new ReflectionClass ( $ classname ) ; if ( $ reflection -> implementsInterface ( "Loops\ServiceInterface" ) ) { if ( ! $ classname :: hasService ( $ this ) ) { return FALSE ; } $ this -> registerService ( $ name , $ classname , [ ] , $ classname :: isShared ( $ this ) ) ; } } return $ this -> hasService ( $ name , FALSE ) ; }
docstring: Checks if a service exists
  
  @param string $name The name of the service
  @param bool $resolve Specified if Loops should try to resolve unloaded services from the Loops\Service namespace.
  @return bool TRUE if the service is registered (or can be created from the Loops\Service namespace if $resolve is TRUE, see getService for details)
docstring_tokens: Checks if a service exists