Skip to content

Commit 29abbff

Browse files
authored
Merge pull request #10 from MARCspec/analysis-zEQjWD
Apply fixes from StyleCI
2 parents c7f2fca + dc092bd commit 29abbff

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/File_MARC_Reference.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private function interpreteSpec()
131131
}
132132
} // end foreach subfield spec
133133
}
134-
} else if ($this->spec->offsetExists('indicator')) {
134+
} elseif ($this->spec->offsetExists('indicator')) {
135135
if ($this->field instanceof File_MARC_Data_Field) {
136136
/*
137137
* Field SubSpec validation
@@ -144,7 +144,7 @@ private function interpreteSpec()
144144
continue; // field subspec must be valid
145145
}
146146
}
147-
$position = (int)$this->currentSpec['indicator']['position'];
147+
$position = (int) $this->currentSpec['indicator']['position'];
148148
$this->ref($this->currentSpec['indicator'], $this->field->getIndicator($position));
149149
}
150150
} else {
@@ -159,7 +159,7 @@ private function interpreteSpec()
159159
continue; // field subspec must be valid
160160
}
161161
}
162-
162+
163163
$this->ref($this->currentSpec['field'], $this->field);
164164
}
165165
$fieldIndex++;
@@ -168,28 +168,28 @@ private function interpreteSpec()
168168
}
169169

170170
/**
171-
* Get the current field index
172-
*
173-
* @param string $prevTag The previous field tag
174-
* @param string $tag The current field tag
175-
* @param int $fieldIndex The current field index
176-
*
177-
* @return int $fieldIndex The current field index
178-
*/
171+
* Get the current field index.
172+
*
173+
* @param string $prevTag The previous field tag
174+
* @param string $tag The current field tag
175+
* @param int $fieldIndex The current field index
176+
*
177+
* @return int $fieldIndex The current field index
178+
*/
179179
private function getFieldIndex($prevTag, $tag, $fieldIndex)
180180
{
181-
if($prevTag == $tag or '' == $prevTag) {
181+
if ($prevTag == $tag or '' == $prevTag) {
182182
return $fieldIndex; // iteration of field index will continue
183183
}
184184
$specTag = $this->currentSpec['field']->getTag();
185-
if( preg_match('/'.$specTag.'/', $tag) ) {
185+
if (preg_match('/'.$specTag.'/', $tag)) {
186186
// not same field tag, but field spec tag matches
187-
return $fieldIndex; # iteration of field index will continue
187+
return $fieldIndex; // iteration of field index will continue
188188
}
189189
// not same field tag, iteration gets reset
190190
return $this->spec['field']->getIndexStart();
191191
}
192-
192+
193193
/**
194194
* Iterate on subspecs.
195195
*
@@ -316,7 +316,7 @@ private function validateSubSpec()
316316
break;
317317

318318
case '~':
319-
if (0 < count(
319+
if (0 < count(
320320
array_uintersect(
321321
$leftSubTerm,
322322
$rightSubTerm,
@@ -335,7 +335,7 @@ function ($v1, $v2) {
335335
break;
336336

337337
case '!~':
338-
if (0 < count(
338+
if (0 < count(
339339
array_uintersect(
340340
$leftSubTerm,
341341
$rightSubTerm,

test/ReferenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public function testWildCardFieldWithSubspec()
340340
{
341341
$Reference = new File_MARC_Reference('5..{$a~\piano}', $this->record);
342342
$this->assertTrue(1 == count($Reference->content));
343-
343+
344344
$Reference = new File_MARC_Reference('5..{$a~\Lewis}', $this->record);
345345
$this->assertTrue(1 == count($Reference->content));
346346
}

0 commit comments

Comments
 (0)