-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHPCS: fix up the code base [4] - multi-line function calls (#79)
* PHPCS: fix up the code base [4-a] - multi-line function calls Fixes relate to the following rules: * Each argument in a multiline function call should start on a new line. Single item associative arrays don't need to be multi-line according to WPCS, so changing the array to single-line also fixes the "multiline function call" issue. * PHPCS: fix up the code base [4-b] - multi-line function calls Fixes relate to the following rules: * Each argument in a multiline function call should start on a new line. * PHPCS: fix up the code base [4-c] - multi-line function calls Multi-line function calls need to have each argument on a new line. In a next iteration of this principle, it is expected that a sniff will be introduced to ban multi-line function call arguments. With this mind, a number of function calls with multi-line parameters which are currently already causing errors to be thrown by PHPCS, have been fixed by moving multi-line function call arguments out of the function call and defining these as a variable before passing it to the function call. * PHPCS: fix up the code base [4-d] - multi-line function calls Fixes relate to the following rules: * Each argument in a multiline function call should start on a new line. Note: in the (near?) future, multi-line arguments in function calls will probably be prohibited. This will impact this code. The choice for the future is: * Either change the closures to full-blown methods. * Declare them before the function call, assign them to a variable and pass the variable to the function call.
- Loading branch information
1 parent
025efb4
commit beedcd2
Showing
5 changed files
with
50 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters