Skip to content

Commit 6ef78da

Browse files
committed
chore: remove unnecessary code from test cases
* resolve some IDE related issues (type recognation)
1 parent 0010b12 commit 6ef78da

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

src/Exception/TemplatedMessageExceptionTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ trait TemplatedMessageExceptionTrait
3333
*
3434
* @return \Exception
3535
*/
36-
public static function create(...$args): \Exception
36+
public static function create(...$args): self
3737
{
3838
$ex = end($args) instanceof \Throwable ? array_pop($args) : null;
3939
$message = sprintf(...$args);

test/TestUtilsTest/TestCase/ContainerDoubleTraitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ public function testCreatesContainerProphecyWithOptions(array $services, array $
315315
public function testThrowsExceptionIfInterfaceOrClassIsNotDefined()
316316
{
317317

318+
/** @var \phpmock\prophecy\FunctionProphecy $func */
318319
$func = (new PHPProphet)->prophesize('Cross\TestUtils\TestCase');
319320
$func->interface_exists(Argument::any())->willReturn(false);
320321
$func->class_exists(Argument::any())->willReturn(false);

test/TestUtilsTest/Utils/TargetTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ public function testGetTargetInstanceFromClassesPropertyFirstItem()
7070
$target = new class
7171
{
7272
public $classes = ['TestTarget', 'other', 'values'];
73-
public function test()
74-
{
75-
return $this->getTargetInstance([], [], 'classes');
76-
}
7773
};
7874

7975
$actual = Target::get($target, [], [], 'classes');

0 commit comments

Comments
 (0)