PluginProbe
Packeta / 2.0.9
Packeta v2.0.9
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
← All changes | src/Packetery/Module/Log/Repository.php +12 -3 2.3.22.0.9 View file →
@@ -193,16 +193,25 @@
193 193 return $this->wpdbAdapter->dbDelta( $createTableQuery, $this->wpdbAdapter->packeteryLog );
194 194 }
195 195
196 196 /**
197 + * Drops log table.
198 + *
199 + * @return void
200 + */
201 + public function drop(): void {
202 + $this->wpdbAdapter->query( 'DROP TABLE IF EXISTS `' . $this->wpdbAdapter->packeteryLog . '`' );
203 + }
204 +
205 + /**
197 206 * Save.
198 207 *
199 208 * @param Record $record Record.
200 209 *
201 - * @return int|false The number of rows updated, or false on error.
210 + * @return void
202 211 * @throws \Exception From DateTimeImmutable.
203 212 */
204 - public function save( Record $record ) {
213 + public function save( Record $record ): void {
205 214 $date = $record->date;
206 215 if ( $date === null ) {
207 216 $date = CoreHelper::now();
208 217 }
@@ -229,9 +238,9 @@
229 238 'params' => $paramsString,
230 239 'date' => $dateString,
231 240 ];
232 241
233 - return $this->wpdbAdapter->insertReplaceHelper( $this->wpdbAdapter->packeteryLog, $data, null, 'REPLACE' );
242 + $this->wpdbAdapter->insertReplaceHelper( $this->wpdbAdapter->packeteryLog, $data, null, 'REPLACE' );
234 243 }
235 244
236 245 /**
237 246 * Gets where clause for find and count queries.