Primo Committ

This commit is contained in:
paoloar77
2024-05-07 12:17:25 +02:00
commit e73d0e5113
7204 changed files with 884387 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace Spatie\DbDumper\Exceptions;
use Exception;
class CannotSetParameter extends Exception
{
/**
* @param string $name
* @param string $conflictName
*
* @return \Spatie\DbDumper\Exceptions\CannotSetParameter
*/
public static function conflictingParameters($name, $conflictName)
{
return new static("Cannot set `{$name}` because it conflicts with parameter `{$conflictName}`.");
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Spatie\DbDumper\Exceptions;
use Exception;
class CannotStartDump extends Exception
{
/**
* @param string $name
*
* @return \Spatie\DbDumper\Exceptions\CannotStartDump
*/
public static function emptyParameter($name)
{
return new static("Parameter `{$name}` cannot be empty.");
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace Spatie\DbDumper\Exceptions;
use Exception;
use Symfony\Component\Process\Process;
class DumpFailed extends Exception
{
/**
* @param \Symfony\Component\Process\Process $process
*
* @return \Spatie\DbDumper\Exceptions\DumpFailed
*/
public static function processDidNotEndSuccessfully(Process $process)
{
return new static("The dump process failed with exitcode {$process->getExitCode()} : {$process->getExitCodeText()} : {$process->getErrorOutput()}");
}
/**
* @return \Spatie\DbDumper\Exceptions\DumpFailed
*/
public static function dumpfileWasNotCreated()
{
return new static('The dumpfile could not be created');
}
/**
* @return \Spatie\DbDumper\Exceptions\DumpFailed
*/
public static function dumpfileWasEmpty()
{
return new static('The created dumpfile is empty');
}
}