rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -113,7 +113,7 @@ abstract class Abstract_Main {
*
* @throws Forbidden_Property_Mutation_Exception Set is never meant to be called.
*/
public function __set( $name, $value ) { // @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed -- __set must have a name and value.
public function __set( $name, $value ) { // @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed -- __set must have a name and value - PHPCS #3715.
throw Forbidden_Property_Mutation_Exception::cannot_set_because_property_is_immutable( $name );
}
@@ -163,7 +163,7 @@ abstract class Abstract_Main {
try {
return \WPSEO_Utils::is_development_mode();
}
catch ( \Exception $exception ) {
catch ( Exception $exception ) {
// E.g. when WordPress and/or WordPress SEO are not loaded.
return \defined( 'YOAST_ENVIRONMENT' ) && \YOAST_ENVIRONMENT === 'development';
}

View File

@@ -542,7 +542,7 @@ class Adapter {
}
return $result;
} catch ( \Exception $e ) {
} catch ( Exception $e ) {
return null;
}
}

View File

@@ -224,7 +224,6 @@ class Table {
* @return string The SQL.
*/
private function columns_to_str() {
$str = '';
$fields = [];
$len = \count( $this->columns );
for ( $i = 0; $i < $len; $i++ ) {

View File

@@ -402,7 +402,7 @@ class Model implements JsonSerializable {
$associated_table_name = static::get_table_name_for_class( static::$auto_prefix_models . $associated_class_name );
$foreign_key_name = static::build_foreign_key_name( $foreign_key_name, $associated_table_name );
$associated_object_id = $this->{$foreign_key_name};
$desired_record = null;
if ( $foreign_key_name_in_associated_models_table === null ) {
/*
* Comparison: "{$associated_table_name}.primary_key = {$associated_object_id}".