src/Commands/UpgradeCommand.php
protected function getExistingMigrationsWarning(array $existingMigrations)
    {
        if (count($existingMigrations) > 1) {
            $base = "Laratrust upgrade migrations already exist.\nFollowing files were found: ";
        } else {
            $base = "Laratrust upgrade migration already exists.\nFollowing file was found: ";
        }

        return $base . array_reduce($existingMigrations, function ($carry, $fileName) {
            return $carry . "\n - " . $fileName;
        });
    }
protected function getExistingMigrationsWarning(array $existingMigrations)
    {
        if (count($existingMigrations) > 1) {
            $base = "Laratrust upgrade migrations already exist.\nFollowing files were found: ";
        } else {
            $base = "Laratrust upgrade migration already exists.\nFollowing file was found: ";
        }

        return $base . array_reduce($existingMigrations, function ($carry, $fileName) {
            return $carry . "\n - " . $fileName;
        });
    }
protected function getExistingMigrationsWarning ( array $ existingMigrations ) { if ( count ( $ existingMigrations ) > 1 ) { $ base = "Laratrust upgrade migrations already exist.\nFollowing files were found: " ; } else { $ base = "Laratrust upgrade migration already exists.\nFollowing file was found: " ; } return $ base . array_reduce ( $ existingMigrations , function ( $ carry , $ fileName ) { return $ carry . "\n - " . $ fileName ; } ) ; }
Build a warning regarding possible duplication
due to already existing migrations.

@param  array $existingMigrations
@return string
Build a warning regarding possible duplication due to already existing migrations .