Skip to content

Commit

Permalink
#132 Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fumikito committed Aug 28, 2024
1 parent 6e15fa7 commit 1a13b4f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 25 deletions.
3 changes: 2 additions & 1 deletion app/Gianism/Pattern/Singleton.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ abstract class Singleton {
*
* @param array $argument
*/
protected function __construct( array $argument = [] ) { // @phpstan-ignore constructor.unusedParameter
protected function __construct( array $argument = [] ) {

Check failure on line 26 in app/Gianism/Pattern/Singleton.php

View workflow job for this annotation

GitHub Actions / Check PHP code quality

Constructor of class Gianism\Pattern\Singleton has an unused parameter $argument.
// @phpstan-ignore constructor.unusedParameter

Check failure on line 27 in app/Gianism/Pattern/Singleton.php

View workflow job for this annotation

GitHub Actions / Check PHP code quality

No error with identifier constructor.unusedParameter is reported on line 27.
// Override something.
}

Expand Down
11 changes: 7 additions & 4 deletions app/Gianism/UI/Screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,13 @@ protected function load_template( $name ) {
} else {
printf(
'<div class="gianism-load-error">%s</div>',
wp_kses_post( sprintf(
__( 'Template file <code>%s</code> is missing.', 'wp-gianism' ),
esc_html( $name )
) )
wp_kses_post(
sprintf(
// translators: %s is template name.
__( 'Template file <code>%s</code> is missing.', 'wp-gianism' ),
esc_html( $name )
)
)
);
}
/**
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ parameters:

bootstrapFiles:
- vendor/autoload.php

editorUrlTitle: '%%relFile%%:%%line%%'
11 changes: 7 additions & 4 deletions templates/advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,14 @@ function my_facebook_auth( $facebook, $args $token ) {

<p class="notice">
<?php
echo wp_kses_post( sprintf(
echo wp_kses_post(
sprintf(
// translators: %s is URL.
__( '<strong>Note:</strong> <code>$facebook</code> object is instance of Facebook class which is part of Facebook PHP SDK. To know what you can do with it, read the <a href="%s">documentation</a>.', 'wp-gianism' ),
'https://developers.facebook.com/docs/reference/php/'
) ); ?>
__( '<strong>Note:</strong> <code>$facebook</code> object is instance of Facebook class which is part of Facebook PHP SDK. To know what you can do with it, read the <a href="%s">documentation</a>.', 'wp-gianism' ),
'https://developers.facebook.com/docs/reference/php/'
)
);
?>
</p>


Expand Down
35 changes: 21 additions & 14 deletions templates/setting/facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@
<?php $this->switch_button( 'fb_enabled', $this->option->is_enabled( 'facebook' ), 1 ); ?>
<p class="description">
<?php
echo wp_kses_post( sprintf(
echo wp_kses_post(
sprintf(
// translators: %1$s is service name, %2$s is URL.
__( 'You have to create %1$s App <a target="_blank" href="%2$s">here</a> to get required infomation.', 'wp-gianism' ),
'Facebook',
'https://developers.facebook.com/apps'
) );
echo wp_kses_post( sprintf(
__( 'You have to create %1$s App <a target="_blank" href="%2$s">here</a> to get required infomation.', 'wp-gianism' ),
'Facebook',
'https://developers.facebook.com/apps'
)
);
echo wp_kses_post(
sprintf(
// translators: %1$s is URL, %2$s is label.
__( 'See detail at <a href="%1$s">%2$s</a>.', 'wp-gianism' ),
esc_url( $this->setting_url( 'setup' ) ),
esc_html__( 'How to set up', 'wp-gianism' )
) );
__( 'See detail at <a href="%1$s">%2$s</a>.', 'wp-gianism' ),
esc_url( $this->setting_url( 'setup' ) ),
esc_html__( 'How to set up', 'wp-gianism' )
)
);
?>
</p>
</td>
Expand Down Expand Up @@ -94,10 +98,13 @@
<?php if ( $instance->fb_use_api ) : ?>
<p class="notice">
<?php
echo wp_kses_post( sprintf(
__( 'You must set up token on <a href="%s">Facebook API page</a>.', 'wp-gianism' ),
$this->setting_url( 'fb-api' )
) );
echo wp_kses_post(
sprintf(
// translators: %s is URL.
__( 'You must set up token on <a href="%s">Facebook API page</a>.', 'wp-gianism' ),
$this->setting_url( 'fb-api' )
)
);
?>
</p>
<?php endif; ?>
Expand Down

0 comments on commit 1a13b4f

Please sign in to comment.