Code Duplication    Length = 12-12 lines in 3 locations

src/presenters/UsersPresenter.php 3 locations

@@ 42-53 (lines=12) @@
39
        $this->template->users = $users;
40
    }
41
42
    public function renderListUnactive()
43
    {
44
        $navbar   = [];
45
        $navbar[] = (object) ['name' => 'Uživatelé', 'link' => 'Users:list'];
46
        $navbar[] = (object) ['name' => 'Neaktivní'];
47
48
        $this->template->navbar = $navbar;
49
50
        $usersDao = $this->em->getRepository(PModel\User\User::getClassName());
51
        $users    = $usersDao->findBy(['active' => 0]);
52
53
        $this->template->users = $users;
54
    }
55
56
    /**
@@ 105-116 (lines=12) @@
102
        $this->template->isActual = $isActual;
103
    }
104
105
    public function renderGroups()
106
    {
107
        $navbar   = [];
108
        $navbar[] = (object) ['name' => 'Uživatelé', 'link' => 'Users:list'];
109
        $navbar[] = (object) ['name' => 'Skupiny'];
110
111
        $this->template->navbar = $navbar;
112
113
        $userGroupsDao = $this->em->getRepository(PModel\User\Group::getClassName());
114
        $userGroups    = $userGroupsDao->findAll();
115
116
        $this->template->userGroups = $userGroups;
117
    }
118
119
    /**
@@ 124-135 (lines=12) @@
121
     * @Secured\User(loggedIn)
122
     * @Secured\Role(superadmin)
123
     */
124
    public function renderLogActivity()
125
    {
126
        $navbar   = [];
127
        $navbar[] = (object) ['link' => 'Users:list', 'name' => 'Uživatelé'];
128
        $navbar[] = (object) ['name' => 'Sledování přihlášení'];
129
130
        $this->template->navbar = $navbar;
131
132
        $activityDao = $this->em->getRepository(PModel\User\LogActivity::getClassName());
133
        $activity    = $activityDao->findBy([], ['id' => 'DESC'], 30);
134
135
        $this->template->activity = $activity;
136
    }
137
138
    protected function createComponentChangePasswordForm()