Completed
Pull Request — master (#64)
by Márk
05:20
created

CookiePlugin::createCookie()   C

Complexity

Conditions 10
Paths 9

Size

Total Lines 49
Code Lines 32

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 37.0965

Importance

Changes 3
Bugs 1 Features 0
Metric Value
c 3
b 1
f 0
dl 0
loc 49
ccs 12
cts 34
cp 0.3529
rs 5.5471
cc 10
eloc 32
nc 9
nop 2
crap 37.0965

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace Http\Client\Plugin;
4
5
/**
6
 * Handle request cookies.
7
 *
8
 * @author Joel Wurtz <[email protected]>
9
 *
10
 * @deprecated since version 1.1, to be removed in 2.0. Use {@link \Http\Client\Common\Plugin\CookiePlugin} instead.
11
 */
12
class CookiePlugin extends \Http\Client\Common\Plugin\CookiePlugin implements Plugin
0 ignored issues
show
Deprecated Code introduced by
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...
13
{
14
}
15