1<?php
2
3/*
4 * This file is part of the Fxp Composer Asset Plugin package.
5 *
6 * (c) François Pluchino <francois.pluchino@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Fxp\Composer\AssetPlugin\Tests\Fixtures\Repository;
13
14use Composer\Config;
15use Composer\EventDispatcher\EventDispatcher;
16use Composer\IO\IOInterface;
17use Composer\Package\PackageInterface;
18use Composer\Repository\RepositoryInterface;
19
20/**
21 * Fixture for assets repository tests.
22 *
23 * @author François Pluchino <francois.pluchino@gmail.com>
24 */
25class MockAssetRepository implements RepositoryInterface
26{
27    /**
28     * Constructor.
29     *
30     * @param array                $repoConfig
31     * @param IOInterface          $io
32     * @param Config               $config
33     * @param null|EventDispatcher $eventDispatcher
34     */
35    public function __construct(
36        array $repoConfig,
37        IOInterface $io,
38        Config $config,
39        EventDispatcher $eventDispatcher = null
40    ) {
41    }
42
43    /**
44     * {@inheritdoc}
45     */
46    public function hasPackage(PackageInterface $package)
47    {
48        return false;
49    }
50
51    /**
52     * {@inheritdoc}
53     */
54    public function findPackage($name, $version)
55    {
56    }
57
58    /**
59     * {@inheritdoc}
60     */
61    public function findPackages($name, $version = null)
62    {
63        return array();
64    }
65
66    /**
67     * {@inheritdoc}
68     */
69    public function getPackages()
70    {
71        return array();
72    }
73
74    /**
75     * {@inheritdoc}
76     */
77    public function search($query, $mode = 0, $type = null)
78    {
79        return array();
80    }
81
82    /**
83     * {@inheritdoc}
84     */
85    public function count()
86    {
87        return 0;
88    }
89}
90