Completed
Push — master ( 95aedb...06e367 )
by Alexey
15:04
created

AssetManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A hash() 0 6 2
1
<?php
2
3
namespace tests;
4
5
/**
6
 * Class AssetManager
7
 * @package tests
8
 */
9
class AssetManager extends \yii\web\AssetManager
10
{
11
    private $_hashes = [];
12
    private $_counter = 0;
13
    /**
14
     * @inheritdoc
15
     */
16
    public function hash($path) {
17
        if (!isset($this->_hashes[$path])) {
18
            $this->_hashes[$path] = $this->_counter++;
19
        }
20
        return $this->_hashes[$path];
21
    }
22
}