diff --git a/core/lib/Drupal/Component/Utility/SortArray.php b/core/lib/Drupal/Component/Utility/SortArray.php
index 0ed5bbc..38710b9 100644
--- a/core/lib/Drupal/Component/Utility/SortArray.php
+++ b/core/lib/Drupal/Component/Utility/SortArray.php
@@ -50,7 +50,7 @@ public static function sortByWeightElement(array $a, array $b) {
    * @return int
    *   The comparison result for uasort().
    */
-  public static function sortByWeightProperty($a, $b) {
+  public static function sortByWeightProperty(array $a, array $b) {
     return static::sortByKeyInt($a, $b, '#weight');
   }
 
@@ -68,7 +68,7 @@ public static function sortByWeightProperty($a, $b) {
    * @return int
    *   The comparison result for uasort().
    */
-  public static function sortByTitleElement($a, $b) {
+  public static function sortByTitleElement(array $a, array $b) {
     return static::sortByKeyString($a, $b, 'title');
   }
 
@@ -86,7 +86,7 @@ public static function sortByTitleElement($a, $b) {
    * @return int
    *   The comparison result for uasort().
    */
-   public static function sortByTitleProperty($a, $b) {
+   public static function sortByTitleProperty(array $a, array $b) {
      return static::sortByKeyString($a, $b, '#title');
    }
 
@@ -103,9 +103,9 @@ public static function sortByTitleProperty($a, $b) {
    * @return int
    *   The comparison result for uasort().
    */
-  public static function sortByKeyString($a, $b, $key) {
-    $a_title = (is_array($a) && isset($a[$key])) ? $a[$key] : '';
-    $b_title = (is_array($b) && isset($b[$key])) ? $b[$key] : '';
+  public static function sortByKeyString(array $a, array $b, $key) {
+    $a_title = isset($a[$key]) ? $a[$key] : '';
+    $b_title = isset($b[$key]) ? $b[$key] : '';
 
     return strnatcasecmp($a_title, $b_title);
   }
@@ -123,9 +123,9 @@ public static function sortByKeyString($a, $b, $key) {
    * @return int
    *   The comparison result for uasort().
    */
-  public static function sortByKeyInt($a, $b, $key) {
-    $a_weight = (is_array($a) && isset($a[$key])) ? $a[$key] : 0;
-    $b_weight = (is_array($b) && isset($b[$key])) ? $b[$key] : 0;
+  public static function sortByKeyInt(array $a, array $b, $key) {
+    $a_weight = isset($a[$key]) ? $a[$key] : 0;
+    $b_weight = isset($b[$key]) ? $b[$key] : 0;
 
     if ($a_weight == $b_weight) {
       return 0;
