src/Concerns/ProvidesBrowser.php
protected function createBrowsersFor(Closure $callback)
    {
        if (count(static::$browsers) === 0) {
            static::$browsers = collect([$this->newBrowser($this->createWebDriver())]);
        }

        $additional = $this->browsersNeededFor($callback) - 1;

        for ($i = 0; $i < $additional; $i++) {
            static::$browsers->push($this->newBrowser($this->createWebDriver()));
        }

        return static::$browsers;
    }
protected function createBrowsersFor(Closure $callback)
    {
        if (count(static::$browsers) === 0) {
            static::$browsers = collect([$this->newBrowser($this->createWebDriver())]);
        }

        $additional = $this->browsersNeededFor($callback) - 1;

        for ($i = 0; $i < $additional; $i++) {
            static::$browsers->push($this->newBrowser($this->createWebDriver()));
        }

        return static::$browsers;
    }
protected function createBrowsersFor ( Closure $ callback ) { if ( count ( static :: $ browsers ) === 0 ) { static :: $ browsers = collect ( [ $ this -> newBrowser ( $ this -> createWebDriver ( ) ) ] ) ; } $ additional = $ this -> browsersNeededFor ( $ callback ) - 1 ; for ( $ i = 0 ; $ i < $ additional ; $ i ++ ) { static :: $ browsers -> push ( $ this -> newBrowser ( $ this -> createWebDriver ( ) ) ) ; } return static :: $ browsers ; }
Create the browser instances needed for the given callback.

@param  \Closure  $callback
@return array
@throws \ReflectionException
Create the browser instances needed for the given callback .