GetUrlCommand::getBucket()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace diecoding\aws\s3\commands;
4
5
use diecoding\aws\s3\base\commands\ExecutableCommand;
6
use diecoding\aws\s3\interfaces\commands\HasBucket;
7
8
/**
9
 * Class GetUrlCommand
10
 *
11
 * @method string execute()
12
 *
13
 * @package diecoding\aws\s3\commands
14
 */
15
class GetUrlCommand extends ExecutableCommand implements HasBucket
16
{
17
    /** @var string */
18
    protected $bucket;
19
20
    /** @var string */
21
    protected $filename;
22
23
    /**
24
     * @return string
25
     */
26
    public function getBucket(): string
27
    {
28
        return (string)$this->bucket;
29
    }
30
31
    /**
32
     * @param string $name
33
     *
34
     * @return $this
35
     */
36
    public function inBucket(string $name)
37
    {
38
        $this->bucket = $name;
39
40
        return $this;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function getFilename(): string
47
    {
48
        return (string)$this->filename;
49
    }
50
51
    /**
52
     * @param string $filename
53
     *
54
     * @return $this
55
     */
56
    public function byFilename(string $filename)
57
    {
58
        $this->filename = $filename;
59
60
        return $this;
61
    }
62
}
63