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.
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...
45
{
46
$clause = &$this->getClause('AFTER');
47
$pos = strtoupper($position);
48
$clause[$pos][] = $rawString;
49
return $this;
50
}
51
52
/**
53
* Build AFTER/BEFORE
54
*
55
* @param string $beforeOrAfter BEFORE|AFTER
56
* @param string $position
57
* @param array $settings
58
* @return string
59
* @access protected
60
*/
61
protected function buildBeforeAfter(
62
/*# string */ $beforeOrAfter,
63
/*# string */ $position,
64
array $settings
65
)/*# : string */ {
66
$clause = &$this->getClause($beforeOrAfter);
67
if (isset($clause[$position])) {
68
$line = $clause[$position];
69
$sepr = $settings['seperator'];
70
return $sepr . join($sepr, $line);
71
} else {
72
return '';
73
}
74
}
75
76
abstract protected function &getClause(/*# string */ $clauseName)/*# : array */;
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.