Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: Apply readonly consistently #33

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"friendsofphp/php-cs-fixer": "^3",
"mockery/mockery": "^1.2",
"phpunit/phpunit": "^9.5.4",
"rector/rector": "^0.17.0",
"rector/rector": "^0.18.0",
"scrutinizer/ocular": "^1.9"
},
"autoload": {
Expand Down
104 changes: 52 additions & 52 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Backend/File/ObjectVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class ObjectVisitor
{
private TokenVisitor $tokenVisitor;
private readonly TokenVisitor $tokenVisitor;

public function __construct()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Backend/Structure/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Document
*/
private array $pages = [];

private Configuration $configuration;
private readonly Configuration $configuration;

public function __construct()
{
Expand Down
5 changes: 1 addition & 4 deletions src/Frontend/Content/Paragraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ class Paragraph extends AbstractContent
{
final public const ALIGNMENT_LEFT = 'ALIGNMENT_LEFT';

private string $alignment;

/**
* @var Phrase[]
*/
private array $phrases = [];

public function __construct(string $alignment = self::ALIGNMENT_LEFT)
public function __construct(private string $alignment = self::ALIGNMENT_LEFT)
{
$this->alignment = $alignment;
}

public function setAlignment(string $alignment): self
Expand Down
9 changes: 1 addition & 8 deletions src/Frontend/Content/Style/DrawingStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@

class DrawingStyle
{
private ?float $lineWidth;
private ?Color $lineColor;
private ?Color $fillColor;

public function __construct(float $borderWidth = 1, ?Color $borderColor = new Color(0, 0, 0), Color $backgroundColor = null)
public function __construct(private ?float $lineWidth = 1, private ?Color $lineColor = new Color(0, 0, 0), private ?Color $fillColor = null)
{
$this->lineWidth = $borderWidth;
$this->lineColor = $borderColor;
$this->fillColor = $backgroundColor;
}

public static function createFromBlockStyle(BlockStyle $blockStyle): self
Expand Down
Loading