SignatureTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 2 Features 0
Metric Value
eloc 2
c 3
b 2
f 0
dl 0
loc 15
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A gmt_iso8601() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the iidestiny/flysystem-oss.
5
 *
6
 * (c) iidestiny <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Iidestiny\Flysystem\Oss\Traits;
13
14
trait SignatureTrait
15
{
16
    /**
17
     * gmt.
18
     *
19
     * @param $time
20
     *
21
     * @return string
22
     *
23
     * @throws \Exception
24
     */
25
    public function gmt_iso8601($time)
26
    {
27
        // fix bug https://connect.console.aliyun.com/connect/detail/162632
28
        return (new \DateTime(null, new \DateTimeZone('UTC')))->setTimestamp($time)->format('Y-m-d\TH:i:s\Z');
29
    }
30
}
31