@@ 62-65 (lines=4) @@ | ||
59 | $oL = new DamerauLevenshtein($this->title, $item->titleOrg); |
|
60 | $fTitleRatio = $oL->getRelativeDistance(); |
|
61 | } |
|
62 | if (null !== $this->director && null !== $item->directorDisplay) { |
|
63 | $oL = new DamerauLevenshtein($this->director, $item->directorDisplay); |
|
64 | $fDirectorRatio = $oL->getRelativeDistance(); |
|
65 | } |
|
66 | if (null !== $this->year && null !== $item->year) { |
|
67 | $oL = new DamerauLevenshtein($this->year, $item->year); |
|
68 | $fYearRatio = $oL->getRelativeDistance(); |
|
@@ 66-69 (lines=4) @@ | ||
63 | $oL = new DamerauLevenshtein($this->director, $item->directorDisplay); |
|
64 | $fDirectorRatio = $oL->getRelativeDistance(); |
|
65 | } |
|
66 | if (null !== $this->year && null !== $item->year) { |
|
67 | $oL = new DamerauLevenshtein($this->year, $item->year); |
|
68 | $fYearRatio = $oL->getRelativeDistance(); |
|
69 | } |
|
70 | $score = round((($fTitleRatio + $fDirectorRatio + $fYearRatio) / 3) * 100, 3); |
|
71 | ||
72 | $this->items[] = new RatioElement($score, $item); |