RegistrationLogger   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 19
rs 10
c 2
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A logRegistration() 0 12 1
1
<?php
2
3
namespace Rottenwood\UserBundle\Loggers;
4
5
use Monolog\Logger;
6
use Rottenwood\KingdomBundle\Entity\Infrastructure\User;
7
8
/** {@inheritdoc} */
9
class RegistrationLogger extends Logger
10
{
11
12
    /**
13
     * @param User $user
14
     */
15
    public function logRegistration(User $user)
16
    {
17
        $this->info(
18
            sprintf(
19
                '[#%d] логин: %s, имя: %s, email: %s',
20
                $user->getId(),
21
                $user->getUsername(),
22
                $user->getName(),
23
                $user->getEmail()
24
            )
25
        );
26
    }
27
}