From 4a75d39be8863f1427d23c8ba75b7bf2e48175bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 15 Jul 2022 23:50:52 +0200 Subject: [PATCH] Fix CS v3.9.4 --- docs/config.rst | 2 +- src/ContainerTrait.php | 2 +- src/Factory.php | 2 +- tests/DynamicMethodTraitTest.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/config.rst b/docs/config.rst index e3d8ff59..2ad4e3c2 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -27,7 +27,7 @@ if you need an element that is declared inside an array you can use a special sy Element in config can be defined even manually : - $object->setConfig('element_key',$element); + $object->setConfig('element_key', $element); Supported Formats diff --git a/src/ContainerTrait.php b/src/ContainerTrait.php index afae3505..75c2f9c3 100644 --- a/src/ContainerTrait.php +++ b/src/ContainerTrait.php @@ -39,7 +39,7 @@ public function _uniqueElementName(string $desired): string /** * If you are using ContainerTrait only, then you can safely * use this add() method. If you are also using factory, or - * initializer then redefine add() and call _addContainer, _addFactory,. + * initializer then redefine add() and call _addContainer, _addFactory. * * @param mixed $obj * @param array|string $args diff --git a/src/Factory.php b/src/Factory.php index bfae4d94..be9a0eec 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -125,7 +125,7 @@ protected function _factory($seed, array $defaults = null): object $defaults = []; } - if ((!is_array($seed) && !is_object($seed))) { + if (!is_array($seed) && !is_object($seed)) { throw new Exception('Use of non-array seed ($seed type = ' . gettype($seed) . ') is not supported'); } diff --git a/tests/DynamicMethodTraitTest.php b/tests/DynamicMethodTraitTest.php index 9097fadc..15c2b665 100644 --- a/tests/DynamicMethodTraitTest.php +++ b/tests/DynamicMethodTraitTest.php @@ -138,9 +138,9 @@ public function testRemoveMethod(): void // simple method $m = new DynamicMethodMock(); $m->addMethod('sum', $this->createSumFx()); - $this->assertTrue($m->hasMethod(('sum'))); + $this->assertTrue($m->hasMethod('sum')); $m->removeMethod('sum'); - $this->assertFalse($m->hasMethod(('sum'))); + $this->assertFalse($m->hasMethod('sum')); } public function testGlobalMethodException1(): void