MD5UrlSigner::createSignature()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Spatie\UrlSigner;
4
5
class MD5UrlSigner extends BaseUrlSigner
6
{
7
    /**
8
     * Generate a token to identify the secure action.
9
     *
10
     * @param \League\Url\UrlImmutable|string $url
11
     * @param string                          $expiration
12
     *
13
     * @return string
14
     */
15
    protected function createSignature($url, $expiration)
16
    {
17
        $url = (string) $url;
18
19
        return md5("{$url}::{$expiration}::{$this->signatureKey}");
20
    }
21
}
22