use shorter get_class_vars for dump method
parent
3d404671e8
commit
1c882964be
|
@ -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__) ?: [];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<string,string> The properties
|
||||
* @return array<string,mixed> The properties
|
||||
*/
|
||||
public function dump(): array
|
||||
{
|
||||
return [
|
||||
'ns' => $this->ns,
|
||||
'id' => $this->id,
|
||||
'count' => $this->count,
|
||||
];
|
||||
return get_class_vars(__CLASS__) ?: [];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue