Skip to content

Commit 921f254

Browse files
luisdalmolinclaude
andcommitted
Simplify CommentionsPlugin implementation
- Remove redundant class variables for edit/delete settings - Empty register() method since config is set directly - Simplified implementation with the same functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 71de138 commit 921f254

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/CommentionsPlugin.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,12 @@
77

88
class CommentionsPlugin implements Plugin
99
{
10-
protected bool $allowEdits = true;
11-
12-
protected bool $allowDeletes = true;
13-
1410
public function getId(): string
1511
{
1612
return CommentionsServiceProvider::$name;
1713
}
1814

19-
public function register(Panel $panel): void
20-
{
21-
Config::allowEdits($this->allowEdits);
22-
Config::allowDeletes($this->allowDeletes);
23-
}
15+
public function register(Panel $panel): void {}
2416

2517
public function boot(Panel $panel): void {}
2618

@@ -36,15 +28,13 @@ public static function get(): static
3628

3729
public function disallowEdits(): static
3830
{
39-
$this->allowEdits = false;
4031
Config::allowEdits(false);
4132

4233
return $this;
4334
}
4435

4536
public function disallowDeletes(): static
4637
{
47-
$this->allowDeletes = false;
4838
Config::allowDeletes(false);
4939

5040
return $this;

0 commit comments

Comments
 (0)