Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
'no_extra_blank_lines' => true,
'no_trailing_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'ternary_to_null_coalescing' => true,
'no_null_property_initialization' => true,
'blank_line_before_statement' => array(
'statements' => array(
'try',
Expand Down
2 changes: 1 addition & 1 deletion css/_single_theme.css.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$settings = FrmStylesHelper::get_settings_for_output( $style );
extract( $settings ); // phpcs:ignore WordPress.PHP.DontExtract

$is_loaded_via_ajax = isset( $is_loaded_via_ajax ) ? $is_loaded_via_ajax : false;
$is_loaded_via_ajax = $is_loaded_via_ajax ?? false;
FrmStylesPreviewHelper::get_additional_preview_style( $settings, $is_loaded_via_ajax );

$important = empty( $important_style ) ? '' : ' !important';
Expand Down
4 changes: 0 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ parameters:
- classes/controllers/FrmFormActionsController.php
- classes/controllers/FrmFormTemplatesController.php
- classes/controllers/FrmFormsController.php
- classes/controllers/FrmSettingsController.php
- classes/controllers/FrmStylesController.php
- classes/helpers/FrmAppHelper.php
- classes/helpers/FrmCSVExportHelper.php
Expand All @@ -210,15 +209,12 @@ parameters:
- classes/models/FrmField.php
- classes/models/FrmForm.php
- classes/models/FrmFormAction.php
- classes/models/FrmMigrate.php
- classes/models/FrmSettings.php
- classes/models/FrmStyle.php
- classes/models/fields/FrmFieldType.php
- square/controllers/FrmSquareLiteSettingsController.php
- stripe/controllers/FrmStrpLiteActionsController.php
- stripe/controllers/FrmTransLiteActionsController.php
- stripe/helpers/FrmStrpLiteConnectHelper.php
- stripe/helpers/FrmTransLiteActionsHelper.php
- stripe/helpers/FrmTransLiteAppHelper.php
- stripe/models/FrmStrpLiteAuth.php
- stripe/models/FrmTransLiteAction.php
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/base/FrmUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public function get_all_fields_for_form_key( $form_key ) {
$this->contact_form_key => $this->contact_form_field_count,
$this->repeat_sec_form_key => 3,
);
$expected_field_num = isset( $field_totals[ $form_key ] ) ? $field_totals[ $form_key ] : 0;
$expected_field_num = $field_totals[ $form_key ] ?? 0;

$form_id = $this->factory->form->get_id_by_key( $form_key );
$fields = FrmField::get_all_for_form( $form_id, '', 'include' );
Expand Down
6 changes: 3 additions & 3 deletions tests/phpunit/emails/test_FrmEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ class test_FrmEmail extends FrmUnitTest {
/**
* @var stdClass
*/
protected $contact_form = null;
protected $contact_form;

/**
* @var stdClass
*/
protected $email_action = null;
protected $email_action;

/**
* @var stdClass
*/
protected $entry = null;
protected $entry;

public static function wpSetUpBeforeClass() {
$_POST = array();
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/entries/test_FrmShowEntryShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ protected function table_header( $atts ) {
$defaults = $this->get_defaults();
$atts = array_merge( $defaults, $atts );
$font_size = $atts['font_size'];
$border_width = isset( $atts['border_width'] ) ? $atts['border_width'] : $atts['field_border_width'];
$border_width = $atts['border_width'] ?? $atts['field_border_width'];
$border_color = $atts['border_color'];

$header .= ' style="border-spacing:0;font-size:' . $font_size . ';line-height:135%;';
Expand Down Expand Up @@ -980,7 +980,7 @@ protected function get_field_value( $entry, $field, $atts ) {
if ( $field->field_key === 'free-html-field' ) {
$field_value = 'Lorem ipsum.';
} else {
$field_value = isset( $entry->metas[ $field->id ] ) ? $entry->metas[ $field->id ] : '';
$field_value = $entry->metas[ $field->id ] ?? '';

if ( is_array( $field_value ) ) {
$field_value = implode( ', ', $field_value );
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/stripe/FrmStrpLiteUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ protected function get_plan_options() {
return array_filter(
array_merge(
$default_options,
isset( $this->plan_options ) ? $this->plan_options : array()
$this->plan_options ?? array()
)
);
}
Expand Down Expand Up @@ -275,7 +275,7 @@ private function get_subscription_charge_options( $customer_id, $plan_id ) {
return array_filter(
array_merge(
$default_options,
isset( $this->subscription_charge_options ) ? $this->subscription_charge_options : array()
$this->subscription_charge_options ?? array()
)
);
}
Expand Down
Loading