]> git.mxchange.org Git - friendica-addons.git/blob
f4a2b639b1b85ca7254af8792b40916a48d8b084
[friendica-addons.git] /
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
12 namespace Fxp\Composer\AssetPlugin\Tests\Fixtures\Repository;
13
14 use Composer\Config;
15 use Composer\EventDispatcher\EventDispatcher;
16 use Composer\IO\IOInterface;
17 use Composer\Package\PackageInterface;
18 use Composer\Repository\RepositoryInterface;
19
20 /**
21  * Fixture for assets repository tests.
22  *
23  * @author François Pluchino <francois.pluchino@gmail.com>
24  */
25 class MockAssetRepository implements RepositoryInterface
26 {
27     /**
28      * Constructor.
29      *
30      * @param array                $repoConfig
31      * @param IOInterface          $io
32      * @param Config               $config
33      * @param EventDispatcher|null $eventDispatcher
34      */
35     public function __construct(array $repoConfig, IOInterface $io, Config $config,
36                                 EventDispatcher $eventDispatcher = null)
37     {
38     }
39
40     /**
41      * {@inheritdoc}
42      */
43     public function hasPackage(PackageInterface $package)
44     {
45         return false;
46     }
47
48     /**
49      * {@inheritdoc}
50      */
51     public function findPackage($name, $version)
52     {
53         return;
54     }
55
56     /**
57      * {@inheritdoc}
58      */
59     public function findPackages($name, $version = null)
60     {
61         return array();
62     }
63
64     /**
65      * {@inheritdoc}
66      */
67     public function getPackages()
68     {
69         return array();
70     }
71
72     /**
73      * {@inheritdoc}
74      */
75     public function search($query, $mode = 0, $type = null)
76     {
77         return array();
78     }
79
80     /**
81      * {@inheritdoc}
82      */
83     public function count()
84     {
85         return 0;
86     }
87 }