Skip to content

Commit ccebc30

Browse files
committed
Coding Changes
1 parent a7466c3 commit ccebc30

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/DataFields.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private function parseData($dataString)
7272

7373
// ($trimmedLine === '' && $currentField != 'FieldValue')
7474
// 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 === '')) {
7676
// Block completed; process it
7777
if (sizeof($field) > 0) {
7878
$output[] = $field;
@@ -86,9 +86,9 @@ private function parseData($dataString)
8686
$key = null;
8787
$value = null;
8888

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'
9292
&& !empty($field['FieldValue'])){
9393

9494
continue;
@@ -104,9 +104,9 @@ private function parseData($dataString)
104104
$key = $key ?: trim($parts[0]);
105105
$value = $value ?: trim($parts[1]);
106106

107-
if ($currentField == 'FieldValue' && !empty($value)) {
107+
if ($currentField === 'FieldValue' && !empty($value)) {
108108
$value = $this->getFieldValue($line,$dataString);
109-
} else if ($currentField == 'FieldValue'){
109+
} else if ($currentField === 'FieldValue'){
110110
$value = "";
111111
}
112112

@@ -140,9 +140,9 @@ private function parseData($dataString)
140140
*
141141
* @param string $line The current line being searched
142142
* @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.
144144
*/
145-
private function getFieldValue($line,$dataString)
145+
private function getFieldValue($line, $dataString)
146146
{
147147
// Offset 'FieldValue:'
148148
$pos1 = strpos($dataString, $line) + 11;

0 commit comments

Comments
 (0)