end isClosureRoute
556581
private function getRouteDocBlock($class, $method)
    {
        $reflector = new ReflectionClass($class);

        $title = implode(' ', $this->splitCamelCaseToWords($method));
        $title = ucfirst(strtolower($title));
        $description = '';
        $params = [];

        $reflectorMethod = $reflector->getMethod($method);
        $docs = explode("\n", $reflectorMethod->getDocComment());
        $docs = array_filter($docs);
        if (!$docs) {
            return [$title, $description, $params];
        }
        
        $docs = $this->filterDocBlock($docs);
        
        $title = array_shift($docs);
        
        $checkForLongDescription = true;
        foreach ($docs as $line) {
            if ($checkForLongDescription && !preg_match('~^@\w+~', $line)) {
                $description .= trim($line) .' ';
            } elseif (preg_match('~^@\w+~', $line)) {
                $checkForLongDescription = false;
                if (preg_match('~^@param~', $line)) {
                    $paramChunks = $this->getParamChunksFromLine($line);
                    
                    $paramType = array_shift($paramChunks);
                    $paramName = substr(array_shift($paramChunks), 1);
                    $params[$paramName] = [
                        'type'        => $paramType,
                        'name'        => $paramName,
                        'description' => implode(' ', $paramChunks),
                        'template'    => $this->getParamTemplateByType($paramType),
                    ];
                }
            }
        }

        // TODO:
        $rules = [];
        foreach($reflectorMethod->getParameters() as $reflectorParam) {
            $paramClass = $reflectorParam->getClass();
            if ($paramClass instanceof ReflectionClass) {
                $name = $paramClass->getName();
                $paramClassInstance = new $name;
                if (is_a($paramClassInstance, Request::class) && method_exists($paramClassInstance, 'rules')) {
                    $paramClassInstance->__apidocs = true;
                    $rules = $paramClassInstance->rules();
                }
            }
        }

        $params = $this->fillParamsWithRequestRules($params, $rules);

        foreach ($params as $name => $param) {
            $params[$name]['rules'] = $rules[$name] ?? [];
            if (is_string($params[$name]['rules'])) {
                $params[$name]['rules'] = explode('|', $params[$name]['rules']);
            } elseif (is_array($params[$name]['rules'])) {
                $params[$name]['rules'] = $params[$name]['rules'];
            }
        }

        return [$title, $description, $params];
    }
1273678
public void terminate()
	{
		log( "term" );

		fActivated = false;
		converter = null;

		source.removePropertyChangedHandler( sourceHandler );
		source = null;
		sourceHandler = null;

		destination.removePropertyChangedHandler( destinationHandler );
		destination = null;
		destinationHandler = null;

	}
1078107
def end_binary_container(self):
        
        binary_container = self._message_stack.pop()
        binary_container.verify()
        self._add_field(binary_container)
622291
protected void end() {
        if ( subSolver != null && subSolver.subSolver == null ) {
            if ( type == OperatorDescrType.AND ) {
                if ( possibilityLists.isEmpty() ) {
                    possibilityLists.add( new HashSet<VerifierComponent>() );
                }

                List<Set<VerifierComponent>> newPossibilities = new ArrayList<Set<VerifierComponent>>();

                List<Set<VerifierComponent>> sets = subSolver.getPossibilityLists();
                for ( Set<VerifierComponent> possibilityList : possibilityLists ) {

                    for ( Set<VerifierComponent> set : sets ) {
                        Set<VerifierComponent> newSet = new HashSet<VerifierComponent>();
                        newSet.addAll( possibilityList );
                        newSet.addAll( set );
                        newPossibilities.add( newSet );
                    }
                }
                possibilityLists = newPossibilities;

            } else if ( type == OperatorDescrType.OR ) {

                possibilityLists.addAll( subSolver.getPossibilityLists() );

            }

            subSolver = null;

        } else if ( subSolver != null && subSolver.subSolver != null ) {

            subSolver.end();
        }

    }
1255613
public void end() {
        if (endCallback != null) {
            endCallback.accept(this, context);
        }

        if (currentPrompt != null) {
            currentPrompt.conversationEnded(context);
            currentPrompt = null;
        }

        Extensions.get(context.getBot(), ConversationRegistry.class).removeConversation(this);
        virgin = false;
    }
1342206
def exit(self):
        """"""
        if self.client is not None:
            self.client.close()
        if self.context is not None:
            self.context.destroy()
1284608
def terminate(self):
    """"""
    # Tear down the Pailgun TCPServer.
    if self.pailgun:
      self.pailgun.server_close()

    super(PailgunService, self).terminate()
145398
def endclip(self):
        """"""
        self.__clip_box = self.__clip_stack[-1]
        del self.__clip_stack[-1]
        self.grestore()
857603
public function end()
    {
        // Already ended, skip
        if ($this->ended === true) {
            return;
        }

        if (function_exists('fastcgi_finish_request')) {
            fastcgi_finish_request();
        }

        $this->ended = true;

        $this->completeContext();
        $this->completeResponse();

        // We really want to avoid throwing exceptions there
        try {
            $this->log();
        } catch (Exception $e) {
            error_log($e->getMessage());
        }
    }
845174
def end(self):
        """"""
        # Close export modules
        for e in self._exports:
            self._exports[e].exit()
        # Close plugins
        for p in self._plugins:
            self._plugins[p].exit()
1045265
public function endChildren()
    {
        $this->equal &= !$this->getInnerIterator()->getLHS()->valid()
            && !$this->getInnerIterator()->getRHS()->valid();
    }
700393
def close(self):
        
        logger.debug("Finalizing: {}".format(self))
        super(ArgosPgPlotItem, self).close()
1313983
public function end()
    {
        if (mustard_loaded('auctions') && $this->auction) {
            $bid = $this->getBidHistory()->first();

            if ($bid) {
                $this->winningBid()->associate($bid);
            }
        }

        $now = time();

        if ($this->endDate > $now) {
            $this->endedEarly = true;

            $this->endDate = $now;
        }

        $this->save();
    }
910673
function exit() {
    var _this5 = this;

    var options = this.options,
        viewer = this.viewer,
        image = this.image,
        list = this.list;


    if (!this.isShown || this.played || !this.fulled || !options.inline) {
      return this;
    }

    this.fulled = false;
    this.close();
    removeClass(this.button, CLASS_FULLSCREEN_EXIT);

    if (options.transition) {
      removeClass(list, CLASS_TRANSITION);

      if (this.viewed) {
        removeClass(image, CLASS_TRANSITION);
      }
    }

    removeClass(viewer, CLASS_FIXED);
    setStyle(viewer, {
      zIndex: options.zIndexInline
    });

    this.viewerData = assign({}, this.parentData);
    this.renderViewer();
    this.renderList();

    if (this.viewed) {
      this.initImage(function () {
        _this5.renderImage(function () {
          if (options.transition) {
            setTimeout(function () {
              addClass(image, CLASS_TRANSITION);
              addClass(list, CLASS_TRANSITION);
            }, 0);
          }
        });
      });
    }

    return this;
  }
243339
def stop(self):
        
        self.child.terminate()
        self._cleanup()
        return self.child.exitcode
557577
public function end() {
		if ($this->is_end) {
			return;
		}
		$this->is_end = true;
		if ($this->sw_response) {
			if (($this->tpl_auto === null && self::$tpl_auto_config) || $this->tpl_auto) {
				$this->display();
			}
			$this->sw_response->end();
			$this->sw_response = null;
		}
		$this->tpl_engine_obj = null;
	}
498065
@Override
  @OverridingMethodsMustInvokeSuper
  protected void onDestroy (@Nonnull final IScope aScopeInDestruction) throws Exception
  {
    // Destroy factory
    if (m_aFactory != null)
    {
      if (m_aFactory.isOpen ())
      {
        // Clear cache
        try
        {
          m_aFactory.getCache ().evictAll ();
        }
        catch (final PersistenceException ex)
        {
          // May happen if now database connection is available
        }
        // Close
        m_aFactory.close ();
      }
      m_aFactory = null;
    }
    LOGGER.info ("Closed EntityManagerFactory for persistence unit '" + m_sPersistenceUnitName + "'");
  }