Passed
Push — master ( 38d656...5e26b9 )
by Anton
01:55
created

dumprr()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
9
use Spiral\Debug\Dumper;
10
11
declare(strict_types=1);
12
13
if (!function_exists('bind')) {
14
    /**
15
     * Shortcut to container Autowire definition.
16
     *
17
     * Example:
18
     * 'name' => bind(SomeClass::name, [...])
19
     *
20
     * @param string $alias Class name or alias.
21
     * @param array  $parameters
22
     *
23
     * @return \Spiral\Core\Container\Autowire
24
     */
25
    function bind(string $alias, array $parameters = [])
26
    {
27
        return new \Spiral\Core\Container\Autowire($alias, $parameters);
28
    }
29
}
30
31
if (!function_exists('dumprr')) {
32
    /**
33
     * Dumprr is similar to Dump function but always redirect output to STDERR.
34
     *
35
     * @param mixed $value
36
     */
37
    function dumprr($value)
38
    {
39
        dump($value, Dumper::ERROR_LOG);
40
    }
41
}