Code Duplication    Length = 13-14 lines in 2 locations

source/Snapshotter/AggregationHandler/Database/Sources/IncidentSource.php 2 locations

@@ 75-88 (lines=14) @@
72
     * @param array          $load
73
     * @return null|IncidentRecord
74
     */
75
    public function findStoredBySnapshotByPK(SnapshotRecord $snapshotRecord, $id, array $load = [])
76
    {
77
        /** @var IncidentRecord $incident */
78
        $incident = $this->findByPK($id, $load);
79
        if (
80
            empty($incident) ||
81
            !$incident->status->isStored() ||
82
            $incident->getExceptionHash() !== $snapshotRecord->exception_hash
83
        ) {
84
            return null;
85
        }
86
87
        return $incident;
88
    }
89
90
    /**
91
     * @param SnapshotRecord $snapshotRecord
@@ 96-108 (lines=13) @@
93
     * @param array          $load
94
     * @return null|IncidentRecord
95
     */
96
    public function findBySnapshotByPK(SnapshotRecord $snapshotRecord, $id, array $load = [])
97
    {
98
        /** @var IncidentRecord $incident */
99
        $incident = $this->findByPK($id, $load);
100
        if (
101
            empty($incident) ||
102
            $incident->getExceptionHash() !== $snapshotRecord->exception_hash
103
        ) {
104
            return null;
105
        }
106
107
        return $incident;
108
    }
109
110
    /**
111
     * @param SnapshotInterface $snapshot