Skip to content

Commit

Permalink
Clean up WPCS for class-wp-saml-auth-cli.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed May 12, 2017
1 parent 52d1498 commit c91e7d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions inc/class-wp-saml-auth-cli.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
/**
* Class WP_SAML_Auth_CLI
*
* @package WP_SAML_Auth
*/

/**
* Configure and manage the WP SAML Auth plugin.
Expand Down Expand Up @@ -80,7 +85,7 @@ public function scaffold_config( $args, $assoc_args ) {
/**
* Generate a string representation of a function to be used for configuring the plugin.
*
* @param array
* @param array $assoc_args Associative arguments passed to the command.
* @return string
*/
protected static function scaffold_config_function( $assoc_args ) {
Expand All @@ -100,12 +105,12 @@ protected static function scaffold_config_function( $assoc_args ) {
$assoc_args = array_merge( $defaults, $assoc_args );

foreach ( array( 'auto_provision', 'permit_wp_login' ) as $bool ) {
// Support --auto_provision=false passed as an argument
// Support --auto_provision=false passed as an argument.
$assoc_args[ $bool ] = 'false' === $assoc_args[ $bool ] ? false : (bool) $assoc_args[ $bool ];
}

$values = var_export( $assoc_args, true );
// Formatting fixes
// Formatting fixes.
$search_replace = array(
' ' => "\t\t",
'array (' => 'array(',
Expand Down
4 changes: 4 additions & 0 deletions phpcs.ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<rule ref="WordPress-Core" />
<rule ref="WordPress-Docs" />

<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>*/inc/class-wp-saml-auth-cli.php</exclude-pattern>
</rule>

<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
Expand Down

0 comments on commit c91e7d1

Please sign in to comment.