src/Carbon/CarbonInterval.php
public function cascade()
    {
        foreach (static::getFlipCascadeFactors() as $source => [$target, $factor]) {
            if ($source === 'dayz' && $target === 'weeks') {
                continue;
            }

            $value = $this->$source;
            $this->$source = $modulo = ($factor + ($value % $factor)) % $factor;
            $this->$target += ($value - $modulo) / $factor;
            if ($this->$source > 0 && $this->$target < 0) {
                $this->$source -= $factor;
                $this->$target++;
            }
        }

        return $this->solveNegativeInterval();
    }
public function cascade()
    {
        foreach (static::getFlipCascadeFactors() as $source => [$target, $factor]) {
            if ($source === 'dayz' && $target === 'weeks') {
                continue;
            }

            $value = $this->$source;
            $this->$source = $modulo = ($factor + ($value % $factor)) % $factor;
            $this->$target += ($value - $modulo) / $factor;
            if ($this->$source > 0 && $this->$target < 0) {
                $this->$source -= $factor;
                $this->$target++;
            }
        }

        return $this->solveNegativeInterval();
    }
public function cascade ( ) { foreach ( static :: getFlipCascadeFactors ( ) as $ source => [ $ target , $ factor ] ) { if ( $ source === 'dayz' && $ target === 'weeks' ) { continue ; } $ value = $ this -> $ source ; $ this -> $ source = $ modulo = ( $ factor + ( $ value % $ factor ) ) % $ factor ; $ this -> $ target += ( $ value - $ modulo ) / $ factor ; if ( $ this -> $ source > 0 && $ this -> $ target < 0 ) { $ this -> $ source -= $ factor ; $ this -> $ target ++ ; } } return $ this -> solveNegativeInterval ( ) ; }
Convert overflowed values into bigger units.

@return $this
Convert overflowed values into bigger units .