Invokes the constructor of this enumeration constant with the specified
arguments.

@param mixed[] $arguments The constructor arguments.

@return void
175949
private function invokeConstructorIfDeclared(array $arguments)
    {
        $methodName = 'construct';

        try {
            $method = new ReflectionMethod($this, $methodName);

            if (true === $method->isPublic()) {
                throw new RuntimeException(
                    'The constructor of an enumeration type may not be public.'
                );
            }

            $method->setAccessible(true);
            $method->invokeArgs($this, $arguments);
        } catch (ReflectionException $ex) {
            // empty block.
        }
    }
1015587
public function setArguments($arguments = [])
    {
        $this->arguments = [];
        $this->requiredCount = 0;
        $this->hasOptional = false;
        $this->hasAnArrayArgument = false;
        $this->addArguments($arguments);
    }
365681
public function command($args)
    {
        // Throw if no arguments provided and args less than 2
        if (empty($args) || count($args) < 2) {
            throw new RuntimeException("Invalid argument count");
        }

        $secondArg = $args[1];

        // Output the second argument
        return $secondArg;

    }
86605
private function fill(array $args)
    {
        $properties = array_keys(get_object_vars($this));
        foreach ($args as $key => $value) {
            if (in_array($key, $properties)) {
                $this->{$key} = $value;
            }
        }
    }
103666
protected function addArgumentsToFunctionDescriptor(array $arguments, FunctionDescriptor $functionDescriptor): void
    {
        foreach ($arguments as $argument) {
            $this->addArgumentDescriptorToFunction(
                $functionDescriptor,
                $this->createArgumentDescriptor($functionDescriptor, $argument)
            );
        }
    }
1201595
protected function prepareScriptArguments(array $arguments)
    {
        $args = [];
        foreach ($arguments as $key => $value) {
            if ($value instanceof WebDriverElement) {
                $args[$key] = ['ELEMENT' => $value->getID()];
            } else {
                if (is_array($value)) {
                    $value = $this->prepareScriptArguments($value);
                }
                $args[$key] = $value;
            }
        }

        return $args;
    }
265906
public function setArguments(array $arguments)
    {
    	foreach ($arguments as $k => $v) {
    		$this->arguments[$k] = $v;
    	}
        
        return $this;
    }
39190
protected function setProperties(array $arguments)
    {
        $arguments = $arguments[0];
        if (isset($arguments['encryption'])) {
            $this->encryption = $arguments['encryption'];
        }
        if (isset($arguments['ssid'])) {
            $this->ssid = $arguments['ssid'];
        }
        if (isset($arguments['password'])) {
            $this->password = $arguments['password'];
        }
        if (isset($arguments['hidden'])) {
            $this->hidden = $arguments['hidden'];
        }
    }
1163882
private static function run(array $arguments)
	{
		// Unwind the args, figure out which ones were passed in as an array
		self::$stdin = null;
		$closureOut = false;
		foreach ($arguments as $k => $argument) {
			// If it's being passed in as an object, then pipe into stdin
			if (\is_object($argument)) {
				// If it's a anonymous function, then push stdout into it
				if ($argument instanceof \Closure) {
					$closureOut = $argument;
				} else {
					self::$stdin = (string) $argument;
				}
				unset($arguments[$k]);
			} elseif (\is_array($argument)) {
				if (Arrays::isAssoc($argument)) {
					// Ok, so we're passing in arguments
					$output = '';
					foreach ($argument as $key => $val) {
						if ($output !== '') {
							$output .= ' ';
						}
						// If you pass 'false', it'll ignore the arg altogether
						if ($val !== false) {
							// Figure out if it's a long or short commandline arg
							if (\strlen($key) === 1) {
								$output .= '-';
							} else {
								$output .= '--';
							}
							$output .= $key;
							// If you just pass in 'true', it'll just add the arg
							if ($val !== true) {
								$output .= ' ' . \escapeshellarg($val);
							}
						}
					}
					$arguments[$k] = $output;
				} else {
					// We're passing in an array, but it's not --key=val style
					$arguments[$k] = \implode(' ', $argument);
				}
			}
		}
		$shell = \implode(' ', $arguments);

		// Prepend the path
		if (\stripos(PHP_OS, 'win') !== 0) {
			$parts = \explode(' ', $shell);
			$parts[0] = \exec('which ' . $parts[0]);
			if ($parts[0] !== '') {
				$shell = \implode(' ', $parts);
			}
		}

		$descriptor_spec = [
			0 => ['pipe', 'r'], // Stdin
			1 => ['pipe', 'w'], // Stdout
			2 => ['pipe', 'w'] // Stderr
		];
		$process = \proc_open($shell, $descriptor_spec, $pipes);
		if (\is_resource($process)) {
			\fwrite($pipes[0], self::$stdin);
			\fclose($pipes[0]);
			$output = '';
			while (!\feof($pipes[1])) {
				$stdout = \fgets($pipes[1], 1024);
				if ($stdout === '') {
					break;
				}

				echo $stdout;

				if ($closureOut instanceof \Closure) {
					$closureOut($stdout);
				}
				$output .= $stdout;
			}
			$error_output = \trim(\stream_get_contents($pipes[2]));
			if (self::$displayStderr) {
				echo $error_output;
			}
			self::$output = $output;
			\fclose($pipes[1]);
			\fclose($pipes[2]);
			$return_value = \proc_close($process);
			if ($return_value !== 0) {
				throw new ShellException($error_output, $return_value);
			}
		} else {
			throw new ShellException('Process failed to spawn');
		}
	}
989988
public function call(string $name, ...$arguments): self
    {
        $this->type = self::TYPE_CALL;
        $this->name = $name;
        $this->setValue($arguments, $this->type);

        return $this;
    }
213726
final public function call($method, array $arguments = array())
    {
        $this->definition->addMethodCall($method, static::processValue($arguments, true));

        return $this;
    }
1064790
public static function make(array $arguments = [])
    {
        $class = static::getFacadeAccessor();

        try {
            $reflection = new \ReflectionClass(static::getFacadeAccessor());
            $parameters = $reflection->getConstructor()->getParameters();
        } catch (\Throwable $error) {
            throw new \Exception('Wrong parameter', 0, $error);
        }

        return new $class(...static::composeMakeParameters($parameters, $arguments));
    }
373104
protected function loadSettingsIntoArguments($arguments)
    {
        if (!isset($arguments['settings']) && $this->templateVariableContainer->exists('settings')) {
            $arguments['settings'] = $this->templateVariableContainer->get('settings');
        }
        return $arguments;
    }
1039345
public function call($className, $method, $arguments = null)
    {
        $callable = [$className, $method];
        if ($arguments === null) {
            return call_user_func($callable);
        } else {
            return call_user_func_array($callable, $arguments);
        }
    }
301540
protected function setFields($arguments)
    {
        $fieldsConfig = SettingsUtility::getMergedSettings('dataFields', $this->settings, $this->getAction());
        $fields = [];

        // Use field list from query parameters or from defaults.
        if (array_key_exists('data-fields', $arguments) && $arguments['data-fields']) {
            $fields = explode(',', $arguments['data-fields']);
        } else {
            if ($fieldsConfig['default']) {
                $fields = array_values($fieldsConfig['default']);
            }
        }

        // If allowed fields are configured, keep only those.
        $allowedFields = $fieldsConfig['allow'];
        if ($allowedFields) {
            $fields = array_intersect($fields, $allowedFields);
        }

        // If disallowed fields are configured, remove those.
        $disallowedFields = $fieldsConfig['disallow'];
        if ($disallowedFields) {
            $fields = array_diff($fields, $disallowedFields);
        }

        // Only set fields of the query if there is a result. Otherwise use the default setting.
        if ($fields) {
            $this->query->setFields($fields);
        }
    }
776922
protected function invokeCommands(array $commands) {
    foreach ($commands as $key => $value) {
      if (is_numeric($key)) {
        $command = $value;
        $args = [];
      }
      else {
        $command = $key;
        $args = $value;
      }
      $this->invokeCommand($command, $args);
    }
  }
495209
public function addArguments($arguments = [])
    {
        if (null !== $arguments) {
            foreach ($arguments as $argument) {
                $this->addArgument($argument);
            }
        }
    }