StorageS3::key()   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 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Sfneal\Helpers\Aws\S3;
4
5
use Sfneal\Helpers\Aws\S3\Utils\S3;
6
7
class StorageS3
8
{
9
    /**
10
     * Instantiate an S3 object while only providing an S3 object key.
11
     *
12
     * @param string $key
13
     * @return S3
14
     */
15
    public static function key(string $key): S3
16
    {
17
        return new S3($key);
18
    }
19
20
    /**
21
     * Instantiate an S3 object while providing a filesystem disk and an S3 object key.
22
     *
23
     * @param string $disk
24
     * @param string $key
25
     * @return S3
26
     */
27
    public static function disk(string $disk, string $key): S3
28
    {
29
        return new S3($key, $disk);
30
    }
31
}
32