Skip to content

Commit

Permalink
Rename simple_lambda_call to regular_callable_call
Browse files Browse the repository at this point in the history
  • Loading branch information
julienfalque authored and SpacePossum committed Jan 28, 2020
1 parent 9f54b3f commit 204eb15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,12 @@ Choose from the list of available rules:
ones; defaults to ``['getrandmax' => 'mt_getrandmax', 'rand' =>
'mt_rand', 'srand' => 'mt_srand']``

* **regular_callable_call**

Callables must be called without using ``call_user_func*`` when possible.

*Risky rule: risky when the ``call_user_func`` or ``call_user_func_array`` function is overridden.*

* **return_assignment** [@PhpCsFixer]

Local, dynamic and directly referenced variables should not be assigned
Expand Down Expand Up @@ -1836,12 +1842,6 @@ Choose from the list of available rules:

*Risky rule: silencing of deprecation errors might cause changes to code behaviour.*

* **simple_lambda_call**

Calling lambdas without using ``call_user_func*``, when possible.

*Risky rule: risky when the ``call_user_func`` or ``call_user_func_array`` function is overridden.*

* **simple_to_complex_string_variable** [@PhpCsFixer]

Converts explicit variables in double-quoted strings and heredoc syntax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
/**
* @author Dariusz Rumiński <[email protected]>
*/
final class SimpleLambdaCallFixer extends AbstractFixer
final class RegularCallableCallFixer extends AbstractFixer
{
/**
* {@inheritdoc}
*/
public function getDefinition()
{
return new FixerDefinition(
'Calling lambdas without using `call_user_func*`, when possible.',
'Callables must be called without using `call_user_func*` when possible.',
[
new CodeSample(
'<?php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
*
* @internal
*
* @covers \PhpCsFixer\Fixer\FunctionNotation\SimpleLambdaCallFixer
* @covers \PhpCsFixer\Fixer\FunctionNotation\RegularCallableCallFixer
*/
final class SimpleLambdaCallFixerTest extends AbstractFixerTestCase
final class RegularCallableCallFixerTest extends AbstractFixerTestCase
{
/**
* @param string $expected
Expand Down

0 comments on commit 204eb15

Please sign in to comment.