src/Mordilion/Configurable/Configuration/Factory.php
public static function create(string $data, ?string $identifier = null): Configuration
    {
        if (strlen($data) <= PHP_MAXPATHLEN && is_file($data)) {
            return static::fromFile($data, $identifier);
        }

        return static::fromString($data, $identifier);
    }
public static function create(string $data, ?string $identifier = null): Configuration
    {
        if (strlen($data) <= PHP_MAXPATHLEN && is_file($data)) {
            return static::fromFile($data, $identifier);
        }

        return static::fromString($data, $identifier);
    }
public static function create ( string $ data , ? string $ identifier = null ) : Configuration { if ( strlen ( $ data ) <= PHP_MAXPATHLEN && is_file ( $ data ) ) { return static :: fromFile ( $ data , $ identifier ) ; } return static :: fromString ( $ data , $ identifier ) ; }
Creates a Configuration based on the provided $data. The $data can be a filename or a string.

@param string $data
@param string|null $identifier

@throws \InvalidArgumentException if the provided data is not a string

@return Configuration
Creates a Configuration based on the provided $data . The $data can be a filename or a string .