diff --git a/src/ActionDescriptor.php b/src/ActionDescriptor.php index 419ae39..2258938 100644 --- a/src/ActionDescriptor.php +++ b/src/ActionDescriptor.php @@ -57,13 +57,6 @@ class ActionDescriptor */ public function dump(): array { - return [ - 'id' => $this->id, - 'ns' => $this->ns, - 'select' => $this->select, - 'query' => $this->query, - 'success' => $this->success, - 'error' => $this->error, - ]; + return get_class_vars(__CLASS__) ?: []; } } diff --git a/src/ValueDescriptor.php b/src/ValueDescriptor.php index d6a9dbc..b1c2034 100644 --- a/src/ValueDescriptor.php +++ b/src/ValueDescriptor.php @@ -15,7 +15,10 @@ declare(strict_types=1); namespace Dotclear\Plugin\Uninstaller; /** - * Cleaner value descriptor + * Cleaner value descriptor. + * + * Description of a value from AbstractCleaner::value() + * and AbstractCleaner::related() */ class ValueDescriptor { @@ -30,21 +33,16 @@ class ValueDescriptor public readonly string $ns, public readonly string $id, public readonly int $count, - ) { } /** * Get descriptor properties. * - * @return array The properties + * @return array The properties */ public function dump(): array { - return [ - 'ns' => $this->ns, - 'id' => $this->id, - 'count' => $this->count, - ]; + return get_class_vars(__CLASS__) ?: []; } }