GuzzleTeleporter::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of Compressy.
5
 *
6
 * (c) Alchemy <[email protected]>
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 Gocobachi\Compressy\Resource\Teleporter;
13
14
use Gocobachi\Compressy\Resource\Reader\Guzzle\GuzzleReaderFactory;
15
use Gocobachi\Compressy\Resource\ResourceLocator;
16
use Gocobachi\Compressy\Resource\ResourceReaderFactory;
17
use Gocobachi\Compressy\Resource\Writer\FilesystemWriter;
18
19
/**
20
 * Guzzle Teleporter implementation for HTTP resources
21
 *
22
 * @deprecated Use \Alchemy\Compressy\Resource\GenericTeleporter instead. This class will be removed in v0.5.x
23
 */
24
class GuzzleTeleporter extends GenericTeleporter
25
{
26
    /**
27
     * @param ResourceReaderFactory $readerFactory
28
     * @param ResourceLocator $resourceLocator
29
     */
30
    public function __construct(ResourceReaderFactory $readerFactory = null, ResourceLocator $resourceLocator = null)
31
    {
32
        parent::__construct($readerFactory ?: new GuzzleReaderFactory(), new FilesystemWriter(), $resourceLocator);
33
    }
34
35
    /**
36
     * Creates the GuzzleTeleporter
37
     *
38
     * @deprecated This method will be removed in v0.5.x
39
     * @return GuzzleTeleporter
40
     */
41
    public static function create()
42
    {
43
        return new static();
44
    }
45
}
46