protected function addAsset($type) {
    $asset = (new Asset())->type($type);
    $this->assets[] = $asset;
    return $asset;
  }
protected function addAsset($type) {
    $asset = (new Asset())->type($type);
    $this->assets[] = $asset;
    return $asset;
  }
protected function addAsset ( $ type ) { $ asset = ( new Asset ( ) ) -> type ( $ type ) ; $ this -> assets [ ] = $ asset ; return $ asset ; }
Creates an asset.

@param string $type
Asset type.

@return \DrupalCodeGenerator\Asset
The asset.
Creates an asset .