MD5UrlSigner   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createSignature() 0 6 1
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