PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | src/MigrationLog/Helpers/MigrationHelper.php +5 -5 2.30.04.16.9 View file →
@@ -12,9 +12,9 @@
12 12 * @package Give\MigrationLog\Helpers
13 13 *
14 14 * Helper class used to get migration data
15 15 *
16 - * @since 2.10.0
16 + * @since 2.10.0
17 17 */
18 18 class MigrationHelper
19 19 {
20 20
@@ -35,9 +35,9 @@
35 35
36 36 /**
37 37 * MigrationOrder constructor.
38 38 *
39 - * @param MigrationsRegister $migrationRegister
39 + * @param MigrationsRegister $migrationRegister
40 40 * @param MigrationLogRepository $migrationRepository
41 41 */
42 42 public function __construct(
43 43 MigrationsRegister $migrationRegister,
@@ -60,12 +60,12 @@
60 60
61 61 if (empty($migrations)) {
62 62 /* @var Migration $migrationClass */
63 63 foreach ($this->migrationRegister->getMigrations() as $migrationClass) {
64 - $migrations[$migrationClass::timestamp() . '_' . $migrationClass::id()] = $migrationClass::id();
64 + $migrations[$migrationClass::id()] = $migrationClass::timestamp();
65 65 }
66 66
67 - ksort($migrations);
67 + asort($migrations);
68 68 }
69 69
70 70 return $migrations;
71 71 }
@@ -104,9 +104,9 @@
104 104 * @return int
105 105 */
106 106 public function getRunOrderForMigration($migrationId)
107 107 {
108 - return array_search($migrationId, array_values($this->getMigrationsSorted())) + 1;
108 + return array_search($migrationId, array_keys($this->getMigrationsSorted())) + 1;
109 109 }
110 110
111 111 /**
112 112 * Retrieves the migrations from the database, caching the results for future retrieval