public static function load(string $filename = 'my-addresses.php'): array
    {
        $file = (new static())->getDirectoryPaths()
            ->map(function ($path) use ($filename) {
                return $path . $filename;
            })
            ->first(function ($file) {
                return file_exists($file);
            });

        if (!$file) {
            throw new PartialNotFoundException(vsprintf('%s does not exist.', [
            $filename,
          ]));
        }

        return include $file;
    }
public static function load(string $filename = 'my-addresses.php'): array
    {
        $file = (new static())->getDirectoryPaths()
            ->map(function ($path) use ($filename) {
                return $path . $filename;
            })
            ->first(function ($file) {
                return file_exists($file);
            });

        if (!$file) {
            throw new PartialNotFoundException(vsprintf('%s does not exist.', [
            $filename,
          ]));
        }

        return include $file;
    }
public static function load ( string $ filename = 'my-addresses.php' ) : array { $ file = ( new static ( ) ) -> getDirectoryPaths ( ) -> map ( function ( $ path ) use ( $ filename ) { return $ path . $ filename ; } ) -> first ( function ( $ file ) { return file_exists ( $ file ) ; } ) ; if ( ! $ file ) { throw new PartialNotFoundException ( vsprintf ( '%s does not exist.' , [ $ filename , ] ) ) ; } return include $ file ; }
Load addresses from a file.

@param string $filename The filename to load.

@return array
Load addresses from a file .