AssertionIdAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 18
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A doExecute() 0 10 1
1
<?php
2
3
/*
4
 * This file is part of the LightSAML-IDP package.
5
 *
6
 * (c) Milos Tomic <[email protected]>
7
 *
8
 * This source file is subject to the GPL-3 license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace LightSaml\Idp\Action\Assertion\Outbound;
13
14
use LightSaml\Action\Assertion\AbstractAssertionAction;
15
use LightSaml\Context\Profile\AssertionContext;
16
use LightSaml\Context\Profile\Helper\LogHelper;
17
use LightSaml\Helper;
18
19
class AssertionIdAction extends AbstractAssertionAction
20
{
21
    /**
22
     * @param AssertionContext $context
23
     *
24
     * @return void
25
     */
26
    protected function doExecute(AssertionContext $context)
27
    {
28
        $id = Helper::generateID();
29
        $context->getAssertion()->setId($id);
30
31
        $this->logger->info(
32
            sprintf('Assertion ID set to "%s"', $id),
33
            LogHelper::getActionContext($context, $this, array('message_id' => $id))
34
        );
35
    }
36
}
37