bragento/bragento-composer-installer

View on GitHub
src/Mapping/Exception/MappingNotFoundException.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
 * MappingNotFoundException.php
 *
 * PHP Version 5
 *
 * @category  Bragento_MagentoComposerInstaller
 * @package   Bragento\Magento\Composer\Installer\Mapping\Exception
 * @author    David Verholen <david.verholen@brandung.de>
 * @copyright 2014 Brandung GmbH & Co. KG
 * @license   http://opensource.org/licenses/OSL-3.0 OSL-3.0
 * @link      http://www.brandung.de
 */

namespace Bragento\Magento\Composer\Installer\Mapping\Exception;

use Composer\Package\PackageInterface;
use Exception;

/**
 * Class MappingNotFoundException
 *
 * @category  Bragento_MagentoComposerInstaller
 * @package   Bragento\Magento\Composer\Installer\Mapping\Exception
 * @author    David Verholen <david.verholen@brandung.de>
 * @copyright 2014 Brandung GmbH & Co. KG
 * @license   http://opensource.org/licenses/OSL-3.0 OSL-3.0
 * @link      http://www.brandung.de
 */
class MappingNotFoundException extends MappingException
{
    /**
     * @param PackageInterface $package
     * @param int              $code
     * @param Exception        $previous
     */
    public function __construct(
        PackageInterface $package,
        $code = 0,
        Exception $previous = null
    ) {
        $message = sprintf(
            'mapping for package %s not found',
            $package->getName()
        );
        parent::__construct($message, $code, $previous);
    }
}