UserProfileSyncEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 48
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getProfile() 0 4 1
A getUser() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of Jitamin.
5
 *
6
 * Copyright (C) Jitamin Team
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Jitamin\Bus\Event;
13
14
use Jitamin\Foundation\Identity\UserProviderInterface;
15
use Jitamin\Services\Identity\LdapUserProvider;
16
use Symfony\Component\EventDispatcher\Event;
17
18
/**
19
 * Class UserProfileSyncEvent.
20
 */
21
class UserProfileSyncEvent extends Event
22
{
23
    /**
24
     * User profile.
25
     *
26
     * @var array
27
     */
28
    private $profile;
29
30
    /**
31
     * User provider.
32
     *
33
     * @var UserProviderInterface
34
     */
35
    private $user;
36
37
    /**
38
     * UserProfileSyncEvent constructor.
39
     *
40
     * @param array                 $profile
41
     * @param UserProviderInterface $user
42
     */
43
    public function __construct(array $profile, UserProviderInterface $user)
44
    {
45
        $this->profile = $profile;
46
        $this->user = $user;
47
    }
48
49
    /**
50
     * Get user profile.
51
     *
52
     * @return array
53
     */
54
    public function getProfile()
55
    {
56
        return $this->profile;
57
    }
58
59
    /**
60
     * Get user provider object.
61
     *
62
     * @return UserProviderInterface|LdapUserProvider
63
     */
64
    public function getUser()
65
    {
66
        return $this->user;
67
    }
68
}
69