forked from symfony/flex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInformationOperation.php
49 lines (41 loc) · 934 Bytes
/
InformationOperation.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace Symfony\Flex;
use Composer\DependencyResolver\Operation\SolverOperation;
use Composer\Package\PackageInterface;
/**
* @author Maxime Hélias <[email protected]>
*/
class InformationOperation extends SolverOperation
{
private $package;
public function __construct(PackageInterface $package, $reason = null)
{
parent::__construct($reason);
$this->package = $package;
}
/**
* Returns package instance.
*
* @return PackageInterface
*/
public function getPackage()
{
return $this->package;
}
/**
* Returns job type.
*
* @return string
*/
public function getJobType()
{
return 'information';
}
/**
* {@inheritdoc}
*/
public function __toString()
{
return 'Information '.$this->package->getPrettyName().' ('.$this->formatVersion($this->package).')';
}
}