Completed
Pull Request — master (#229)
by Дмитрий
04:50
created

func.php ➔ mb_orig_substr()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
if (!function_exists('mb_orig_substr')) {
4
	function mb_orig_substr(...$args) {
5
		return substr(...$args);
6
	}
7
}
8
9
10
if (!function_exists('D')) {
11
	function D() {
12
		\PHPDaemon\Core\Daemon::log(\PHPDaemon\Core\Debug::dump(...func_get_args()));
13
		//\PHPDaemon\Core\Daemon::log(\PHPDaemon\Core\Debug::backtrace());
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
14
	}
15
}
16
if (!function_exists('igbinary_serialize')) {
17
	function igbinary_serialize($m) {
18
		return serialize($m);
19
	}
20
21
	function igbinary_unserialize($m) {
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
22
		return unserialize($m);
23
	}
24
}
25
if (!function_exists('setTimeout')) {
26
	function setTimeout($cb, $timeout = null, $id = null, $priority = null) {
27
		return \PHPDaemon\Core\Timer::add($cb, $timeout, $id, $priority);
28
	}
29
}
30
if (!function_exists('clearTimeout')) {
31
	function clearTimeout($id) {
32
		\PHPDaemon\Core\Timer::remove($id);
33
	}
34
}
35