ExistCommand::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\base\commands\traits\Options;
7
use diecoding\aws\s3\interfaces\commands\HasBucket;
8
9
/**
10
 * Class ExistCommand
11
 *
12
 * @method bool execute()
13
 *
14
 * @package diecoding\aws\s3\commands
15
 */
16
class ExistCommand extends ExecutableCommand implements HasBucket
17
{
18
    use Options;
19
20
    /** @var string */
21
    protected $bucket;
22
23
    /** @var string */
24
    protected $filename;
25
26
    /**
27
     * @return string
28
     */
29
    public function getBucket(): string
30
    {
31
        return (string)$this->bucket;
32
    }
33
34
    /**
35
     * @param string $name
36
     *
37
     * @return $this
38
     */
39
    public function inBucket(string $name)
40
    {
41
        $this->bucket = $name;
42
43
        return $this;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getFilename(): string
50
    {
51
        return (string)$this->filename;
52
    }
53
54
    /**
55
     * @param string $filename
56
     *
57
     * @return $this
58
     */
59
    public function byFilename(string $filename)
60
    {
61
        $this->filename = $filename;
62
63
        return $this;
64
    }
65
}
66