src/mako/reactor/Dispatcher.php
protected function checkForMissingArgumentsOrOptions(array $commandArguments, array $providedArguments, string $exception): void
	{
		$providedArguments = array_keys($providedArguments);

		foreach($commandArguments as $name => $details)
		{
			if(isset($details['optional']) && $details['optional'] === false && !in_array($name, $providedArguments))
			{
				$type = $exception === MissingArgumentException::class ? 'argument' : 'option';

				throw new $exception(vsprintf('Missing required %s [ %s ].', [$type, $name]), $name);
			}
		}
	}
protected function checkForMissingArgumentsOrOptions(array $commandArguments, array $providedArguments, string $exception): void
	{
		$providedArguments = array_keys($providedArguments);

		foreach($commandArguments as $name => $details)
		{
			if(isset($details['optional']) && $details['optional'] === false && !in_array($name, $providedArguments))
			{
				$type = $exception === MissingArgumentException::class ? 'argument' : 'option';

				throw new $exception(vsprintf('Missing required %s [ %s ].', [$type, $name]), $name);
			}
		}
	}
protected function checkForMissingArgumentsOrOptions ( array $ commandArguments , array $ providedArguments , string $ exception ) : void { $ providedArguments = array_keys ( $ providedArguments ) ; foreach ( $ commandArguments as $ name => $ details ) { if ( isset ( $ details [ 'optional' ] ) && $ details [ 'optional' ] === false && ! in_array ( $ name , $ providedArguments ) ) { $ type = $ exception === MissingArgumentException :: class ? 'argument' : 'option' ; throw new $ exception ( vsprintf ( 'Missing required %s [ %s ].' , [ $ type , $ name ] ) , $ name ) ; } } }
Checks for missing required arguments or options.

@param  array                                      $commandArguments  Command arguments
@param  array                                      $providedArguments Provided arguments
@param  string                                     $exception         Exception to throw
@throws \mako\reactor\exceptions\ArgumentException
Checks for missing required arguments or options .