FieldOptionsSerializer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 5 1
1
<?php
2
3
namespace Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware;
4
5
use League\Tactician\Middleware;
6
7
/**
8
 * Class FieldOptionsSerializer
9
 * Serialize the options field
10
 * @author Jose Luis Fonseca <[email protected]>
11
 * @package Hechoenlaravel\JarvisFoundation\FieldGenerator\Middleware
12
 */
13
class FieldOptionsSerializer implements Middleware
14
{
15
    /**
16
     * @param object $command
17
     * @param callable $next
18
     *
19
     * @return mixed
20
     */
21
    public function execute($command, callable $next)
22
    {
23
        $command->options = serialize($command->options);
24
        return $next($command);
25
    }
26
}
27