@@ -72,7 +72,7 @@ private function parseData($dataString)
72
72
73
73
// ($trimmedLine === '' && $currentField != 'FieldValue')
74
74
// Don't start new field for an empty line in a multi-line FieldValue
75
- if ($ trimmedLine === '--- ' || ($ currentField != 'FieldValue ' && $ trimmedLine === '' )) {
75
+ if ($ trimmedLine === '--- ' || ($ currentField !== 'FieldValue ' && $ trimmedLine === '' )) {
76
76
// Block completed; process it
77
77
if (sizeof ($ field ) > 0 ) {
78
78
$ output [] = $ field ;
@@ -86,9 +86,9 @@ private function parseData($dataString)
86
86
$ key = null ;
87
87
$ value = null ;
88
88
89
- //Continue through lines already process from FieldValue
90
- if ($ currentField == 'FieldValue '
91
- && $ parts [0 ] != 'FieldJustification '
89
+ //Continue through lines already processed from FieldValue
90
+ if ($ currentField === 'FieldValue '
91
+ && $ parts [0 ] !== 'FieldJustification '
92
92
&& !empty ($ field ['FieldValue ' ])){
93
93
94
94
continue ;
@@ -104,9 +104,9 @@ private function parseData($dataString)
104
104
$ key = $ key ?: trim ($ parts [0 ]);
105
105
$ value = $ value ?: trim ($ parts [1 ]);
106
106
107
- if ($ currentField == 'FieldValue ' && !empty ($ value )) {
107
+ if ($ currentField === 'FieldValue ' && !empty ($ value )) {
108
108
$ value = $ this ->getFieldValue ($ line ,$ dataString );
109
- } else if ($ currentField == 'FieldValue ' ){
109
+ } else if ($ currentField === 'FieldValue ' ){
110
110
$ value = "" ;
111
111
}
112
112
@@ -140,9 +140,9 @@ private function parseData($dataString)
140
140
*
141
141
* @param string $line The current line being searched
142
142
* @param string $dataString
143
- * @return bool|string
143
+ * @return bool|string Returns a string containing the value for FieldValue e.g. Text\n\nMoreText\nSomething etc.
144
144
*/
145
- private function getFieldValue ($ line ,$ dataString )
145
+ private function getFieldValue ($ line , $ dataString )
146
146
{
147
147
// Offset 'FieldValue:'
148
148
$ pos1 = strpos ($ dataString , $ line ) + 11 ;
0 commit comments