Completed
Pull Request — develop (#25)
by
unknown
05:18 queued 02:12
created

NumericBoost::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 4
loc 4
rs 10
c 1
b 0
f 1
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace GroupByInc\API\Model;
4
5 View Code Duplication
class NumericBoost
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in 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...
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
   * Set the name of this Numeric Boost
32
   *
33
   * @param $name   string to be the name of this Numeric Boost
34
   * @return        NumericBoost
35
   */
36
  public function setName($name)
37
  {
38
    $this->name = $name;
39
    return $this;
40
  }
41
42
  /**
43
   * @return boolean Whether this is an inverted Numeric Boost
44
   */
45
  public function isInverted()
46
  {
47
    return $this->inverted;
48
  }
49
50
  /**
51
   * Set this Numeric Boost to inverted
52
   *
53
   * @param $inverted    boolean True if this is to be an iverted Numeric Boost, false otherwise
54
   * @return             NumericBoost
55
   */
56
  public function setInverted($inverted)
57
  {
58
    $this->inverted = $inverted;
59
    return $this;
60
  }
61
62
  /**
63
   * @return double The strength of this Numeric Boost
64
   */
65
  public function getStrength()
66
  {
67
    return $this->strength;
68
  }
69
70
  /**
71
   * Set the strength of this Numeric Boost
72
   *
73
   * @param $strength  double value to be the strength of this Numeric Boost
74
   * @return        NumericBoost
75
   */
76
  public function setStrength($strength)
77
  {
78
    $this->strength = $strength;
79
    return $this;
80
  }
81
82
}