src/Analyzers/PDepend/JsonGenerator.php
protected function addInstability(array $metrics)
    {
        if (isset($metrics['ca']) && isset($metrics['ce'])) {
            $metrics['i'] = $metrics['ce'] / (($metrics['ce'] + $metrics['ca']) ?: 1);
        }

        return $metrics;
    }
protected function addInstability(array $metrics)
    {
        if (isset($metrics['ca']) && isset($metrics['ce'])) {
            $metrics['i'] = $metrics['ce'] / (($metrics['ce'] + $metrics['ca']) ?: 1);
        }

        return $metrics;
    }
protected function addInstability ( array $ metrics ) { if ( isset ( $ metrics [ 'ca' ] ) && isset ( $ metrics [ 'ce' ] ) ) { $ metrics [ 'i' ] = $ metrics [ 'ce' ] / ( ( $ metrics [ 'ce' ] + $ metrics [ 'ca' ] ) ? : 1 ) ; } return $ metrics ; }
pdepend.analyzer.dependency also calculates instability, but not on a
per-class level, and defaulting to 0 instead of 1.

@param array $metrics

@return array
pdepend . analyzer . dependency also calculates instability but not on a per - class level and defaulting to 0 instead of 1 .