Code Duplication    Length = 8-8 lines in 2 locations

lib/Services/Ratings.php 2 locations

@@ 90-97 (lines=8) @@
87
     *
88
     * @return int
89
     */
90
    private function getRatingAverage($videoId)
91
    {
92
        $customMetaData = $this->getVideo($videoId)->getCustomMetadata();
93
94
        return array_key_exists($this->metadataFieldAverage, $customMetaData)
95
            ? (float) $customMetaData[$this->metadataFieldAverage]
96
            : 0;
97
    }
98
99
    /**
100
     * Returns the count of all ratings from the custom meta data fields from a given video.
@@ 106-113 (lines=8) @@
103
     *
104
     * @return int
105
     */
106
    private function getRatingCount($videoId)
107
    {
108
        $customMetaData = $this->getVideo($videoId)->getCustomMetadata();
109
110
        return array_key_exists($this->metadataFieldCount, $customMetaData)
111
            ? (float) $customMetaData[$this->metadataFieldCount]
112
            : 0;
113
    }
114
115
    /**
116
     * Stores the custom meta data fields with the api client.