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