Skip to content

Commit 2c33f36

Browse files
committed
cs fix
1 parent 4dce228 commit 2c33f36

File tree

11 files changed

+5
-21
lines changed

11 files changed

+5
-21
lines changed

lib/Doctrine/ODM/PHPCR/Document/AbstractFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* This class represents an abstract "file".
1111
*/
1212
#[PHPCR\MappedSuperclass(mixins: ['mix:created'])]
13-
abstract class AbstractFile implements HierarchyInterface
13+
abstract class AbstractFile implements \Stringable, HierarchyInterface
1414
{
1515
#[PHPCR\Id(strategy: 'parent')]
1616
protected string $id;

lib/Doctrine/ODM/PHPCR/Document/Generic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* You can not use this to create nodes as it has no type mapping.
1616
*/
1717
#[PHPCR\Document]
18-
class Generic
18+
class Generic implements \Stringable
1919
{
2020
/**
2121
* Id (path) of this document.

lib/Doctrine/ODM/PHPCR/Document/Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @see http://wiki.apache.org/jackrabbit/nt:resource
1313
*/
1414
#[PHPCR\Document(nodeType: 'nt:resource')]
15-
class Resource
15+
class Resource implements \Stringable
1616
{
1717
#[PHPCR\Id]
1818
protected string $id;

lib/Doctrine/ODM/PHPCR/PersistentCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* @author Benjamin Eberlei <kontakt@beberlei.de>
1010
*/
11-
abstract class PersistentCollection implements Collection
11+
abstract class PersistentCollection implements \Stringable, Collection
1212
{
1313
protected const INITIALIZED_NONE = 'not initialized';
1414

lib/Doctrine/ODM/PHPCR/Query/Builder/QueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @author Daniel Leech <daniel@dantleech.com>
3030
*/
31-
class QueryBuilder extends QBConstants
31+
class QueryBuilder extends QBConstants implements \Stringable
3232
{
3333
private ?ConverterInterface $converter = null;
3434
private int $firstResult = 0;

tests/Doctrine/Tests/ODM/PHPCR/DocumentClassMapperTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ public function testExpandClassName(string $className, string $fqClassName, bool
209209

210210
$refl = new \ReflectionClass($this->mapper);
211211
$method = $refl->getMethod('expandClassName');
212-
$method->setAccessible(true);
213212
$res = $method->invoke($this->mapper, $this->dm, $className);
214213

215214
$this->assertEquals($fqClassName, $res);

tests/Doctrine/Tests/ODM/PHPCR/DocumentManagerTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public function testGetMetadataFactory(): void
8282
$factory = $dm->getMetadataFactory();
8383
$reflection = new \ReflectionClass($factory);
8484
$property = $reflection->getProperty('dm');
85-
$property->setAccessible(true);
8685
$this->assertSame($dm, $property->getValue($factory));
8786
}
8887

@@ -114,9 +113,7 @@ public function testContains(): void
114113
$uow = $dm->getUnitOfWork();
115114

116115
$method = new \ReflectionMethod($uow, 'registerDocument');
117-
$method->setAccessible(true);
118116
$method->invoke($uow, $obj, '/foo');
119-
$method->setAccessible(false);
120117

121118
$this->assertTrue($dm->contains($obj));
122119
}
@@ -185,9 +182,7 @@ public function testGetDocumentIdReturnsValueOfUnitOfWork(): void
185182
$uow = $dm->getUnitOfWork();
186183

187184
$reflectionProperty = new \ReflectionProperty($uow, 'documentIds');
188-
$reflectionProperty->setAccessible(true);
189185
$reflectionProperty->setValue($uow, [spl_object_hash($obj) => '/foo']);
190-
$reflectionProperty->setAccessible(false);
191186

192187
$this->assertSame('/foo', $dm->getDocumentId($obj));
193188
}

tests/Doctrine/Tests/ODM/PHPCR/Query/Builder/AbstractLeafNodeTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public function testExplodeField($fieldSpec, $xpctdExceptionMessage, $xpctdRes =
4646
}
4747

4848
$method = $this->refl->getMethod('explodeField');
49-
$method->setAccessible(true);
5049
$res = $method->invoke($this->leafNode, $fieldSpec);
5150

5251
if (false === $xpctdExceptionMessage) {

tests/Doctrine/Tests/ODM/PHPCR/Query/Builder/QueryBuilderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ public function testCloningQueryBuilderUniqueConverterInstance(): void
107107
{
108108
$reflection = new \ReflectionClass(get_class($this->node));
109109
$property = $reflection->getProperty('converter');
110-
$property->setAccessible(true);
111110

112111
$this->node->setConverter($this->createMock(ConverterInterface::class));
113112

tests/Doctrine/Tests/ODM/PHPCR/Translation/AttributeTranslationStrategyTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public function setUp(): void
3030

3131
$class = new \ReflectionClass(AttributeTranslationStrategy::class);
3232
$this->method = $class->getMethod('getTranslatedPropertyName');
33-
$this->method->setAccessible(true);
3433
}
3534

3635
public function testSetPrefixAndGetPropertyName(): void

0 commit comments

Comments
 (0)