Code Duplication    Length = 78-78 lines in 2 locations

src/API/Model/NumericBoost.php 1 location

@@ 5-82 (lines=78) @@
2
3
namespace GroupByInc\API\Model;
4
5
class NumericBoost
6
{
7
  /**
8
   * @var string
9
   */
10
  private $name;
11
12
  /**
13
   * @var boolean
14
   */
15
  private $inverted;
16
17
  /**
18
   * @var double
19
   */
20
  private $strength = 1.0;
21
22
  /**
23
   * @return string The name of this Numeric Boost
24
   */
25
  public function getName()
26
  {
27
    return $this->name;
28
  }
29
30
  /**
31
   * @param name    The string to be the name of this Numeric Boost
32
   * @return        This Numeric Boost
33
   */
34
  public function setName($name)
35
  {
36
    $this->name = $name;
37
    return $this;
38
  }
39
40
  /**
41
   * @return boolean Whether this is an inverted Numeric Boost
42
   */
43
  public function isInverted()
44
  {
45
    return $this->inverted;
46
  }
47
48
  /**
49
   * @param inverted    True if this is to be an iverted Numeric Boost, false otherwise
50
   * @return            This Numeric Boost
51
   */
52
  public function setInverted($inverted)
53
  {
54
    $this->inverted = $inverted;
55
    return $this;
56
  }
57
58
  /**
59
   * @return double The strength of this Numeric Boost
60
   */
61
  public function getStrength()
62
  {
63
    return $this->strength;
64
  }
65
66
  /**
67
   * @param double  The value to be the strength of this Numeric Boost
68
   * @return        This Numeric Boost
69
   */
70
  public function setStrength($strength)
71
  {
72
    $this->strength = $strength;
73
    return $this;
74
  }
75
76
}

src/API/Request/NumericBoost.php 1 location

@@ 7-84 (lines=78) @@
4
5
use JMS\Serializer\Annotation as JMS;
6
7
class NumericBoost
8
{
9
  /**
10
   * @var string
11
   * @JMS\Type("string")
12
   */
13
  private $name;
14
15
  /**
16
   * @var boolean
17
   * @JMS\Type("boolean")
18
   */
19
  private $inverted;
20
21
  /**
22
   * @var double
23
   * @JMS\Type("double")
24
   */
25
  private $strength = 1.0;
26
27
  /**
28
   * @return string The name of this Numeric Boost
29
   */
30
  public function getName()
31
  {
32
    return $this->name;
33
  }
34
35
  /**
36
   * @param $name    string to be the name of this Numeric Boost
37
   * @return        NumericBoost
38
   */
39
  public function setName($name)
40
  {
41
    $this->name = $name;
42
    return $this;
43
  }
44
45
  /**
46
   * @return boolean Whether this is an inverted Numeric Boost
47
   */
48
  public function isInverted()
49
  {
50
    return $this->inverted;
51
  }
52
53
  /**
54
   * @param $inverted    boolean True if this is to be an iverted Numeric Boost, false otherwise
55
   * @return            NumericBoost
56
   */
57
  public function setInverted($inverted)
58
  {
59
    $this->inverted = $inverted;
60
    return $this;
61
  }
62
63
  /**
64
   * @return double The strength of this Numeric Boost
65
   */
66
  public function getStrength()
67
  {
68
    return $this->strength;
69
  }
70
71
  /**
72
   * @param $strength  double value to be the strength of this Numeric Boost
73
   * @return        NumericBoost
74
   */
75
  public function setStrength($strength)
76
  {
77
    $this->strength = $strength;
78
    return $this;
79
  }
80
81
}