@@ 46-55 (lines=10) @@ | ||
43 | * @return MeasureConverter |
|
44 | * |
|
45 | */ |
|
46 | public function setFamily($family) |
|
47 | { |
|
48 | if (!isset($this->config[$family])) { |
|
49 | throw new UnknownFamilyMeasureException(); |
|
50 | } |
|
51 | ||
52 | $this->family = $family; |
|
53 | ||
54 | return $this; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * Convert a value from a base measure to a final measure |
@@ 84-93 (lines=10) @@ | ||
81 | * @throws \InvalidArgumentException |
|
82 | * @return array |
|
83 | */ |
|
84 | protected function getFamilyConfig($family) |
|
85 | { |
|
86 | if (!isset($this->config[$family])) { |
|
87 | throw new \InvalidArgumentException( |
|
88 | sprintf('Undefined measure family "%s"', $family) |
|
89 | ); |
|
90 | } |
|
91 | ||
92 | return $this->config[$family]; |
|
93 | } |
|
94 | } |
|
95 |