mirror of
https://ghproxy.net/https://github.com/elementor/wp2static-addon-s3.git
synced 2025-08-17 19:51:26 +08:00
adjust coverage
This commit is contained in:
parent
c0c8bee69a
commit
5542916001
4 changed files with 742 additions and 1011 deletions
|
@ -54,11 +54,11 @@
|
|||
},
|
||||
"scripts": {
|
||||
"phpstan": "php -d memory_limit=-1 vendor/bin/phpstan analyse",
|
||||
"phpcs": "vendor/bin/phpcs --standard=./tools/phpcs.xml --ignore=*/tests/*,*/admin/*,**/coverage/*,*.js,*/vendor/*,*/views/*.php ./",
|
||||
"phpcbf": "vendor/bin/phpcbf --standard=./tools/phpcs.xml --ignore=*/js/*,*/tests/*,*/admin/*,*/coverage/*,*.js,*/vendor/* ./",
|
||||
"phpcs": "vendor/bin/phpcs --standard=./tools/phpcs.xml --ignore='/tests/*,/vendor/*,/coverage/*' ./",
|
||||
"phpcbf": "vendor/bin/phpcbf --standard=./tools/phpcs.xml --ignore='/tests/*,/vendor/*,/coverage/*' ./",
|
||||
"phpunit": "vendor/bin/phpunit ./tests/unit/",
|
||||
"php73": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.3 --ignore=*/tests/*,*/admin/*,**/coverage/*,*.js,*/vendor/* ./",
|
||||
"php74": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.4 --ignore=*/tests/*,*/admin/*,**/coverage/*,*.js,*/vendor/* ./",
|
||||
"php73": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.3 --ignore='/tests/*,/vendor/*,/coverage/*' ./",
|
||||
"php74": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.4 --ignore='/tests/*,/vendor/*,/coverage/*' ./",
|
||||
"coverage": "vendor/bin/phpunit tests/unit --coverage-html coverage --whitelist src/",
|
||||
"lint": "vendor/bin/parallel-lint --exclude vendor .",
|
||||
"test": [
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -10,10 +10,8 @@
|
|||
-->
|
||||
<arg name="colors" />
|
||||
<arg name="tab-width" value="2" />
|
||||
<rule ref="PSR1">
|
||||
<exclude-pattern>/wp2static-addon-s3.php</exclude-pattern>
|
||||
</rule>
|
||||
<!-- Custom line length validation -->
|
||||
<rule ref="Squiz.PHP.DiscouragedFunctions" />
|
||||
<rule ref="Generic.Files.LineLength">
|
||||
<properties>
|
||||
<property name="lineLimit" value="100" />
|
||||
|
@ -50,6 +48,7 @@
|
|||
<rule ref="WordPress">
|
||||
<exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed" />
|
||||
<exclude name="Generic.Commenting.DocComment.ShortNotCapital" />
|
||||
<exclude name="Generic.Commenting.DocComment.MissingShort" />
|
||||
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
|
||||
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine" />
|
||||
<exclude name="Generic.PHP.NoSilencedErrors.Discouraged" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
// phpcs:disable Generic.Files.LineLength.MaxExceeded
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
// phpcs:disable Generic.Files.LineLength.MaxExceeded
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
|
||||
/**
|
||||
* @var mixed[] $view
|
||||
|
@ -14,7 +14,7 @@
|
|||
<form
|
||||
name="wp2static-s3-save-options"
|
||||
method="POST"
|
||||
action="<?php echo esc_url( admin_url('admin-post.php') ); ?>">
|
||||
action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
|
||||
|
||||
<?php wp_nonce_field( $view['nonce_action'] ); ?>
|
||||
<input name="action" type="hidden" value="wp2static_s3_save_options" />
|
||||
|
@ -81,7 +81,7 @@
|
|||
name="<?php echo $view['options']['s3SecretAccessKey']->name; ?>"
|
||||
type="password"
|
||||
value="<?php echo $view['options']['s3SecretAccessKey']->value !== '' ?
|
||||
\WP2Static\CoreOptions::encrypt_decrypt('decrypt', $view['options']['s3SecretAccessKey']->value) :
|
||||
\WP2Static\CoreOptions::encrypt_decrypt( 'decrypt', $view['options']['s3SecretAccessKey']->value ) :
|
||||
''; ?>"
|
||||
/>
|
||||
</td>
|
||||
|
@ -148,10 +148,12 @@
|
|||
name="<?php echo $view['options']['s3ObjectACL']->name; ?>"
|
||||
>
|
||||
<option
|
||||
<?php if ( $view['options']['s3ObjectACL']->value === 'public-read' ) { echo "selected"; } ?>
|
||||
<?php if ( $view['options']['s3ObjectACL']->value === 'public-read' ) {
|
||||
echo 'selected'; } ?>
|
||||
value="public-read">public-read</option>
|
||||
<option
|
||||
<?php if ( $view['options']['s3ObjectACL']->value === 'private' ) { echo "selected"; } ?>
|
||||
<?php if ( $view['options']['s3ObjectACL']->value === 'private' ) {
|
||||
echo 'selected'; } ?>
|
||||
value="private">private</option>
|
||||
</select>
|
||||
</td>
|
||||
|
@ -209,7 +211,7 @@
|
|||
name="<?php echo $view['options']['cfSecretAccessKey']->name; ?>"
|
||||
type="password"
|
||||
value="<?php echo $view['options']['cfSecretAccessKey']->value !== '' ?
|
||||
\WP2Static\CoreOptions::encrypt_decrypt('decrypt', $view['options']['cfSecretAccessKey']->value) :
|
||||
\WP2Static\CoreOptions::encrypt_decrypt( 'decrypt', $view['options']['cfSecretAccessKey']->value ) :
|
||||
''; ?>"
|
||||
/>
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue