Options::withOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace diecoding\aws\s3\base\commands\traits;
4
5
/**
6
 * Trait Options
7
 *
8
 * @package diecoding\aws\s3\base\commands\traits
9
 */
10
trait Options
11
{
12
    /** @var array */
13
    protected $options = [];
14
15
    /**
16
     * @param array $value
17
     *
18
     * @return $this
19
     */
20
    final public function withOptions(array $value)
21
    {
22
        $this->options = $value;
23
24
        return $this;
25
    }
26
27
    /**
28
     * @return array
29
     */
30
    final public function getOptions(): array
31
    {
32
        return $this->options;
33
    }
34
35
    /**
36
     * @param string $name
37
     * @param mixed  $value
38
     *
39
     * @return $this
40
     */
41
    final public function withOption(string $name, $value)
42
    {
43
        $this->options[$name] = $value;
44
45
        return $this;
46
    }
47
}
48