Set native types in PropertyItem
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
771402e99e
commit
235b4701bc
@ -18,10 +18,8 @@ class OptionsPropertyMainGroup extends OptionsPropertyGroup
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'main';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class OptionsPropertyRootGroup extends OptionsPropertyGroup
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'root';
|
||||
}
|
||||
|
||||
@ -27,10 +27,8 @@ class OptionsPropertySubgroup extends OptionsPropertyGroup
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'subgroup';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class BoolPropertyItem extends OptionsPropertyOneItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'bool';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class DocPropertyItem extends OptionsPropertyOneItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'doc';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class HiddenPropertyItem extends OptionsPropertyOneItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'hidden';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class MessageOnlyPropertyItem extends OptionsPropertyOneItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'messageOnly';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class NumberPropertyItem extends OptionsPropertyOneItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'number';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class RadioPropertyItem extends OptionsPropertyOneItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'radio';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class SelectPropertyItem extends OptionsPropertyOneItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'select';
|
||||
}
|
||||
|
||||
@ -18,10 +18,8 @@ class TextPropertyItem extends OptionsPropertyOneItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main"
|
||||
* or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'text';
|
||||
}
|
||||
|
||||
@ -61,10 +61,8 @@ abstract class OptionsPropertyGroup extends OptionsPropertyItem implements Count
|
||||
|
||||
/**
|
||||
* Gets the instance of the class
|
||||
*
|
||||
* @return OptionsPropertyGroup
|
||||
*/
|
||||
public function getGroup()
|
||||
public function getGroup(): static
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -115,10 +115,8 @@ abstract class OptionsPropertyItem extends PropertyItem
|
||||
|
||||
/**
|
||||
* Returns the property type ( either "options", or "plugin" ).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPropertyType()
|
||||
public function getPropertyType(): string
|
||||
{
|
||||
return 'options';
|
||||
}
|
||||
|
||||
@ -26,10 +26,8 @@ class ExportPluginProperties extends PluginPropertyItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyOneItem ( f.e. "bool", "text", "radio", etc ) or
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main" or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'export';
|
||||
}
|
||||
|
||||
@ -17,10 +17,8 @@ class ImportPluginProperties extends PluginPropertyItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyOneItem ( f.e. "bool", "text", "radio", etc ) or
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main" or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'import';
|
||||
}
|
||||
|
||||
@ -152,10 +152,8 @@ abstract class PluginPropertyItem extends PropertyItem
|
||||
|
||||
/**
|
||||
* Returns the property type ( either "options", or "plugin" ).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPropertyType()
|
||||
public function getPropertyType(): string
|
||||
{
|
||||
return 'plugin';
|
||||
}
|
||||
|
||||
@ -17,10 +17,8 @@ class SchemaPluginProperties extends PluginPropertyItem
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyOneItem ( f.e. "bool", "text", "radio", etc ) or
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main" or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getItemType()
|
||||
public function getItemType(): string
|
||||
{
|
||||
return 'schema';
|
||||
}
|
||||
|
||||
@ -14,30 +14,24 @@ abstract class PropertyItem
|
||||
{
|
||||
/**
|
||||
* Returns the property type ( either "Options", or "Plugin" ).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getPropertyType();
|
||||
abstract public function getPropertyType(): string;
|
||||
|
||||
/**
|
||||
* Returns the property item type of either an instance of
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyOneItem ( f.e. "bool", "text", "radio", etc ) or
|
||||
* - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main" or "subgroup" )
|
||||
* - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getItemType();
|
||||
abstract public function getItemType(): string;
|
||||
|
||||
/**
|
||||
* Only overwritten in the PhpMyAdmin\Properties\Options\OptionsPropertyGroup class:
|
||||
* Used to tell whether we can use the current item as a group by calling
|
||||
* the addProperty() or removeProperty() methods, which are not available
|
||||
* for simple PhpMyAdmin\Properties\Options\OptionsPropertyOneItem subclasses.
|
||||
*
|
||||
* @return object|null
|
||||
*/
|
||||
public function getGroup()
|
||||
public function getGroup(): static|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user