Fix: Do not lint if there is no content
This commit is contained in:
parent
5af0fb5ef9
commit
a3d95b4743
|
@ -93,12 +93,14 @@ 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();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store file on disk
|
* Store file on disk
|
||||||
|
|
Loading…
Reference in New Issue
Block a user