cubiche /
bus
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * This file is part of the Cubiche package. |
||
| 4 | * |
||
| 5 | * Copyright (c) Cubiche |
||
| 6 | * |
||
| 7 | * For the full copyright and license information, please view the LICENSE |
||
| 8 | * file that was distributed with this source code. |
||
| 9 | */ |
||
| 10 | |||
| 11 | namespace Cubiche\Core\Bus\Tests\Units\Middlewares\Handler\Resolver\NameOfMessage; |
||
| 12 | |||
| 13 | use Cubiche\Core\Bus\Middlewares\Handler\Resolver\NameOfMessage\FromClassNameResolver; |
||
| 14 | use Cubiche\Core\Bus\Tests\Fixtures\Message\LoginUserMessage; |
||
| 15 | use Cubiche\Core\Bus\Tests\Units\TestCase; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * FromClassNameResolver class. |
||
| 19 | * |
||
| 20 | * Generated by TestGenerator on 2016-04-07 at 15:40:41. |
||
| 21 | */ |
||
| 22 | View Code Duplication | class FromClassNameResolverTests extends TestCase |
|
|
0 ignored issues
–
show
|
|||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Test Resolve method. |
||
| 26 | */ |
||
| 27 | public function testResolve() |
||
| 28 | { |
||
| 29 | $this |
||
| 30 | ->given($resolver = new FromClassNameResolver()) |
||
| 31 | ->when($result = $resolver->resolve(new LoginUserMessage('[email protected]', 'plainpassword'))) |
||
|
0 ignored issues
–
show
The call to
LoginUserMessage::__construct() has too many arguments starting with 'plainpassword'.
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the Loading history...
|
|||
| 32 | ->then() |
||
| 33 | ->string($result) |
||
| 34 | ->isEqualTo(LoginUserMessage::class) |
||
| 35 | ; |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.