GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Convert   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 24
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A objectToArray() 0 16 3
1
<?php
2
3
namespace prgTW\BaseCRM\Utils;
4
5
class Convert
6
{
7
	/**
8
	 * @param mixed $obj
9
	 *
10
	 * @return array
0 ignored issues
show
Documentation introduced by
Should the return type not be array|integer|double|string|null|boolean|resource? Also, consider making the array more specific, something like array<String>, or String[].

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

If the return type contains the type array, this check recommends the use of a more specific type like String[] or array<String>.

Loading history...
11
	 */
12
	public static function objectToArray($obj)
13
	{
14
		if (is_object($obj))
15
		{
16
			$obj = get_object_vars($obj);
17
		}
18
19
		if (is_array($obj))
20
		{
21
			return array_map('self::objectToArray', $obj);
22
		}
23
		else
24
		{
25
			return $obj;
26
		}
27
	}
28
}
29