1
0

Fix: Do not lint if there is no content

This commit is contained in:
Richard Dern 2024-04-22 21:46:55 +02:00
parent 5af0fb5ef9
commit a3d95b4743

View File

@ -93,11 +93,13 @@ public function isDirty(): bool
*/ */
public function lint(): void public function lint(): void
{ {
$linter = new Linter($this->content ?? ''); if (!empty($this->content)) {
$linter = new Linter($this->content);
$this->content = $linter->format(); $this->content = $linter->format();
$this->save(); $this->save();
}
} }
/** /**