Runs the buffered operations.

It returns an array of results.

@return mixed[]
514460
public function runBufferedOperations()
    {
        $results = [];

        while (null !== ($operation = $this->buffer->current())) {
            $results[] = $this->runner->run($operation);

            $this->buffer->pop();
        }

        return $results;
    }
123245
public function run()
    {
        if (! $this->runPreSearch()) {
            return $this->value;
        }

        $decoded = json_decode($this->value, 1);
        $result  = (json_last_error() == JSON_ERROR_NONE) && is_array($decoded);
        if ($result) {
            /* decoded is array */
            if (is_array($decoded)) {
                $arrayValue = '';
                array_walk_recursive($decoded, function ($value, $key) use (&$arrayValue) {
                    $arrayValue .= $key.' '.$value;
                });
                $this->value = $arrayValue;
            }
        }

        return $this->value;
    }
1274387
public function getOperations()
    {
        $result = [];
        foreach ($this->definition['operations'] as $name => $definition) {
            $result[$name] = $this->getOperation($name);
        }

        return $result;
    }
244467
protected function process()
    {
        // Workaround for PHP Bug #61141.
        if (curl_multi_select($this->handle) === -1) {
            usleep(100);
        }

        do {
            $mrc = curl_multi_exec($this->handle, $active);
        } while ($mrc === CURLM_CALL_MULTI_PERFORM);

        return [$mrc, $active];
    }
64193
public function run() {

        foreach ( $this->requests as $request ) {

            if ( isset($request['ERROR_CODE']) && isset($request['ERROR_MESSAGE']) ) {

                $this->logger->warning("Invalid request ".$request['ID']);

                $result = self::packJsonError($request['ERROR_CODE'], $request['ERROR_MESSAGE'], $request['ID']);

                if ( !is_null($result) ) $this->results[] = $result;

            } else {

                try {

                    $this->logger->debug("Serving request ".$request['METHOD']."(".$request['ID'].")");

                    $response = $this->runSingleRequest($request['METHOD'], $request['PARAMETERS']);

                    $result = self::packJsonSuccess($response, $request['ID']);

                } catch (RpcException $re) {

                    $this->logger->warning("Error handling request ".$request['ID'].": ".$re->getMessage());

                    $result = self::packJsonError($re->getCode(), $re->getMessage(), $request['ID']);

                } catch (Exception $e) {

                    $this->logger->error($e->getMessage());

                    throw $e;

                }

                if ( !is_null($result) ) $this->results[] = $result;

            }


        }

        if ( empty($this->results) ) {

            return null;

        } else if ( $this->is_batch_request ) {

            return $this->results;

        } else {

            return $this->results[0];

        }

    }
323715
protected function _execute()
    {
        $result = null;
        $spec = function () {
            $this->_expectations = [];
            $closure = $this->_closure;
            $result = $this->_suite->runBlock($this, $closure, 'specification');
            foreach ($this->_expectations as $expectation) {
                $this->_passed = $expectation->process() && $this->_passed;
            }
            return $result;
        };

        $suite = $this->suite();
        return $spec();
    }
804127
public function runSteps()
    {
        $steps = $this->steps()->pullSteps();
        foreach ($steps as list($method, $arguments)) {
            $callable = is_callable($method) ? $method : [$this, $method];
            $arguments = (array) $arguments;

            $results = $callable(...$arguments);
            $results = $this->checkResults($results);
            if (!$results) {
                return false;
            }
        }

        return true;
    }
1303397
public function execute()
    {
        $result = [];
        foreach ($this->queryString() as $query) {
            $stmt = $this->connection->prepare($query);
            $stmt->execute();

            $result[] = $query;
        }

        $this->reset();

        return $result;
    }
1124956
protected function getPropStats(): array
    {
        $result = [];
        $failed = false;
        
        foreach ($this->proppatch->getOperations() as $operation) {
            $tmp = $operation->getResult();
            
            if (is_integer($tmp)) {
                if (empty($result[$tmp])) {
                    $result[$tmp] = [];
                }
                
                $result[$tmp][] = $operation;
            } elseif ($tmp instanceof HttpException) {
                $tmp = $tmp->getCode();
                
                if (empty($result[$tmp])) {
                    $result[$tmp] = [];
                }
                
                $result[$tmp][] = $operation;
            } else {
                $tmp = WebDav::CODE_CONFLICT;
                
                if (empty($result[$tmp])) {
                    $result[$tmp];
                }
                
                $result[$tmp][] = $operation;
            }
            
            if ($tmp != WebDav::CODE_OK) {
                $failed = true;
            }
        }
        
        if ($failed && !empty($result[WebDav::CODE_OK])) {
            if (empty($result[WebDav::CODE_FAILED_DEPENDENCY])) {
                $result[WebDav::CODE_FAILED_DEPENDENCY] = [];
            }
            
            foreach ($result[WebDav::CODE_OK] as $operation) {
                $result[WebDav::CODE_FAILED_DEPENDENCY][] = $operation;
            }
            
            unset($result[WebDav::CODE_OK]);
        }
        
        ksort($result, SORT_NUMERIC);
        
        return $result;
    }
922170
public function get(): array
    {
        try {
            $rows = $this->baseQuery->get();
            return array_map([$this, 'processFetchedRow'], $rows);
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }
892896
public function run()
    {
        if (! $this->runPreSearch()) {
            return $this->value;
        }

        if ((strlen($this->value) % 4 == 0) and preg_match('/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/isU', $this->value)) {
            $decoded = base64_decode($this->value, true);
            if (base64_encode($decoded) === $this->value) {
                return $decoded;
            }
        }

        return $this->value;
    }
1023173
protected function executeQueuedJobs()
    {
        $returnValues = [];
        while ($resumeCommand = array_shift($this->queue)) {
            $returnValues[] = $resumeCommand();
        }

        return array_shift($returnValues);
    }
969696
public function run() {
		$cwd = $this->cwd;

		$descriptors = array(
			0 => STDIN,
			1 => array( 'pipe', 'w' ),
			2 => array( 'pipe', 'w' ),
		);

		$proc = proc_open( $this->command, $descriptors, $pipes, $cwd, $this->env );

		$stdout = stream_get_contents( $pipes[1] );
		fclose( $pipes[1] );

		$stderr = stream_get_contents( $pipes[2] );
		fclose( $pipes[2] );

		return new ProcessRun( array(
			'stdout' => $stdout,
			'stderr' => $stderr,
			'return_code' => proc_close( $proc ),
			'command' => $this->command,
			'cwd' => $cwd,
			'env' => $this->env
		) );
	}
944682
public function run() {
        $results = [
            $this->doDelete(),
            $this->doUpdate(),
            $this->doCreate()
        ];
        return array_search(false, $results, true) === false;
    }
293828
public function getSuccessors()
    {
        $returnValue = array();

        
    	$reflection = new ReflectionClass($this);
		foreach($reflection->getProperties() as $property){
			if(!$property->isStatic() && !$property->isPrivate()){
				$propertyName = $property->getName();
				$value = $this->$propertyName;
				if (is_array($value)) {
					foreach ($value as $key => $subvalue) {
						if (is_object($subvalue) && $subvalue instanceof self) {
								$returnValue[] = $subvalue;
						}
					}
				} elseif (is_object($value) && $value instanceof self) {
						$returnValue[] = $value;
					}
				}
		}
        

        return (array) $returnValue;
    }
171721
public function getResults()
    {
        $skip = ($this->page-1)*$this->limit;
        
        $cursor = $this->getCursor();
        $cursor->skip($skip);

        $results = array();
        $i = 0;

        while($cursor->valid() && $cursor->current() && $i++ < $this->limit) {

            $object = new $this->modelName();
            $object->writeAttributes($cursor->current());

            $pseudoCursor = new \stdClass();
            foreach ($object as $key => $value) {
                $pseudoCursor->$key = $value;
            }

            $results[] = $pseudoCursor;
            $cursor->skip();
        }

        return $results;
    }
329113
private function run() {
		$issues = [];
		$totalFiles = 0;
		$totalLines = 0;
		$filePath = $this->scanner->getCurrentFilePath();
		if (!$this->options->getOption('t') || in_array('syntax', $this->options->getOption('t'), true)) {
			$checkSyntax = true;
			$versionGood = $this->tests->getPHPVersion();
			if (!$versionGood) {
				$this->reporter->add("ERROR!  Syntax checking was selected and a PHP binary lower than 7.0.0-dev was specified.", 0, 1);
			}
		} else {
			$checkSyntax = false;
		}

		while (($lines = $this->scanner->scanNextFile()) !== false) {
			$totalFiles++;

			//Check syntax and assign a line to grab if needed.
			$grabLineNumber = null;
			$grabLine = null;
			if ($checkSyntax) {
				$syntax = $this->tests->checkSyntax($filePath);
				if (!isset($syntax['is_valid'])) {
					$grabLineNumber = $syntax['line'];
				}
			}

			foreach ($lines as $index => $line) {
				$lineNumber = $index + 1;
				$line = trim($line, "\r\n");

				if ($lineNumber == $grabLineNumber) {
					$grabLine = $line;
				}

				$totalLines++;
				$issues = $this->tests->testLine($line);
				foreach ($issues as $section => $tests) {
					foreach ($tests as $test => $true) {
						$this->reporter->addToSection($section, $test, $filePath, $lineNumber, $line);
					}
				}
			}

			if ($checkSyntax && $grabLine !== null) {
				$this->reporter->addToSection('syntax', 'syntax', $filePath, $grabLineNumber, $grabLine.' //'.$syntax['error']);
			}
			$filePath = $this->scanner->getCurrentFilePath();
		}
		$this->reporter->add("Processed {$totalLines} lines contained in {$totalFiles} files.", 0, 1);
	}