Completed
Push — master ( a02710...7ee086 )
by Jelle
09:44
created

PropertyMapDefinition::getPropertyMaps()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace TheSportsDb\PropertyMapper;
4
5
/**
6
 * Describes a property map definition.
7
 *
8
 * @author Jelle Sebreghts
9
 */
10
class PropertyMapDefinition {
11
12
  protected $propertyMaps = [];
13
14
  public function addPropertyMap(PropertyDefinition $source, PropertyDefinition $destination, callable $transform = NULL, callable $reverse = NULL) {
15
    $this->propertyMaps[] = new PropertyMap(
16
      $source,
17
      $destination,
18
      $transform,
19
      $reverse
20
    );
21
    return $this;
22
  }
23
24
  /**
25
   * Gets the property maps.
26
   * 
27
   * @return \TheSportsDb\PropertyMapper\PropertyMap[]
28
   */
29
  public function getPropertyMaps() {
30
    return $this->propertyMaps;
31
  }
32
33
34
}
35