Eloquent\Composer\NpmBridge\NpmBridgeFactory::create PHP Метод

create() публичный статический Метод

Create a new NPM bridge factory.
public static create ( ) : self
Результат self The newly created factory.
    public static function create()
    {
        return new self(new NpmVendorFinder(), NpmClient::create());
    }

Usage Example

 /**
  * Construct a new Composer NPM bridge plugin.
  *
  * @param NpmBridgeFactory|null $bridgeFactory The bridge factory to use.
  */
 public function __construct(NpmBridgeFactory $bridgeFactory = null)
 {
     if (null === $bridgeFactory) {
         $bridgeFactory = NpmBridgeFactory::create();
     }
     $this->bridgeFactory = $bridgeFactory;
 }