@@ -320,7 +320,7 @@ public function __construct( $pdo = null ) {
320320 new WP_SQLite_PDO_User_Defined_Functions ( $ pdo );
321321
322322 // MySQL data comes across stringified by default.
323- $ pdo ->setAttribute ( PDO ::ATTR_STRINGIFY_FETCHES , true );
323+ $ pdo ->setAttribute ( PDO ::ATTR_STRINGIFY_FETCHES , true ); // phpcs:ignore WordPress.DB.RestrictedClasses.mysql__PDO
324324 $ pdo ->query ( WP_SQLite_Translator::CREATE_DATA_TYPES_CACHE_TABLE );
325325
326326 $ this ->pdo = $ pdo ;
@@ -1078,11 +1078,13 @@ private function is_create_table_field_terminator( $token, $definition_depth, $c
10781078
10791079 /**
10801080 * Executes a DELETE statement.
1081+ *
1082+ * @throws Exception If the table could not be found.
10811083 */
10821084 private function execute_delete () {
1083- $ this ->rewriter ->consume (); // DELETE
1085+ $ this ->rewriter ->consume (); // DELETE.
10841086
1085- // Process expressions and extract bound parameters
1087+ // Process expressions and extract bound parameters.
10861088 $ params = array ();
10871089 while ( true ) {
10881090 $ token = $ this ->rewriter ->peek ();
@@ -1105,7 +1107,7 @@ private function execute_delete() {
11051107
11061108 $ updated_query = $ this ->rewriter ->get_updated_query ();
11071109
1108- // Perform DELETE-specific translations
1110+ // Perform DELETE-specific translations.
11091111
11101112 // Naive rewriting of DELETE JOIN query.
11111113 // @TODO: Actually rewrite the query instead of using a hardcoded workaround.
@@ -1235,7 +1237,7 @@ private function execute_delete() {
12351237 * Executes a SELECT statement.
12361238 */
12371239 private function execute_select () {
1238- $ this ->rewriter ->consume (); // SELECT
1240+ $ this ->rewriter ->consume (); // SELECT.
12391241
12401242 $ params = array ();
12411243 $ table_name = null ;
@@ -1340,6 +1342,8 @@ private function execute_truncate() {
13401342
13411343 /**
13421344 * Executes a DESCRIBE statement.
1345+ *
1346+ * @throws PDOException When the table is not found.
13431347 */
13441348 private function execute_describe () {
13451349 $ this ->rewriter ->skip ();
@@ -1392,7 +1396,7 @@ private function execute_describe() {
13921396 * Executes an UPDATE statement.
13931397 */
13941398 private function execute_update () {
1395- $ this ->rewriter ->consume (); // UPDATE
1399+ $ this ->rewriter ->consume (); // Update.
13961400
13971401 $ params = array ();
13981402 while ( true ) {
@@ -1760,6 +1764,7 @@ private function translate_concat_function( $token ) {
17601764 ) {
17611765 return false ;
17621766 }
1767+
17631768 /*
17641769 * Skip the CONCAT function but leave the parentheses.
17651770 * There is another code block below that replaces the
@@ -1827,7 +1832,6 @@ private function translate_date_add_sub( $token ) {
18271832 * Translate VALUES() function.
18281833 *
18291834 * @param WP_SQLite_Token $token The token to translate.
1830- * @param bool $is_in_duplicate_section Whether the VALUES() function is in a duplicate section.
18311835 *
18321836 * @return bool
18331837 */
@@ -2232,7 +2236,6 @@ private function get_sqlite_create_table( $table_name ) {
22322236 * Translate ALTER query.
22332237 *
22342238 * @throws Exception If the subject is not 'table', or we're performing an unknown operation.
2235- *
22362239 */
22372240 private function execute_alter () {
22382241 $ this ->rewriter ->consume ();
@@ -2993,6 +2996,11 @@ private function execute_sqlite_query( $sql, $params = array() ) {
29932996 return $ stmt ;
29942997 }
29952998
2999+ /**
3000+ * Method to set the results from the fetched data.
3001+ *
3002+ * @param array $data The data to set.
3003+ */
29963004 private function set_results_from_fetched_data ( $ data ) {
29973005 if ( null === $ this ->results ) {
29983006 $ this ->results = $ data ;
@@ -3004,6 +3012,11 @@ private function set_results_from_fetched_data( $data ) {
30043012 $ this ->return_value = $ this ->results ;
30053013 }
30063014
3015+ /**
3016+ * Method to set the results from the affected rows.
3017+ *
3018+ * @param int|null $override Override the affected rows.
3019+ */
30073020 private function set_result_from_affected_rows ( $ override = null ) {
30083021 /*
30093022 * SELECT CHANGES() is a workaround for the fact that
0 commit comments