Completed
Push — master ( 9c37c7...1d2d63 )
by Jens
08:02
created

ReviewRatingStatistics::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 10
ccs 0
cts 10
cp 0
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
7
namespace Commercetools\Core\Model\Review;
8
9
use Commercetools\Core\Model\Common\JsonObject;
10
11
/**
12
 * @package Commercetools\Core\Model\Review
13
 * @link https://dev.commercetools.com/http-api-projects-reviews.html#review-rating-statistics
14
 * @method float getAverageRating()
15
 * @method ReviewRatingStatistics setAverageRating(float $averageRating = null)
16
 * @method float getHighestRating()
17
 * @method ReviewRatingStatistics setHighestRating(float $highestRating = null)
18
 * @method float getLowestRating()
19
 * @method ReviewRatingStatistics setLowestRating(float $lowestRating = null)
20
 * @method int getCount()
21
 * @method ReviewRatingStatistics setCount(int $count = null)
22
 * @method array getRatingsDistribution()
23
 * @method ReviewRatingStatistics setRatingsDistribution(array $ratingsDistribution = null)
24
 */
25
class ReviewRatingStatistics extends JsonObject
26
{
27
    public function fieldDefinitions()
28
    {
29
        return [
30
            'averageRating' => [static::TYPE => 'float'],
31
            'highestRating' => [static::TYPE => 'float'],
32
            'lowestRating' => [static::TYPE => 'float'],
33
            'count' => [static::TYPE => 'int'],
34
            'ratingsDistribution' => [static::TYPE => 'array'],
35
        ];
36
    }
37
}
38