Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is
duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
The interface Http\Client\Plugin\Plugin has been deprecated with message: since version 1.1, to be removed in 2.0. Use {@link \Http\Client\Common\Plugin} instead.
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be
removed from the class and what other constant to use instead.
Loading history...
16
{
17
/**
18
* {@inheritdoc}
19
*/
20
3
protected function transformResponseToException(RequestInterface $request, ResponseInterface $response)
This code seems to be duplicated across your project.
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.
Loading history...
23
1
throw new ClientErrorException($response->getReasonPhrase(), $request, $response);
The class Http\Client\Plugin\Exception\ClientErrorException has been deprecated with message: since version 1.1, to be removed in 2.0. Use {@link \Http\Client\Common\Exception\ClientErrorException} instead.
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be
removed from the class and what other constant to use instead.
This code seems to be duplicated across your project.
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.
Loading history...
27
1
throw new ServerErrorException($response->getReasonPhrase(), $request, $response);
The class Http\Client\Plugin\Exception\ServerErrorException has been deprecated with message: since version 1.1, to be removed in 2.0. Use {@link \Http\Client\Common\Exception\ServerErrorException} instead.
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be
removed from the class and what other constant to use instead.
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.