EcStateRatingSerializer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 3
c 3
b 0
f 1
lcom 0
cbo 1
dl 0
loc 24
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A attributes() 0 3 1
A id() 0 3 1
A getId() 0 3 1
1
<?php
2
3
/**
4
 * @file
5
 * Contains Drupal\esdportal_api\Serializers\EcStateRatingSerializer.
6
 */
7
8
namespace Drupal\esdportal_api\Serializers;
9
10
use Tobscure\JsonApi\SerializerAbstract;
11
12
/**
13
 * Serializes early childhood state ratings.
14
 */
15
class EcStateRatingSerializer extends SerializerAbstract {
16
  protected $type = 'ec_state_ratings';
17
18
  /**
19
   * Nothing special.
20
   */
21
  protected function attributes($ec_state_rating) {
22
    return $ec_state_rating;
23
  }
24
25
  /**
26
   * Sets the id.
27
   */
28
  protected function id($ec_state_rating) {
29
    return $ec_state_rating->rating_id;
30
  }
31
  /**
32
   * Backwards compatible.
33
   */
34
  protected function getId($ec_state_rating) {
35
    return $ec_state_rating->rating_id;
36
  }
37
38
}
39