Code Duplication    Length = 42-56 lines in 2 locations

src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/UnverifiedSecondFactor.php 1 location

@@ 29-84 (lines=56) @@
26
 *     repositoryClass="Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\UnverifiedSecondFactorRepository"
27
 * )
28
 */
29
class UnverifiedSecondFactor implements \JsonSerializable
30
{
31
    /**
32
     * @ORM\Id
33
     * @ORM\Column(length=36)
34
     *
35
     * @var string
36
     */
37
    public $id;
38
39
    /**
40
     * @ORM\Column(length=36)
41
     *
42
     * @var string
43
     */
44
    public $identityId;
45
46
    /**
47
     * @ORM\Column(length=16)
48
     *
49
     * @var string
50
     */
51
    public $type;
52
53
    /**
54
     * The second factor identifier, ie. telephone number, Yubikey public ID, Tiqr ID
55
     *
56
     * @ORM\Column(length=255)
57
     *
58
     * @var string
59
     */
60
    public $secondFactorIdentifier;
61
62
    /**
63
     * @ORM\Column(length=32)
64
     *
65
     * @var string
66
     */
67
    public $verificationNonce;
68
69
    /**
70
     * @ORM\Column(type="stepup_datetime", nullable=false)
71
     *
72
     * @var DateTime
73
     */
74
    public $verificationNonceValidUntil;
75
76
    public function jsonSerialize()
77
    {
78
        return [
79
            'id'                       => $this->id,
80
            'type'                     => $this->type,
81
            'second_factor_identifier' => $this->secondFactorIdentifier
82
        ];
83
    }
84
}
85

src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/VettedSecondFactor.php 1 location

@@ 28-69 (lines=42) @@
25
 *     repositoryClass="Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\VettedSecondFactorRepository"
26
 * )
27
 */
28
class VettedSecondFactor implements \JsonSerializable
29
{
30
    /**
31
     * @ORM\Id
32
     * @ORM\Column(length=36)
33
     *
34
     * @var string
35
     */
36
    public $id;
37
38
    /**
39
     * @ORM\Column(length=36)
40
     *
41
     * @var string
42
     */
43
    public $identityId;
44
45
    /**
46
     * @ORM\Column(length=16)
47
     *
48
     * @var string
49
     */
50
    public $type;
51
52
    /**
53
     * The second factor identifier, ie. telephone number, Yubikey public ID, Tiqr ID
54
     *
55
     * @ORM\Column(length=255)
56
     *
57
     * @var string
58
     */
59
    public $secondFactorIdentifier;
60
61
    public function jsonSerialize()
62
    {
63
        return [
64
            'id'   => $this->id,
65
            'type' => $this->type,
66
            'second_factor_identifier' => $this->secondFactorIdentifier,
67
        ];
68
    }
69
}
70