Closes a Blackfire Scenario.

@return Report
166942
public function closeScenario(Scenario $scenario, array $errors = [])
    {
        $uuid = $scenario->getUuid();

        $content = json_encode([
            'nb_jobs' => $scenario->getJobCount(),
            'errors' => $errors,
        ]);

        $this->sendHttpRequest($this->config->getEndpoint().'/api/v2/scenarios/'.$uuid, 'PUT', array('content' => $content), array('Content-Type: application/json'));

        return $this->getScenarioReport($uuid);
    }
561076
public function close() {

		if(false === $this -> connection instanceof \mysqli) {
			return trigger_error('Connection already closed');
		}

		$this -> connection -> close();

		return $this;
	}
1364015
public function closeGroup()
    {
        // Get the last added name from the groupStack and
        // remove it from the array.
        $name = array_pop($this->groupStack);
        // Get the formatted errors for this form group.
        $errors = $this->getFormattedErrors($name);

        // Append the errors to the group and close it out.
        return $errors . '</div>';
    }
633241
public function destroy()
	{
		foreach ($this->recipients()->rows() as $recipient)
		{
			if (!$recipient->destroy())
			{
				$this->addError($recipient->getError());
				return false;
			}
		}

		foreach ($this->children()->rows() as $child)
		{
			if (!$child->destroy())
			{
				$this->addError($child->getError());
				return false;
			}
		}

		$result = parent::destroy();

		if ($result)
		{
			Event::trigger('activity.onLogDelete', [$this]);
		}

		return $result;
	}
1176334
public function close()
    {
        if (null === $this->sessionId) {
            return;
        }

        $this->client->closeBrowser($this->getSessionId());
        $this->sessionId = null;

        return $this;
    }
514341
public function close()
    {
        if ($this->_stmt) {
            $r = $this->_stmt->close();
            $this->_stmt = null;
            return $r;
        }
        return false;
    }
19477
public function end()
    {
        if (!extension_loaded('xhprof')) {
            throw new Exception("XHProf extension is not loaded.", 1);
        }

        if ($this->started) {
            $this->data = xhprof_disable();

            require_once(sprintf('%s/xhprof_lib/utils/xhprof_runs.php', $this->dir));
            $xhprof_runs = new XHProfRuns_Default(ini_get("xhprof.output_dir"));
            $this->id = $xhprof_runs->save_run($this->data, $this->namespace);
        }

        return $this->started;
    }
610296
public function close()
    {
        if (version_compare(PHP_VERSION, '5.4', '>')) {
            if (session_status() == PHP_SESSION_ACTIVE) {
                session_write_close();
            }
        } else {
            @session_write_close();
        }
        $this->is_opened = false;
        return $this;
    }
51321
public function disconnect() {
        if ($this->isConnected()) {
            $tmp = $this->hConnection;
            $this->hConnection = null;
            pg_close($tmp);
        }
        return $this;

        // TODO: If there are open large object resources on the connection, do not close the connection before closing all
        //       large object resources.
        // @see  http://php.net/manual/en/function.pg-close.php
    }
688506
public function forceOpen()
    {
        if (!$this->isOpen()) {
            $this->fireEvent(self::CLOSED, self::OPEN);
        }

        $failTime = time();
        for ($i = 0; $i < $this->threshold; $i ++) {
            $this->failures[] = $failTime;
        }
        return $this->write();
    }
308596
public function closeAllTabsAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        $view = new ViewModel();
        $view->melisKey = $melisKey;
        return $view;
    }
313575
public function closeWrite()
    {
        if ($this->bevWrite) {
            if (isset($this->bevWrite)) {
                $this->bevWrite->free();
            }
            $this->bevWrite = null;
        }

        if ($this->fdWrite) {
            fclose($this->fdWrite);
            $this->fdWrite = null;
        }

        return $this;
    }
1053239
public function stream_close()
    {
        @fclose($this->temporaryFileHandle);
        
        // Upload the file?
        if ($this->writeMode) {
            // Make sure the container exists
            if (! $this->containerExists($this->fileName)) {
                $this->getStorageClient($this->fileName)->createContainer($this->getContainerName($this->fileName));
            }
            
            $mimeTypeGuesser = MimeTypeGuesser::getInstance();
            $createBlobOptions = new CreateBlobOptions();
            $createBlobOptions->setBlobContentType($mimeTypeGuesser->guess($this->temporaryFileName));
            
            // Upload the file
            try {
                $result = $this->getStorageClient($this->fileName)->createBlockBlob($this->getContainerName($this->fileName), $this->getFileName($this->fileName), fopen($this->temporaryFileName, "r"), $createBlobOptions);
            } catch (Exception $ex) {
                $this->cleanup();
                
                throw $ex;
            }
        }
        
        $this->cleanup();
    }
297915
public function close()
    {
        unset($this->settings['getrow']);

        if( isset($this->getJavascriptValidationFunction) )
        {
            $this->outputElement .= Inclusion\View::use('JavascriptValidationFunctions', $this->getJavascriptValidationFunction, true, __DIR__ . '/');

            $this->getJavascriptValidationFunction = NULL;
        }

        $this->outputElement .= '</form>' . EOL;

        return $this;
    }
532707
public function close()
    {
        $params = ['name' => $this->windowHandle];
        $command = $this->driver->factoryCommand('window', WebDriver_Command::METHOD_DELETE, $params);
        $this->driver->curl($command);
        return $this;
    }
155056
private function close(): int
    {
        $this->processPipes->close();
        if (\is_resource($this->process)) {
            proc_close($this->process);
        }
        $this->exitcode = $this->processInformation['exitcode'];
        $this->status = self::STATUS_TERMINATED;

        if (-1 === $this->exitcode) {
            if ($this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) {
                // if process has been signaled, no exitcode but a valid termsig, apply Unix convention
                $this->exitcode = 128 + $this->processInformation['termsig'];
            } elseif ($this->isSigchildEnabled()) {
                $this->processInformation['signaled'] = true;
                $this->processInformation['termsig'] = -1;
            }
        }

        // Free memory from self-reference callback created by buildCallback
        // Doing so in other contexts like __destruct or by garbage collector is ineffective
        // Now pipes are closed, so the callback is no longer necessary
        $this->callback = null;

        return $this->exitcode;
    }
111073
public function terminate() {
		USession::terminate ();
		$fMessage = new FlashMessage ( "You have been properly disconnected!", "Logout", "success", "checkmark" );
		$this->terminateMessage ( $fMessage );
		$message = $this->fMessage ( $fMessage );
		$this->authLoadView ( $this->_getFiles ()->getViewNoAccess (), [ "_message" => $message,"authURL" => $this->getBaseUrl (),"bodySelector" => $this->_getBodySelector (),"_loginCaption" => $this->_loginCaption ] );
	}