DataProcessor   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A escapeRow() 0 16 5
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Foundation\Processors;
6
7
use Yajra\DataTables\Processors\DataProcessor as BaseDataProcessor;
8
9
class DataProcessor extends BaseDataProcessor
10
{
11
    /**
12
     * Escape all values of row.
13
     *
14
     * @param array $row
15
     *
16
     * @return array
17
     */
18
    protected function escapeRow(array $row)
19
    {
20
        $arrayDot = array_filter(array_dot($row));
0 ignored issues
show
Deprecated Code introduced by
The function array_dot() has been deprecated with message: Arr::dot() should be used directly instead. Will be removed in Laravel 6.0.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
21
22
        foreach ($arrayDot as $key => $value) {
23
            if (! in_array($key, $this->rawColumns) && is_string($value)) {
24
                $arrayDot[$key] = e($value);
25
            }
26
        }
27
28
        foreach ($arrayDot as $key => $value) {
29
            array_set($row, $key, $value);
0 ignored issues
show
Deprecated Code introduced by
The function array_set() has been deprecated with message: Arr::set() should be used directly instead. Will be removed in Laravel 6.0.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
30
        }
31
32
        return $row;
33
    }
34
}
35