This method 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...
23
{
24
if ($this->isNullValue())
25
{
26
return null;
27
}
28
29
if (!isset($this->column_value))
30
{
31
$this->setValue($this->jsonResponse);
32
}
33
34
return $this->column_value;
35
}
36
37
/**
38
* Update the text of a text column
39
*
40
* @api
41
*
42
* @param string $text
43
*
44
* @since 0.3.0 \InvalidArgumentException is now thrown
45
* @since 0.1.0
46
*
47
* @throws \InvalidArgumentException if $text does not have a string representation
48
*/
49
public function updateValue ($text)
50
{
51
if (!is_scalar($text) || (is_object($text) && method_exists($text, '__toString')))
52
{
53
throw new \InvalidArgumentException('$text is expected to have a string representation');
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.