]> BookStack Code Mirror - bookstack/blobdiff - app/Console/Commands/ClearActivity.php
Aligned command class code
[bookstack] / app / Console / Commands / ClearActivity.php
index 5ccf6e972b5752b52aa3534c03b797193e89dea1..b88408e0c8071acba47f4268fe1d17a11162866d 100644 (file)
@@ -21,27 +21,13 @@ class ClearActivity extends Command
      */
     protected $description = 'Clear user activity from the system';
 
-    protected $activity;
-
-    /**
-     * Create a new command instance.
-     *
-     * @param Activity $activity
-     */
-    public function __construct(Activity $activity)
-    {
-        $this->activity = $activity;
-        parent::__construct();
-    }
-
     /**
      * Execute the console command.
-     *
-     * @return mixed
      */
-    public function handle()
+    public function handle(): int
     {
-        $this->activity->newQuery()->truncate();
+        Activity::query()->truncate();
         $this->comment('System activity cleared');
+        return 0;
     }
 }