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

@@ -98,7 +98,7 @@ class Event_Manager extends Base_Manager {
*/
public function log_transitions($model, $data, $data_unserialized, $object) {
if ($model === 'event') {
if ('event' === $model) {
return;
}
@@ -143,7 +143,7 @@ class Event_Manager extends Base_Manager {
foreach ($diff as $key => $new_value) {
$old_value = wu_get_isset($original, $key, '');
if ($key === 'id' && intval($old_value) === 0) {
if ('id' === $key && intval($old_value) === 0) {
return;
}
@@ -561,7 +561,7 @@ class Event_Manager extends Base_Manager {
}
if (method_exists($obj, 'get_billing_address') || method_exists($obj, 'get_membership')) {
if ($model_object) {
if (null !== $model_object) {
$payload = method_exists($obj, 'get_billing_address')
? array_merge(
$payload,