Look how the static keyword disappearing.
@prettier/plugin-php v0.16.1
Playground link
Input:
<?php
namespace DataMincerPlugins\Fields;
use DataMincerCore\Exception\PluginException;
use DataMincerCore\Plugin\PluginFieldBase;
use DataMincerCore\Plugin\PluginFieldInterface;
/**
* @property PluginFieldInterface source
* @property string[] levels
*/
class Balance extends PluginFieldBase {
protected static $pluginId = "balance";
// prettier-ignore
static function getSchemaChildren() {
return parent::getSchemaChildren() + [
'source' => [ '_type' => 'partial', '_required' => TRUE, '_partial' => 'field' ],
'levels' => [ '_type' => 'prototype', '_required' => TRUE, '_prototype' => [
'_type' => 'text', '_required' => TRUE,
]]
];
}
}
Output:
<?php
namespace DataMincerPlugins\Fields;
use DataMincerCore\Exception\PluginException;
use DataMincerCore\Plugin\PluginFieldBase;
use DataMincerCore\Plugin\PluginFieldInterface;
/**
* @property PluginFieldInterface source
* @property string[] levels
*/
class Balance extends PluginFieldBase {
protected static $pluginId = "balance";
// prettier-ignore
function getSchemaChildren() {
return parent::getSchemaChildren() + [
'source' => [ '_type' => 'partial', '_required' => TRUE, '_partial' => 'field' ],
'levels' => [ '_type' => 'prototype', '_required' => TRUE, '_prototype' => [
'_type' => 'text', '_required' => TRUE,
]]
];
}
}
Thanks for the bug report @OnkelTem !
Hehe, thanks for the most convenient way to report issues — the button in the right bottom in the playground!
Most helpful comment
Hehe, thanks for the most convenient way to report issues — the button in the right bottom in the playground!