File KeywordApi.php
has 1095 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
Function updateKeywordRequest
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling updateKeyword');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
KeywordApi
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class KeywordApi
{
/**
* @var ClientInterface
*/
Function bulkUpdateKeywordRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function bulkUpdateKeywordRequest($campaign_id, $bulk_update_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling bulkUpdateKeyword');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function createKeywordRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function createKeywordRequest($campaign_id, $create_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling createKeyword');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function bulkCreateKeywordRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function bulkCreateKeywordRequest($campaign_id, $bulk_create_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling bulkCreateKeyword');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getKeywordsRequest
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getKeywordsRequest($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getKeywords');
Function getKeywordRequest
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function getKeywordRequest($campaign_id, $keyword_id)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getKeyword');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method updateKeywordRequest
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling updateKeyword');
Method getKeywordRequest
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getKeywordRequest($campaign_id, $keyword_id)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getKeyword');
Method bulkUpdateKeywordRequest
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bulkUpdateKeywordRequest($campaign_id, $bulk_update_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling bulkUpdateKeyword');
Method createKeywordRequest
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createKeywordRequest($campaign_id, $create_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling createKeyword');
Method bulkCreateKeywordRequest
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bulkCreateKeywordRequest($campaign_id, $bulk_create_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling bulkCreateKeyword');
Function getKeywordsRequest
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function getKeywordsRequest($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getKeywords');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method createKeywordWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createKeywordWithHttpInfo($campaign_id, $create_keyword_request)
{
$request = $this->createKeywordRequest($campaign_id, $create_keyword_request);
try {
Method getKeywordWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getKeywordWithHttpInfo($campaign_id, $keyword_id)
{
$request = $this->getKeywordRequest($campaign_id, $keyword_id);
try {
Method bulkUpdateKeywordWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bulkUpdateKeywordWithHttpInfo($campaign_id, $bulk_update_keyword_request)
{
$request = $this->bulkUpdateKeywordRequest($campaign_id, $bulk_update_keyword_request);
try {
Method getKeywordsWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getKeywordsWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
{
$request = $this->getKeywordsRequest($campaign_id, $ad_group_ids, $keyword_status, $limit, $offset);
try {
Method bulkCreateKeywordWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bulkCreateKeywordWithHttpInfo($campaign_id, $bulk_create_keyword_request)
{
$request = $this->bulkCreateKeywordRequest($campaign_id, $bulk_create_keyword_request);
try {
Function getKeywordsWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getKeywordsWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
{
$request = $this->getKeywordsRequest($campaign_id, $ad_group_ids, $keyword_status, $limit, $offset);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function createKeywordWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function createKeywordWithHttpInfo($campaign_id, $create_keyword_request)
{
$request = $this->createKeywordRequest($campaign_id, $create_keyword_request);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getKeywordWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getKeywordWithHttpInfo($campaign_id, $keyword_id)
{
$request = $this->getKeywordRequest($campaign_id, $keyword_id);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function bulkCreateKeywordWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function bulkCreateKeywordWithHttpInfo($campaign_id, $bulk_create_keyword_request)
{
$request = $this->bulkCreateKeywordRequest($campaign_id, $bulk_create_keyword_request);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function bulkUpdateKeywordWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function bulkUpdateKeywordWithHttpInfo($campaign_id, $bulk_update_keyword_request)
{
$request = $this->bulkUpdateKeywordRequest($campaign_id, $bulk_update_keyword_request);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getKeywordsAsync
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getKeywordsAsync($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
Method getKeywordsRequest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getKeywordsRequest($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
Method getKeywords
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getKeywords($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
Method getKeywordsAsyncWithHttpInfo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getKeywordsAsyncWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
Method getKeywordsWithHttpInfo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getKeywordsWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
Function updateKeywordWithHttpInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function updateKeywordWithHttpInfo($campaign_id, $keyword_id, $update_keyword_request)
{
$request = $this->updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Similar blocks of code found in 4 locations. Consider refactoring. Open
public function updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling updateKeyword');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 704.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
public function getKeywordsWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
{
$request = $this->getKeywordsRequest($campaign_id, $ad_group_ids, $keyword_status, $limit, $offset);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 568.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 5 locations. Consider refactoring. Open
public function updateKeywordWithHttpInfo($campaign_id, $keyword_id, $update_keyword_request)
{
$request = $this->updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 362.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
public function getKeywordsAsyncWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
{
$returnType = '\TNT\Ebay\Sell\Marketing\V1\Model\KeywordPagedCollectionResponse';
$request = $this->getKeywordsRequest($campaign_id, $ad_group_ids, $keyword_status, $limit, $offset);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 272.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 5 locations. Consider refactoring. Open
public function updateKeywordAsyncWithHttpInfo($campaign_id, $keyword_id, $update_keyword_request)
{
$returnType = '';
$request = $this->updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 189.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76