public function instability(DependencyMap $map) : array
    {
        $ce = $this->efferentCoupling($map);
        $ca = $this->afferentCoupling($map);
        $instability = [];
        foreach ($ce as $class => $count) {
            $totalCoupling = $ce[$class] + $ca[$class];
            $instability[$class] = $ce[$class] / $totalCoupling;
        }
        return $instability;
    }
public function instability(DependencyMap $map) : array
    {
        $ce = $this->efferentCoupling($map);
        $ca = $this->afferentCoupling($map);
        $instability = [];
        foreach ($ce as $class => $count) {
            $totalCoupling = $ce[$class] + $ca[$class];
            $instability[$class] = $ce[$class] / $totalCoupling;
        }
        return $instability;
    }
public function instability ( DependencyMap $ map ) : array { $ ce = $ this -> efferentCoupling ( $ map ) ; $ ca = $ this -> afferentCoupling ( $ map ) ; $ instability = [ ] ; foreach ( $ ce as $ class => $ count ) { $ totalCoupling = $ ce [ $ class ] + $ ca [ $ class ] ; $ instability [ $ class ] = $ ce [ $ class ] / $ totalCoupling ; } return $ instability ; }
Instability is an indicator for how resilient a package is towards change.

@param DependencyMap $map

@return array Key: Class Value: Range from 0 (completely stable) to 1 (completely unstable)
Instability is an indicator for how resilient a package is towards change .