Completed
Push — master ( f9521c...a16a3a )
by Roni
02:17
created

UserEventCommand/PasswordChangedCommand.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
/*
4
 * This file is part of the XiideaEasyAuditBundle package.
5
 *
6
 * (c) Xiidea <http://www.xiidea.net>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Xiidea\EasyAuditBundle\Resolver\UserEventCommand;
13
14
15
use FOS\UserBundle\Event\FilterUserResponseEvent;
16
17
class PasswordChangedCommand extends ResolverCommand
18
{
19
20
    /**
21
     * @param FilterUserResponseEvent $event
22
     * @param array $default
23
     * @return array
24
     */
25 View Code Duplication
    public function resolve($event, $default = array())
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...
26
    {
27
        if( !($event instanceof FilterUserResponseEvent)) {
28
            return $default;
29
        }
30
31
        return $this->getEventDetailsArray(
32
            "Password Changed",
33
            "Password of user '%s' Changed Successfully",
34
            $event->getUser()->getUsername()
35
        );
36
    }
37
}
38