Notification Setup Error

We have detected an error in your notification set-up (Event-ID dab39dc24f564ec7bd4628d1305fd03c). Currently, we cannot inform you about inspection progress. Please check that the user 557058:bca11929-8c2d-43f2-8a82-c5416880d395 still has access to your repository or update the API account.

Completed
Push — develop ( a55da1...39a772 )
by
unknown
27:43 queued 12:35
created

HistoryVersionBridge::addFailure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Bitbucket\API\Http\Plugin;
4
5
use Http\Client\Exception;
6
use Psr\Http\Client\ClientExceptionInterface;
7
use Psr\Http\Message\RequestInterface;
8
9
if (\interface_exists(\Http\Client\Common\HttpMethodsClientInterface::class)) {
10
    trait HistoryVersionBridge
11
    {
12
        // History method for php-http/client-common 2
13
        public function addFailure(RequestInterface $request, ClientExceptionInterface $exception)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $exception is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
14
        {
15
        }
16
    }
17
} else {
18
    trait HistoryVersionBridge
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Bitbucket\API\Http\Plugin\HistoryVersionBridge has been defined more than once; this definition is ignored, only the first definition in this file (L10-16) is considered.

This check looks for classes that have been defined more than once in the same file.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
19
    {
20
        // History method for php-http/client-common 1
21
        public function addFailure(RequestInterface $request, Exception $exception)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $exception is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
        {
23
        }
24
    }
25
}
26