<?php

namespace LaraBB\Category\Tasks;

use Exception;
use LaraBB\Category\Models\Category;

/**
 * Class DestroyCategoryTask
 * @package LaraBB\Category\Tasks
 */
class DestroyTask
{
    /**
     * @param Category $category
     * @return bool|null
     * @throws Exception
     */
    public function run(Category $category): ?bool
    {
        return $category->delete();
    }
}
