mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-13 14:42:23 +00:00
fc10fce13d
* re-enable rectify and ecs * [Rectify] [Php81] Enable Rectify on Readonly Property only * comment * [ci-review] Rector Rectify * [ci-review] Rector Rectify * [ci-review] Rector Rectify * [ci-review] Rector Rectify * [ci-review] Rector Rectify Co-authored-by: GitHub Action <action@github.com>
49 lines
1.0 KiB
PHP
49 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Rector\FileFormatter\ValueObject;
|
|
|
|
/**
|
|
* @see \Rector\Tests\FileFormatter\ValueObject\EditorConfigConfigurationTest
|
|
*/
|
|
final class EditorConfigConfiguration
|
|
{
|
|
public function __construct(
|
|
private readonly Indent $indent,
|
|
private readonly NewLine $newLine,
|
|
private readonly bool $insertFinalNewline
|
|
) {
|
|
}
|
|
|
|
public function getNewLine(): string
|
|
{
|
|
return $this->newLine->__toString();
|
|
}
|
|
|
|
public function getFinalNewline(): string
|
|
{
|
|
return $this->insertFinalNewline ? $this->getNewLine() : '';
|
|
}
|
|
|
|
public function getIndent(): string
|
|
{
|
|
return $this->indent->__toString();
|
|
}
|
|
|
|
public function getIndentStyleCharacter(): string
|
|
{
|
|
return $this->indent->getIndentStyleCharacter();
|
|
}
|
|
|
|
public function getIndentStyle(): string
|
|
{
|
|
return $this->indent->getIndentStyle();
|
|
}
|
|
|
|
public function getIndentSize(): int
|
|
{
|
|
return $this->indent->getIndentSize();
|
|
}
|
|
}
|