YiiLogIO   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 8
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 42
ccs 0
cts 32
cp 0
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A isVerbose() 0 4 1
A isVeryVerbose() 0 4 1
A isDebug() 0 4 1
A write() 0 4 1
A writeError() 0 4 1
A overwrite() 0 4 1
A overwriteError() 0 4 1
A log() 0 4 1
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