Completed
Pull Request — develop (#25)
by
unknown
05:29 queued 03:40
created

NumericBoost::setInverted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 5
loc 5
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 3
nc 1
nop 1
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
   * @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;
0 ignored issues
show
Documentation Bug introduced by
It seems like $name of type object<GroupByInc\API\Model\The> is incompatible with the declared type string of property $name.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
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;
0 ignored issues
show
Documentation Bug introduced by
It seems like $inverted of type object<GroupByInc\API\Model\True> is incompatible with the declared type boolean of property $inverted.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
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
}