src/ChangeSet.php
public function getDetails()
    {
        // Check each change item
        /** @var ChangeSetItem $change */
        $total = 0;
        $withChanges = 0;
        foreach ($this->Changes() as $change) {
            $total++;
            if ($change->hasChange()) {
                $withChanges++;
            }
        }

        // Empty state
        if (empty($total)) {
            return _t(__CLASS__ . '.EMPTY', 'Empty');
        }

        // Count all items
        $totalText = _t(
            __CLASS__ . '.ITEMS_TOTAL',
            '1 total|{count} total',
            ['count' => $total]
        );
        if (empty($withChanges)) {
            return $totalText;
        }

        // Interpolate with changes text
        return _t(
            __CLASS__ . '.ITEMS_CHANGES',
            '{total} (1 change)|{total} ({count} changes)',
            [
                'total' => $totalText,
                'count' => $withChanges,
            ]
        );
    }
public function getDetails()
    {
        // Check each change item
        /** @var ChangeSetItem $change */
        $total = 0;
        $withChanges = 0;
        foreach ($this->Changes() as $change) {
            $total++;
            if ($change->hasChange()) {
                $withChanges++;
            }
        }

        // Empty state
        if (empty($total)) {
            return _t(__CLASS__ . '.EMPTY', 'Empty');
        }

        // Count all items
        $totalText = _t(
            __CLASS__ . '.ITEMS_TOTAL',
            '1 total|{count} total',
            ['count' => $total]
        );
        if (empty($withChanges)) {
            return $totalText;
        }

        // Interpolate with changes text
        return _t(
            __CLASS__ . '.ITEMS_CHANGES',
            '{total} (1 change)|{total} ({count} changes)',
            [
                'total' => $totalText,
                'count' => $withChanges,
            ]
        );
    }
public function getDetails ( ) { // Check each change item /** @var ChangeSetItem $change */ $ total = 0 ; $ withChanges = 0 ; foreach ( $ this -> Changes ( ) as $ change ) { $ total ++ ; if ( $ change -> hasChange ( ) ) { $ withChanges ++ ; } } // Empty state if ( empty ( $ total ) ) { return _t ( __CLASS__ . '.EMPTY' , 'Empty' ) ; } // Count all items $ totalText = _t ( __CLASS__ . '.ITEMS_TOTAL' , '1 total|{count} total' , [ 'count' => $ total ] ) ; if ( empty ( $ withChanges ) ) { return $ totalText ; } // Interpolate with changes text return _t ( __CLASS__ . '.ITEMS_CHANGES' , '{total} (1 change)|{total} ({count} changes)' , [ 'total' => $ totalText , 'count' => $ withChanges , ] ) ; }
Gets summary of items in changeset

@return string
Gets summary of items in changeset