Code Duplication    Length = 5-5 lines in 2 locations

src/Skobkin/Bundle/PointToolsBundle/Service/Telegram/PrivateMessageProcessor.php 2 locations

@@ 140-144 (lines=5) @@
137
                case '/last':
138
                case 'last':
139
                    if (array_key_exists(1, $words)) {
140
                        if (null !== $user = $this->userRepo->findUserByLogin($words[1])) {
141
                            $this->sendUserEvents($account, $user);
142
                        } else {
143
                            $this->sendError($account, 'User not found');
144
                        }
145
                    } else {
146
                        $this->sendGlobalEvents($account);
147
                    }
@@ 154-158 (lines=5) @@
151
                case '/sub':
152
                case 'sub':
153
                    if (array_key_exists(1, $words)) {
154
                        if (null !== $user = $this->userRepo->findUserByLogin($words[1])) {
155
                            $this->sendUserSubscribers($account, $user);
156
                        } else {
157
                            $this->sendError($account, 'User not found');
158
                        }
159
                    } else {
160
                        if ($user = $account->getUser()) {
161
                            $this->sendUserSubscribers($account, $user);