PaymentAntifraud   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 64
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getProvider() 0 3 1
A schema() 0 6 1
A setFingerprint() 0 4 1
A getFingerprint() 0 3 1
A __construct() 0 3 1
A setProvider() 0 4 1
1
<?php
2
3
namespace Ipag\Sdk\Model;
4
5
use Ipag\Sdk\Model\Schema\Schema;
6
use Ipag\Sdk\Model\Schema\SchemaBuilder;
7
8
/**
9
 * PaymentAntifraud Class
10
 *
11
 * Classe responsável por representar o recurso PaymentAntifraud.
12
 */
13
class PaymentAntifraud extends Model
14
{
15
    /**
16
     *  @param array $data
17
     *  array de dados do Payment Antifraud.
18
     *
19
     *  + [`'fingerprint'`] string.
20
     *  + [`'provider'`] string.
21
     */
22
    public function __construct(?array $data = [])
23
    {
24
        parent::__construct($data);
25
    }
26
27
    protected function schema(SchemaBuilder $schema): Schema
28
    {
29
        $schema->string('fingerprint')->nullable();
30
        $schema->string('provider')->nullable();
31
32
        return $schema->build();
33
    }
34
35
    /**
36
     * Retorna o valor da propriedade `fingerprint`.
37
     *
38
     * @return string|null
39
     */
40
    public function getFingerprint(): ?string
41
    {
42
        return $this->get('fingerprint');
43
    }
44
45
    /**
46
     * Seta o valor da propriedade `fingerprint`.
47
     *
48
     * @param string|null $fingerprint
49
     * @return self
50
     */
51
    public function setFingerprint(?string $fingerprint = null): self
52
    {
53
        $this->set('fingerprint', $fingerprint);
54
        return $this;
55
    }
56
57
    /**
58
     * Retorna o valor da propriedade `provider`.
59
     *
60
     * @return string|null
61
     */
62
    public function getProvider(): ?string
63
    {
64
        return $this->get('provider');
65
    }
66
67
    /**
68
     * Seta o valor da propriedade `provider`.
69
     *
70
     * @param string|null $provider
71
     * @return self
72
     */
73
    public function setProvider(?string $provider = null): self
74
    {
75
        $this->set('provider', $provider);
76
        return $this;
77
    }
78
79
}