postAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Glue\FirstData\Controller;
9
10
use Spryker\Glue\Kernel\Controller\FormattedAbstractController;
11
use Symfony\Component\HttpFoundation\Request;
12
use Symfony\Component\HttpFoundation\Response;
13
14
/**
15
 * @method \SprykerEco\Glue\FirstData\FirstDataFactory getFactory()
16
 */
17
class FirstDataNotificationsResourceController extends FormattedAbstractController
18
{
19
    /**
20
     * @param \Symfony\Component\HttpFoundation\Request $httpRequest
21
     *
22
     * @return \Symfony\Component\HttpFoundation\Response
23
     */
24
    public function postAction(Request $httpRequest): Response
25
    {
26
        $this->getFactory()
27
            ->createFirstDataNotificationSaver()
28
            ->saveFirstDataNotification($httpRequest->request->all());
29
30
        return new Response('', Response::HTTP_OK);
31
    }
32
}
33