File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
app/code/Magento/MessageQueue/Model
lib/internal/Magento/Framework/MessageQueue/PoisonPill Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,6 @@ public function __construct(
35
35
*/
36
36
public function isLatestVersion (string $ poisonPillVersion ): bool
37
37
{
38
- return ( string ) $ poisonPillVersion === ( string ) $ this ->poisonPillRead ->getLatestVersion ();
38
+ return $ poisonPillVersion === $ this ->poisonPillRead ->getLatestVersion ();
39
39
}
40
40
}
Original file line number Diff line number Diff line change @@ -50,17 +50,17 @@ public function put(): string
50
50
/**
51
51
* @inheritdoc
52
52
*/
53
- public function getLatestVersion (): ? string
53
+ public function getLatestVersion (): string
54
54
{
55
55
return $ this ->getVersionFromDb ();
56
56
}
57
57
58
58
/**
59
59
* Returns version form DB or null.
60
60
*
61
- * @return string|null
61
+ * @return string
62
62
*/
63
- private function getVersionFromDb (): ? string
63
+ private function getVersionFromDb (): string
64
64
{
65
65
$ select = $ this ->getConnection ()->select ()->from (
66
66
$ this ->getTable (self ::QUEUE_POISON_PILL_TABLE ),
@@ -69,6 +69,6 @@ private function getVersionFromDb(): ?string
69
69
70
70
$ result = $ this ->getConnection ()->fetchOne ($ select );
71
71
72
- return $ result === false ? null : $ result ;
72
+ return ( string ) $ result ;
73
73
}
74
74
}
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ class PoisonPillRead implements PoisonPillReadInterface
19
19
*
20
20
* @return string
21
21
*/
22
- public function getLatestVersion (): ? string
22
+ public function getLatestVersion (): string
23
23
{
24
- return null ;
24
+ return '' ;
25
25
}
26
26
}
Original file line number Diff line number Diff line change @@ -17,5 +17,5 @@ interface PoisonPillReadInterface
17
17
*
18
18
* @return string
19
19
*/
20
- public function getLatestVersion (): ? string ;
20
+ public function getLatestVersion (): string ;
21
21
}
You can’t perform that action at this time.
0 commit comments