Code Duplication    Length = 13-14 lines in 2 locations

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

@@ 87-99 (lines=13) @@
84
     */
85
    public $registrationRequestedAt;
86
87
    public function jsonSerialize()
88
    {
89
        return [
90
            'id'   => $this->id,
91
            'type' => $this->type,
92
            'second_factor_identifier' => $this->secondFactorIdentifier,
93
            'registration_code' => $this->registrationCode,
94
            'registration_requested_at' => $this->registrationRequestedAt->format('c'),
95
            'identity_id' => $this->identityId,
96
            'institution' => $this->institution,
97
            'common_name' => $this->commonName,
98
        ];
99
    }
100
}
101

src/Surfnet/StepupMiddleware/ApiBundle/Identity/Value/RegistrationAuthorityCredentials.php 1 location

@@ 147-160 (lines=14) @@
144
        return $other->jsonSerialize() === $this->jsonSerialize();
145
    }
146
147
    public function jsonSerialize()
148
    {
149
        return [
150
            'id' => $this->identityId,
151
            'attributes' => [
152
                'institution'         => $this->institution,
153
                'common_name'         => $this->commonName,
154
                'location'            => $this->location,
155
                'contact_information' => $this->contactInformation,
156
                'is_raa'              => ($this->isRaa || $this->isSraa),
157
                'is_sraa'             => $this->isSraa,
158
            ]
159
        ];
160
    }
161
162
    /**
163
     * @return string