ArrayUtility   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A isJsonArray() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Utility;
13
14
class ArrayUtility
15
{
16
    /**
17
     * Check if the given value is JSON Array
18
     */
19
    public static function isJsonArray(mixed $value): bool
20
    {
21
        if (!is_string($value)) {
22
            return false;
23
        }
24
25
        return is_array(json_decode($value, true));
26
    }
27
}
28