Skip to content

InvalidArgumentException

github-actions[bot] edited this page Oct 16, 2026 · 3 revisions

Class InvalidArgumentException.

Specialized exception for handling invalid arguments within the configuration context. This class SHALL be used to provide meaningful errors when invalid data is passed to configuration components.


  • Full name: \FastForward\Config\Exception\InvalidArgumentException
  • Parent class: InvalidArgumentException
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

forEmptyPath

Thrown when a configuration lookup path is empty.

public static forEmptyPath(): self
  • This method is static. Return Value:

the exception indicating the path cannot be empty


forNonStringKeyWithValue

Thrown when the key is not a string but a value is provided.

public static forNonStringKeyWithValue(): self
  • This method is static. Return Value:

the exception indicating the key must be a string


forUnreadableDirectory

Thrown when a given directory does not exist or is not readable.

public static forUnreadableDirectory(string $directory): self
  • This method is static. Parameters:
Parameter Type Description
$directory string the path to the invalid directory

Return Value:

the exception indicating an invalid or unreadable directory


forUnreadableFile

Thrown when a given file does not exist or is not readable.

public static forUnreadableFile(string $file): self
  • This method is static. Parameters:
Parameter Type Description
$file string the path to the invalid file

Return Value:

the exception indicating an invalid or unreadable file


forUnwritableFile

Thrown when a configuration file is not writable.

public static forUnwritableFile(string $file): self
  • This method is static. Parameters:
Parameter Type Description
$file string the path to the unwritable file

Return Value:

the exception indicating an unwritable file


forInvalidConfigFile

Thrown when a configuration file does not return an array.

public static forInvalidConfigFile(string $file): self
  • This method is static. Parameters:
Parameter Type Description
$file string the path to the configuration file

Return Value:

the exception indicating an invalid configuration file


Clone this wiki locally