forked from Wavyzz/dolibarr
Fix phpcs
This commit is contained in:
@@ -53,9 +53,11 @@ class EmptyGlobalToFunction extends AbstractRector
|
|||||||
{
|
{
|
||||||
return new RuleDefinition(
|
return new RuleDefinition(
|
||||||
'Change $conf->global to getDolGlobal',
|
'Change $conf->global to getDolGlobal',
|
||||||
[new CodeSample('$conf->global->CONSTANT',
|
[new CodeSample(
|
||||||
|
'$conf->global->CONSTANT',
|
||||||
'getDolGlobalInt(\'CONSTANT\')'
|
'getDolGlobalInt(\'CONSTANT\')'
|
||||||
)]);
|
)]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -56,9 +56,11 @@ class GlobalToFunction extends AbstractRector
|
|||||||
{
|
{
|
||||||
return new RuleDefinition(
|
return new RuleDefinition(
|
||||||
'Change $conf->global to getDolGlobal',
|
'Change $conf->global to getDolGlobal',
|
||||||
[new CodeSample('$conf->global->CONSTANT',
|
[new CodeSample(
|
||||||
|
'$conf->global->CONSTANT',
|
||||||
'getDolGlobalInt(\'CONSTANT\')'
|
'getDolGlobalInt(\'CONSTANT\')'
|
||||||
)]);
|
)]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Dolibarr\Rector\Renaming;
|
namespace Dolibarr\Rector\Renaming;
|
||||||
|
|
||||||
|
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
use PhpParser\Node\Arg;
|
use PhpParser\Node\Arg;
|
||||||
use PhpParser\Node\Scalar\String_;
|
use PhpParser\Node\Scalar\String_;
|
||||||
@@ -36,7 +35,8 @@ class UserRightsToFunction extends AbstractRector
|
|||||||
[new CodeSample(
|
[new CodeSample(
|
||||||
'$user->rights->module->permission',
|
'$user->rights->module->permission',
|
||||||
'$user->hasRight(\'module\', \'permission\')'
|
'$user->hasRight(\'module\', \'permission\')'
|
||||||
)]);
|
)]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user