rector/packages/FileFormatter/ValueObject/EditorConfigConfiguration.php
Abdul Malik Ikhsan fc10fce13d
[Rectify] [Php81] Enable Rectify on Readonly Property only (#1384)
* 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>
2021-12-04 15:32:52 +03:00

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();
}
}