Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function parseString($inputString) |
||
37 | { |
||
38 | $fields = array(); |
||
39 | foreach($this->substringMap as $name => $location) { |
||
40 | $fields[$name] = substr($inputString, $location->getOffset(), $location->getLength()); |
||
41 | if(null !== $this->trim) { |
||
42 | $fields[$name] = trim($fields[$name], $this->trim); |
||
43 | } |
||
44 | } |
||
45 | return $fields; |
||
46 | } |
||
47 | } |
||
48 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.