Skip to content

Commit 7d05a34

Browse files
committed
Apply fixes from StyleCI
1 parent 50e99c9 commit 7d05a34

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

src/PHPCR/Util/CND/Scanner/GenericScanner.php

-3
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,11 @@ protected function consumeBlockComments(ReaderInterface $reader)
165165
$nextChar = $reader->currentChar();
166166
foreach ($this->context->getBlockCommentDelimiters() as $beginDelim => $endDelim) {
167167
if ($nextChar === $beginDelim[0]) {
168-
169168
// Lookup the start delimiter
170169
for ($i = 1; $i <= strlen($beginDelim); $i++) {
171170
$reader->forward();
172171
}
173172
if ($reader->current() === $beginDelim) {
174-
175173
// Start delimiter found, let's try to find the end delimiter
176174
$nextChar = $reader->forwardChar();
177175

@@ -223,7 +221,6 @@ protected function consumeLineComments(ReaderInterface $reader)
223221
}
224222

225223
if ($reader->current() === $delimiter) {
226-
227224
// consume to end of line
228225
$char = $reader->currentChar();
229226
while (!$reader->isEof() && $char !== "\n") {

src/PHPCR/Util/PathHelper.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ public static function normalizePath($path, $destination = false, $throw = true)
165165
}
166166
$normalizedPath = count($finalParts) > 1 ?
167167
implode('/', $finalParts) :
168-
'/' // first element is always the empty-name root element. this might have been a path like /x/..
169-
;
168+
'/'; // first element is always the empty-name root element. this might have been a path like /x/..
170169

171170
if (!self::assertValidAbsolutePath($normalizedPath, $destination, $throw)) {
172171
return false;

src/PHPCR/Util/TreeWalker.php

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ protected function mustVisitProperty(PropertyInterface $property)
125125
public function traverse(NodeInterface $node, $recurse = -1, $level = 0): void
126126
{
127127
if ($this->mustVisitNode($node)) {
128-
129128
// Visit node
130129
if (method_exists($this->nodeVisitor, 'setLevel')) {
131130
$this->nodeVisitor->setLevel($level);

src/PHPCR/Util/ValueConverter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function convertType($value, $type, $srcType = PropertyType::UNDEFINED)
167167
case PropertyType::NAME:
168168
case PropertyType::PATH:
169169
// TODO: The name/path is converted to qualified form according to the current local namespace mapping (see §3.2.5.2 Qualified Form).
170-
return $value;
170+
return $value;
171171
default:
172172
if (is_object($value)) {
173173
throw new ValueFormatException('Cannot convert object of class "'.get_class($value).'" to STRING');

tests/PHPCR/Tests/Util/NodeHelperTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ public function testIsSystemItem()
117117

118118
$top->expects($this->once())
119119
->method('getName')
120-
->willReturn('jcrname') // this is NOT in the jcr namespace
121-
;
120+
->willReturn('jcrname'); // this is NOT in the jcr namespace
122121

123122
$this->assertFalse(NodeHelper::isSystemItem($top));
124123

tests/PHPCR/Tests/Util/ValueConverterTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ public function dataConversionMatrix()
269269
* Skip binary target as its a special case.
270270
*
271271
* @param mixed $value
272-
* @param int $srcType PropertyType constant to convert from
273-
* @param $expected
274-
* @param $targetType
272+
* @param int $srcType PropertyType constant to convert from
273+
* @param $expected
274+
* @param $targetType
275275
*
276276
* @dataProvider dataConversionMatrix
277277
*/

0 commit comments

Comments
 (0)