refactor: susun semula struktur folder — Laravel source ke src/
This commit is contained in:
31
vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php
vendored
Normal file
31
vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/cli-parser.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\CliParser;
|
||||
|
||||
use function implode;
|
||||
use function sprintf;
|
||||
use RuntimeException;
|
||||
|
||||
final class AmbiguousOptionException extends RuntimeException implements Exception
|
||||
{
|
||||
/**
|
||||
* @param array<string> $candiates
|
||||
*/
|
||||
public function __construct(string $option, array $candiates)
|
||||
{
|
||||
parent::__construct(
|
||||
sprintf(
|
||||
'Option "%s" is ambiguous. Similar options are: %s',
|
||||
$option,
|
||||
implode(', ', $candiates),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
16
vendor/sebastian/cli-parser/src/exceptions/Exception.php
vendored
Normal file
16
vendor/sebastian/cli-parser/src/exceptions/Exception.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/cli-parser.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\CliParser;
|
||||
|
||||
use Throwable;
|
||||
|
||||
interface Exception extends Throwable
|
||||
{
|
||||
}
|
||||
26
vendor/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php
vendored
Normal file
26
vendor/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/cli-parser.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\CliParser;
|
||||
|
||||
use function sprintf;
|
||||
use RuntimeException;
|
||||
|
||||
final class OptionDoesNotAllowArgumentException extends RuntimeException implements Exception
|
||||
{
|
||||
public function __construct(string $option)
|
||||
{
|
||||
parent::__construct(
|
||||
sprintf(
|
||||
'Option "%s" does not allow an argument',
|
||||
$option,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
26
vendor/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php
vendored
Normal file
26
vendor/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/cli-parser.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\CliParser;
|
||||
|
||||
use function sprintf;
|
||||
use RuntimeException;
|
||||
|
||||
final class RequiredOptionArgumentMissingException extends RuntimeException implements Exception
|
||||
{
|
||||
public function __construct(string $option)
|
||||
{
|
||||
parent::__construct(
|
||||
sprintf(
|
||||
'Required argument for option "%s" is missing',
|
||||
$option,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
38
vendor/sebastian/cli-parser/src/exceptions/UnknownOptionException.php
vendored
Normal file
38
vendor/sebastian/cli-parser/src/exceptions/UnknownOptionException.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/cli-parser.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\CliParser;
|
||||
|
||||
use function implode;
|
||||
use function sprintf;
|
||||
use RuntimeException;
|
||||
|
||||
final class UnknownOptionException extends RuntimeException implements Exception
|
||||
{
|
||||
/**
|
||||
* @param array<string> $similarOptions
|
||||
*/
|
||||
public function __construct(string $option, array $similarOptions)
|
||||
{
|
||||
$message = sprintf(
|
||||
'Unknown option "%s"',
|
||||
$option,
|
||||
);
|
||||
|
||||
if ($similarOptions !== []) {
|
||||
$message = sprintf(
|
||||
'Unknown option "%s". Most similar options are %s',
|
||||
$option,
|
||||
implode(', ', $similarOptions),
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user