JsonMapper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
eloc 2
c 2
b 1
f 1
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
/**
3
 * @author Oskar van Velden <[email protected]>
4
 * @author Rik van der Kemp <[email protected]>
5
 * @copyright Zicht Online <http://zicht.nl>
6
 */
7
8
namespace Zicht\Bundle\UrlBundle\Aliasing\Mapper;
9
10
/**
11
 * Class JsonMapper
12
 *
13
 * Helper to map urls in an JSON string from internal to public aliasing or vice versa.
14
 *
15
 * @package Zicht\Bundle\UrlBundle\Aliasing
16
 * @deprecated This implementation is rather optimistic: it replaces all "value" keys
17
 */
18
class JsonMapper extends AbstractMapper
19
{
20
    /**
21
     * Constructor
22
     */
23
    public function __construct()
24
    {
25
        parent::__construct(['application/json'], '/((?:"value")\s*:\s*")([^"]+)(["])/');
26
    }
27
}
28