modules/acm_sku/src/AcquiaCommerce/SKUPluginManager.php
public function pluginInstanceFromType($type) {
    $plugin = NULL;

    try {
      $plugin = $this->getDefinition($type);
      $plugin = $this->createInstance($plugin['id']);
    }
    catch (\Exception $exception) {
      \Drupal::logger('acm_sku')->notice(t("Bundle @bundle doesn't appear to
        have an implementation, please check the plugin id on your implementation
        of the SKU plugin", ['@bundle' => $type]));
    } finally {
      return $plugin;
    }
  }
public function pluginInstanceFromType($type) {
    $plugin = NULL;

    try {
      $plugin = $this->getDefinition($type);
      $plugin = $this->createInstance($plugin['id']);
    }
    catch (\Exception $exception) {
      \Drupal::logger('acm_sku')->notice(t("Bundle @bundle doesn't appear to
        have an implementation, please check the plugin id on your implementation
        of the SKU plugin", ['@bundle' => $type]));
    } finally {
      return $plugin;
    }
  }
public function pluginInstanceFromType ( $ type ) { $ plugin = NULL ; try { $ plugin = $ this -> getDefinition ( $ type ) ; $ plugin = $ this -> createInstance ( $ plugin [ 'id' ] ) ; } catch ( \ Exception $ exception ) { \ Drupal :: logger ( 'acm_sku' ) -> notice ( t ( "Bundle @bundle doesn't appear to
        have an implementation, please check the plugin id on your implementation
        of the SKU plugin" , [ '@bundle' => $ type ] ) ) ; } finally { return $ plugin ; } }
Takes a type and checks it for a matching plugin.

@param string $type
The SKU to check for a plugin.

@return array|null
Returns the plugin definition if found, otherwise returns NULL.
Takes a type and checks it for a matching plugin .