mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-15 05:15:04 +01:00
3c8f8a03d6
[DowngradePhp80] Skip remove self on DowngradeStaticTypeDeclarationRector (#721)
19 lines
528 B
PHP
19 lines
528 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\FileFormatter\Exception;
|
|
|
|
use InvalidArgumentException;
|
|
final class InvalidIndentStyleException extends \InvalidArgumentException
|
|
{
|
|
/**
|
|
* @param array<int, string> $allowedStyles
|
|
* @param string $style
|
|
*/
|
|
public static function fromStyleAndAllowedStyles($style, $allowedStyles) : self
|
|
{
|
|
$message = \sprintf('Given style "%s" is not allowed. Allowed are "%s"', $style, \implode(' ', $allowedStyles));
|
|
return new self($message);
|
|
}
|
|
}
|