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
switch ($context['action']) {
25
case 'publish':
26
return new ArrayList(array($this->generatePublishable('/updateOnPublish', 10)));
27
case 'unpublish':
28
return new ArrayList(array($this->generatePublishable('/updateOnUnpublish', 10)));
29
}
30
}
31
32
/**
33
* Remove the object on unpublishing (the parent will get updated via objectsToUpdate).
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...
36
{
37
switch ($context['action']) {
38
case 'publish':
39
return new ArrayList(array($this->generatePublishable('/deleteOnPublish', 10)));
40
case 'unpublish':
41
return new ArrayList(array($this->generatePublishable('/deleteOnUnpublish', 10)));
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.