Completed
Pull Request — master (#52)
by Eugene
03:16
created

ScriptHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 1 Features 0
Metric Value
wmc 1
c 4
b 1
f 0
lcom 0
cbo 1
dl 0
loc 7
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A compileCSS() 0 4 1
1
<?php
2
3
namespace EM\CssCompiler\Handler;
4
5
use Composer\EventDispatcher\Event;
6
use EM\CssCompiler\ScriptHandler as Handler;
7
8
/**
9
 * @deprecated
10
 */
11
class ScriptHandler extends Handler
12
{
13
    public static function compileCSS(Event $event)
14
    {
15
        static::generateCSS($event);
0 ignored issues
show
Compatibility introduced by
$event of type object<Composer\EventDispatcher\Event> is not a sub-type of object<Composer\Script\Event>. It seems like you assume a child class of the class Composer\EventDispatcher\Event to be always present.

This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.

Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.

Loading history...
16
    }
17
}
18