Passed
Pull Request — master (#54)
by
unknown
02:23
created

SignatureTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 12
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A gmt_iso8601() 0 3 1
1
<?php
2
3
namespace Jason\Flysystem\Oss\Traits;
4
5
trait SignatureTrait
6
{
7
8
    /**
9
     * gmt.
10
     * @param $time
11
     * @return string
12
     * @throws \Exception
13
     */
14
    public function gmt_iso8601($time)
15
    {
16
        return (new \DateTime(null, new \DateTimeZone('UTC')))->setTimestamp($time)->format('Y-m-d\TH:i:s\Z');
17
    }
18
19
}
20