Initial import from aternosorg/codex-minecraft
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 32s
Tests / Run tests on PHP v8.5 (push) Failing after 2s

This commit is contained in:
2026-04-30 09:56:57 -05:00
commit 7c7fe5ca80
94 changed files with 7003 additions and 0 deletions

84
src/Log/Line.php Normal file
View File

@@ -0,0 +1,84 @@
<?php
namespace Aternos\Codex\Log;
/**
* Class Line
*
* @package Aternos\Codex\Log
*/
class Line implements LineInterface
{
/**
* @param int $number
* @param string $text
*/
public function __construct(
protected int $number,
protected string $text)
{
}
/**
* Set the text of the line
*
* @param string $text
* @return $this
*/
public function setText(string $text): static
{
$this->text = $text;
return $this;
}
/**
* Get the text of the line
*
* @return string
*/
public function getText(): string
{
return $this->text;
}
/**
* Set the line number
*
* @param int $number
* @return $this
*/
public function setNumber(int $number): static
{
$this->number = $number;
return $this;
}
/**
* Get the line number
*
* @return int
*/
public function getNumber(): int
{
return $this->number;
}
/**
* @return string
*/
public function __toString(): string
{
return $this->getText();
}
/**
* @return array
*/
public function jsonSerialize(): array
{
return [
'number' => $this->getNumber(),
'content' => $this->getText()
];
}
}