| Total Complexity | 2 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | class EndorserClientFactory |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * @param string $host |
||
| 30 | * @return EndorserClient |
||
| 31 | */ |
||
| 32 | 1 | public static function fromInsecureChannelCredentials(string $host): EndorserClient |
|
| 33 | { |
||
| 34 | 1 | $channelCredentials = ChannelCredentials::createInsecure(); |
|
|
|
|||
| 35 | |||
| 36 | 1 | return self::fromChannelCredentials($host, $channelCredentials); |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $host |
||
| 41 | * @param ChannelCredentials $channelCredentials |
||
| 42 | * @return EndorserClient |
||
| 43 | */ |
||
| 44 | 2 | public static function fromChannelCredentials( |
|
| 50 | ]); |
||
| 51 | } |
||
| 53 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.