Completed
Push — master ( 864be1...38ed26 )
by Tobias
65:13
created

Builder/Admin/EditBuilderAction.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Admingenerator\GeneratorBundle\Builder\Admin;
4
5
/**
6
 * This builder generates php for edit actions
7
 * @author cedric Lombardot
8
 */
9
class EditBuilderAction extends EditBuilder
10
{
11
    public function getOutputName()
12
    {
13
        return $this->getGenerator()->getGeneratedControllerFolder().'/EditController.php';
14
    }
15
16
    /**
17
     * Return a list of action from list.object_actions
18
     * @return array
19
     */
20 View Code Duplication
    public function getObjectActions()
0 ignored issues
show
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...
21
    {
22
        $objectActions = parent::getObjectActions();
23
24
        if (array_key_exists('edit', $objectActions)) {
25
            unset($objectActions['edit']);
26
            $this->objectActions = $objectActions;
27
        }
28
29
        return $this->objectActions;
30
    }
31
}
32