Everywhere yoda conditions are

This commit is contained in:
David Stone
2025-02-09 00:20:10 -07:00
parent d74f6d1a53
commit be0ab98895
213 changed files with 691 additions and 412 deletions
inc
admin-pages
api
checkout
class-ajax.phpclass-api.phpclass-async-calls.phpclass-dashboard-widgets.phpclass-domain-mapping.phpclass-geolocation.phpclass-logger.phpclass-requirements.phpclass-session-cookie.phpclass-settings.phpclass-sunrise.phpclass-user-switching.php
compat
country
database
debug
deprecated
development
domain-mapping
duplication
functions
gateways
helpers
installers
integrations
limitations
limits
list-tables
managers
models
objects
site-templates
sso
tax
traits
ui
views
admin-pages
checkout
templates
order-bump
order-summary
period-selection
pricing-table
dashboard-statistics
dashboard-widgets
legacy
settings

@@ -271,9 +271,9 @@ class Stripe_Gateway extends Base_Stripe_Gateway {
* Here, we just need to make sure we process
* a membership swap.
*/
if ($type === 'upgrade' || $type === 'addon') {
if ('upgrade' === $type || 'addon' === $type) {
$this->membership->swap($this->order);
} elseif ($type === 'downgrade') {
} elseif ('downgrade' === $type) {
$this->membership->schedule_swap($this->order);
}
@@ -611,7 +611,7 @@ class Stripe_Gateway extends Base_Stripe_Gateway {
$membership->add_to_times_billed(1);
$membership->should_auto_renew();
if ($type !== 'downgrade') {
if ('downgrade' !== $type) {
$membership_status = $cart->has_trial() ? Membership_Status::TRIALING : Membership_Status::ACTIVE;
$renewal_date = new \DateTime();