src/SmartCNAB/Support/File/Remittance.php 1 location
|
@@ 120-132 (lines=13) @@
|
117 |
|
* @param string $type |
118 |
|
* @return array |
119 |
|
*/ |
120 |
|
protected function formatLine(array $data, $type = 'detail') |
121 |
|
{ |
122 |
|
$metas = $this->schema[$type]; |
123 |
|
$fields = array_keys($metas); |
124 |
|
|
125 |
|
$formatted = array_map( |
126 |
|
$this->getFormatMapper($data, $type), |
127 |
|
$metas, |
128 |
|
$fields |
129 |
|
); |
130 |
|
|
131 |
|
return array_combine($fields, $formatted); |
132 |
|
} |
133 |
|
|
134 |
|
/** |
135 |
|
* Create and returns a new line format mapper using received parameters. |
src/SmartCNAB/Support/File/Returning.php 1 location
|
@@ 120-128 (lines=9) @@
|
117 |
|
* @param string $type |
118 |
|
* @return array |
119 |
|
*/ |
120 |
|
protected function parseLine($data, $type = 'detail') |
121 |
|
{ |
122 |
|
$metas = $this->schema[$type]; |
123 |
|
$fields = array_keys($metas); |
124 |
|
|
125 |
|
$parsed = array_map($this->getParseMapper($data), $metas); |
126 |
|
|
127 |
|
return array_combine($fields, $parsed); |
128 |
|
} |
129 |
|
} |
130 |
|
|