YiiLogIO::isDebug()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Asset Packagist.
4
 *
5
 * @link      https://github.com/hiqdev/asset-packagist
6
 * @package   asset-packagist
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\assetpackagist\log;
12
13
use Composer\IO\NullIO;
14
use Yii;
15
16
class YiiLogIO extends NullIO
17
{
18
    public function isVerbose()
19
    {
20
        return YII_ENV_TEST;
21
    }
22
23
    public function isVeryVerbose()
24
    {
25
        return YII_ENV_DEV;
26
    }
27
28
    public function isDebug()
29
    {
30
        return YII_DEBUG;
31
    }
32
33
    public function write($messages, $newline = true, $verbosity = self::NORMAL)
34
    {
35
        Yii::trace($messages, __METHOD__);
0 ignored issues
show
Deprecated Code introduced by
The method yii\BaseYii::trace() has been deprecated with message: since 2.0.14. Use [[debug()]] instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

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

Loading history...
36
    }
37
38
    public function writeError($messages, $newline = true, $verbosity = self::NORMAL)
39
    {
40
        Yii::trace($messages, __METHOD__);
0 ignored issues
show
Deprecated Code introduced by
The method yii\BaseYii::trace() has been deprecated with message: since 2.0.14. Use [[debug()]] instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

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

Loading history...
41
    }
42
43
    public function overwrite($messages, $newline = true, $size = 80, $verbosity = self::NORMAL)
44
    {
45
        Yii::trace($messages, __METHOD__);
0 ignored issues
show
Deprecated Code introduced by
The method yii\BaseYii::trace() has been deprecated with message: since 2.0.14. Use [[debug()]] instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

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

Loading history...
46
    }
47
48
    public function overwriteError($messages, $newline = true, $size = 80, $verbosity = self::NORMAL)
49
    {
50
        Yii::trace($messages, __METHOD__);
0 ignored issues
show
Deprecated Code introduced by
The method yii\BaseYii::trace() has been deprecated with message: since 2.0.14. Use [[debug()]] instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

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

Loading history...
51
    }
52
53
    public function log($level, $message, array $context = [])
54
    {
55
        Yii::trace($message, __METHOD__);
0 ignored issues
show
Deprecated Code introduced by
The method yii\BaseYii::trace() has been deprecated with message: since 2.0.14. Use [[debug()]] instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

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

Loading history...
56
    }
57
}
58