Completed
Push — master ( 4849ce...812ae9 )
by Greg
01:26
created

VagrantTransportFactory::check()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Consolidation\SiteProcess\Factory;
4
5
use Consolidation\SiteAlias\SiteAliasInterface;
6
use Consolidation\SiteProcess\Transport\VagrantTransport;
7
8
/**
9
 * VagrantTransportFactory will create a VagrantTransport for applicable site aliases.
10
 */
11
class VagrantTransportFactory implements TransportFactoryInterface
12
{
13
    /**
14
     * @inheritdoc
15
     */
16
    public function check(SiteAliasInterface $siteAlias)
17
    {
18
        return $siteAlias->has('vagrant');
19
    }
20
21
    /**
22
     * @inheritdoc
23
     */
24
    public function create(SiteAliasInterface $siteAlias)
25
    {
26
        return new VagrantTransport($siteAlias);
27
    }
28
}
29