public static function make(string $environment, array $credentials, LoggerInterface $logger = null)
    {
        // If no logger is passed, we will use the null logger
        $flow = new static($logger ?? new NullLogger());

        // Set the credentials, or throw an Exception if there is none
        $flow->setCredentials($credentials);

        // Set the production environment if set explicitly
        $flow->isProduction($environment === 'production');

        // Set the default Guzzle Adapter
        $flow->setAdapter(new GuzzleAdapter($flow));

        // Return a new instance of Flow
        return $flow;
    }
public static function make(string $environment, array $credentials, LoggerInterface $logger = null)
    {
        // If no logger is passed, we will use the null logger
        $flow = new static($logger ?? new NullLogger());

        // Set the credentials, or throw an Exception if there is none
        $flow->setCredentials($credentials);

        // Set the production environment if set explicitly
        $flow->isProduction($environment === 'production');

        // Set the default Guzzle Adapter
        $flow->setAdapter(new GuzzleAdapter($flow));

        // Return a new instance of Flow
        return $flow;
    }
public static function make ( string $ environment , array $ credentials , LoggerInterface $ logger = null ) { // If no logger is passed, we will use the null logger $ flow = new static ( $ logger ?? new NullLogger ( ) ) ; // Set the credentials, or throw an Exception if there is none $ flow -> setCredentials ( $ credentials ) ; // Set the production environment if set explicitly $ flow -> isProduction ( $ environment === 'production' ) ; // Set the default Guzzle Adapter $ flow -> setAdapter ( new GuzzleAdapter ( $ flow ) ) ; // Return a new instance of Flow return $ flow ; }
Creates a new Flow instance

@param string $environment
@param array $credentials
@param LoggerInterface|null $logger
@return Flow
@throws \Exception
Creates a new Flow instance