Skip to content
Snippets Groups Projects
Verified Commit db3830fb authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

style: misc style fixes

parent 4af284cd
Branches
No related tags found
No related merge requests found
Showing
with 10 additions and 20 deletions
...@@ -45,4 +45,10 @@ ...@@ -45,4 +45,10 @@
<exclude name="Squiz.Commenting.ClassComment.Missing"/> <exclude name="Squiz.Commenting.ClassComment.Missing"/>
</rule> </rule>
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames">
<exclude-pattern>*src/Field/Traits/HtmlAttributes.php$</exclude-pattern>
<exclude-pattern>*src/Sanitizer/CallableSanitizer.php$</exclude-pattern>
<exclude-pattern>*src/Field.php$</exclude-pattern>
</rule>
</ruleset> </ruleset>
...@@ -26,4 +26,3 @@ interface ContainerForm { ...@@ -26,4 +26,3 @@ interface ContainerForm {
*/ */
public function put_data( PersistentContainer $container ); public function put_data( PersistentContainer $container );
} }
...@@ -17,5 +17,4 @@ class DateField extends BasicField { ...@@ -17,5 +17,4 @@ class DateField extends BasicField {
public function get_template_name(): string { public function get_template_name(): string {
return 'input-text'; return 'input-text';
} }
} }
...@@ -7,6 +7,4 @@ class WPEditorField extends BasicField { ...@@ -7,6 +7,4 @@ class WPEditorField extends BasicField {
public function get_template_name(): string { public function get_template_name(): string {
return 'wp-editor'; return 'wp-editor';
} }
} }
...@@ -63,4 +63,3 @@ interface Form { ...@@ -63,4 +63,3 @@ interface Form {
*/ */
public function get_form_id(): string; public function get_form_id(): string;
} }
...@@ -23,5 +23,4 @@ class DefaultFormFieldResolver implements Resolver { ...@@ -23,5 +23,4 @@ class DefaultFormFieldResolver implements Resolver {
public function resolve( $name, Renderer $renderer = null ): string { public function resolve( $name, Renderer $renderer = null ): string {
return $this->dir_resolver->resolve( $name, $renderer ); return $this->dir_resolver->resolve( $name, $renderer );
} }
} }
...@@ -16,5 +16,4 @@ class CallableSanitizer implements Sanitizer { ...@@ -16,5 +16,4 @@ class CallableSanitizer implements Sanitizer {
public function sanitize( $value ): string { public function sanitize( $value ): string {
return call_user_func( $this->callable, $value ); return call_user_func( $this->callable, $value );
} }
} }
...@@ -9,5 +9,4 @@ class EmailSanitizer implements Sanitizer { ...@@ -9,5 +9,4 @@ class EmailSanitizer implements Sanitizer {
public function sanitize( $value ): string { public function sanitize( $value ): string {
return sanitize_email( $value ); return sanitize_email( $value );
} }
} }
...@@ -9,5 +9,4 @@ class NoSanitize implements Sanitizer { ...@@ -9,5 +9,4 @@ class NoSanitize implements Sanitizer {
public function sanitize( $value ) { public function sanitize( $value ) {
return $value; return $value;
} }
} }
...@@ -13,5 +13,4 @@ class TextFieldSanitizer implements Sanitizer { ...@@ -13,5 +13,4 @@ class TextFieldSanitizer implements Sanitizer {
} }
return sanitize_text_field( $value ); return sanitize_text_field( $value );
} }
} }
...@@ -29,5 +29,4 @@ class ProductSelectSerializer implements Serializer { ...@@ -29,5 +29,4 @@ class ProductSelectSerializer implements Serializer {
public function unserialize( string $value ) { public function unserialize( string $value ) {
return $value; return $value;
} }
} }
<?php <?php
// phpcs:disable WordPress.PHP.DiscouragedPHPFunctions
namespace WPDesk\Forms\Serializer; namespace WPDesk\Forms\Serializer;
...@@ -13,5 +14,4 @@ class SerializeSerializer implements Serializer { ...@@ -13,5 +14,4 @@ class SerializeSerializer implements Serializer {
public function unserialize( string $value ) { public function unserialize( string $value ) {
return unserialize( $value ); return unserialize( $value );
} }
} }
...@@ -45,5 +45,4 @@ class ChainValidator implements Validator { ...@@ -45,5 +45,4 @@ class ChainValidator implements Validator {
public function get_messages(): array { public function get_messages(): array {
return $this->messages; return $this->messages;
} }
} }
...@@ -13,5 +13,4 @@ class NoValidateValidator implements Validator { ...@@ -13,5 +13,4 @@ class NoValidateValidator implements Validator {
public function get_messages(): array { public function get_messages(): array {
return []; return [];
} }
} }
...@@ -21,5 +21,4 @@ class NonceValidator implements Validator { ...@@ -21,5 +21,4 @@ class NonceValidator implements Validator {
public function get_messages(): array { public function get_messages(): array {
return []; return [];
} }
} }
...@@ -13,5 +13,4 @@ class RequiredValidator implements Validator { ...@@ -13,5 +13,4 @@ class RequiredValidator implements Validator {
public function get_messages(): array { public function get_messages(): array {
return []; return [];
} }
} }
...@@ -22,4 +22,3 @@ $editor_settings = wp_parse_args( $field->get_attributes(), $default_settings ) ...@@ -22,4 +22,3 @@ $editor_settings = wp_parse_args( $field->get_attributes(), $default_settings )
$editor_id = uniqid( 'wyswig_' ); $editor_id = uniqid( 'wyswig_' );
wp_editor( wp_kses_post( $value ), $editor_id, $editor_settings ); wp_editor( wp_kses_post( $value ), $editor_id, $editor_settings );
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment