protected function requireFile(string $path): array
	{
		$files   = Services::locator()->search($path);
		$strings = [];

		foreach ($files as $file)
		{
			// On some OS's we were seeing failures
			// on this command returning boolean instead
			// of array during testing, so we've removed
			// the require_once for now.
			if (is_file($file))
			{
				$strings[] = require $file;
			}
		}

		if (isset($strings[1]))
		{
			$strings = array_replace_recursive(...$strings);
		}
		elseif (isset($strings[0]))
		{
			$strings = $strings[0];
		}

		return $strings;
	}
protected function requireFile(string $path): array
	{
		$files   = Services::locator()->search($path);
		$strings = [];

		foreach ($files as $file)
		{
			// On some OS's we were seeing failures
			// on this command returning boolean instead
			// of array during testing, so we've removed
			// the require_once for now.
			if (is_file($file))
			{
				$strings[] = require $file;
			}
		}

		if (isset($strings[1]))
		{
			$strings = array_replace_recursive(...$strings);
		}
		elseif (isset($strings[0]))
		{
			$strings = $strings[0];
		}

		return $strings;
	}
protected function requireFile ( string $ path ) : array { $ files = Services :: locator ( ) -> search ( $ path ) ; $ strings = [ ] ; foreach ( $ files as $ file ) { // On some OS's we were seeing failures // on this command returning boolean instead // of array during testing, so we've removed // the require_once for now. if ( is_file ( $ file ) ) { $ strings [ ] = require $ file ; } } if ( isset ( $ strings [ 1 ] ) ) { $ strings = array_replace_recursive ( ... $ strings ) ; } elseif ( isset ( $ strings [ 0 ] ) ) { $ strings = $ strings [ 0 ] ; } return $ strings ; }
A simple method for including files that can be
overridden during testing.

@param string $path

@return array
A simple method for including files that can be overridden during testing .