mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-09-19 13:05:15 +00:00
20862be7d0
- slim/slim: ^3.1 - symfony/expression-language: ^3.4 - fxp/composer-asset-plugin: ~1.3 - bower-asset/vue: ^2.5 - bower-asset/vue-resource: ^1.5
145 lines
2.3 KiB
PHP
145 lines
2.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Fxp Composer Asset Plugin package.
|
|
*
|
|
* (c) François Pluchino <francois.pluchino@gmail.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Fxp\Composer\AssetPlugin\Tests\Fixtures\Repository\Vcs;
|
|
|
|
use Composer\Config;
|
|
use Composer\IO\IOInterface;
|
|
use Composer\Repository\Vcs\VcsDriverInterface;
|
|
|
|
/**
|
|
* Mock vcs driver.
|
|
*
|
|
* @author François Pluchino <francois.pluchino@gmail.com>
|
|
*/
|
|
class MockVcsDriver implements VcsDriverInterface
|
|
{
|
|
/**
|
|
* @var bool
|
|
*/
|
|
public static $supported = true;
|
|
|
|
/**
|
|
* @var mixed
|
|
*/
|
|
public $contents = null;
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function initialize()
|
|
{
|
|
// no action
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getComposerInformation($identifier)
|
|
{
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getRootIdentifier()
|
|
{
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getBranches()
|
|
{
|
|
return array();
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getTags()
|
|
{
|
|
return array();
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getDist($identifier)
|
|
{
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getSource($identifier)
|
|
{
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getUrl()
|
|
{
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function hasComposerFile($identifier)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function cleanup()
|
|
{
|
|
// no action
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function supports(IOInterface $io, Config $config, $url, $deep = false)
|
|
{
|
|
return static::$supported;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
protected function getContents()
|
|
{
|
|
return $this->contents;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getFileContent($file, $identifier)
|
|
{
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getChangeDate($identifier)
|
|
{
|
|
return new \DateTime();
|
|
}
|
|
}
|