Verified Commit 4a28b967 authored by quietone's avatar quietone
Browse files

Issue #3490570 by nexusnovaz, mstrelan, nicxvan: Add array return to all...

Issue #3490570 by nexusnovaz, mstrelan, nicxvan: Add array return to all hook_views_data and hook_field_views_data implementations

(cherry picked from commit 30c7115a)
parent f5cdfde1
Loading
Loading
Loading
Loading
Loading
+0 −84
Original line number Diff line number Diff line
@@ -15874,12 +15874,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationViewsExecutionHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\content_moderation\\\\Hook\\\\ContentModerationViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/content_moderation/src/Hook/ContentModerationViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: return.missing
	'message' => '#^Method Drupal\\\\content_moderation\\\\ModerationInformation\\:\\:getAffectedRevisionTranslation\\(\\) should return Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface but return statement is missing\\.$#',
@@ -17158,12 +17152,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/datetime/src/Hook/DatetimeHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\datetime\\\\Hook\\\\DatetimeViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/datetime/src/Hook/DatetimeViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\datetime\\\\Plugin\\\\Field\\\\FieldFormatter\\\\DateTimeFormatterBase\\:\\:setTimeZone\\(\\) has no return type specified\\.$#',
@@ -17302,12 +17290,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/datetime_range/src/Hook/DatetimeRangeHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\datetime_range\\\\Hook\\\\DatetimeRangeViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/datetime_range/src/Hook/DatetimeRangeViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: return.missing
	'message' => '#^Method Drupal\\\\datetime_range\\\\Plugin\\\\Field\\\\FieldType\\\\DateRangeFieldItemList\\:\\:defaultValuesForm\\(\\) should return array but return statement is missing\\.$#',
@@ -17404,12 +17386,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/dblog/src/Hook/DblogHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\dblog\\\\Hook\\\\DblogViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/dblog/src/Hook/DblogViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\dblog\\\\Plugin\\\\views\\\\field\\\\DblogMessage\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#',
@@ -19642,12 +19618,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/file/src/Hook/FileHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\file\\\\Hook\\\\FileViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/file/src/Hook/FileViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: empty.variable
	'message' => '#^Variable \\$rows in empty\\(\\) always exists and is not falsy\\.$#',
@@ -21040,12 +21010,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/history/src/Hook/HistoryHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\history\\\\Hook\\\\HistoryViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/history/src/Hook/HistoryViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:buildOptionsForm\\(\\) has no return type specified\\.$#',
@@ -21370,12 +21334,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/image/src/Hook/ImageHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\image\\\\Hook\\\\ImageViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/image/src/Hook/ImageViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\image\\\\ImageEffectBase\\:\\:setConfiguration\\(\\) has no return type specified\\.$#',
@@ -27100,12 +27058,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\media_library\\\\Hook\\\\MediaLibraryViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/media_library/src/Hook/MediaLibraryViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\media_library\\\\MediaLibraryServiceProvider\\:\\:register\\(\\) has no return type specified\\.$#',
@@ -31638,12 +31590,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/options/src/Hook/OptionsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\options\\\\Hook\\\\OptionsViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/options/src/Hook/OptionsViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: return.missing
	'message' => '#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListFloatItem\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#',
@@ -45531,18 +45477,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/views/src/Hook/ViewsViewsExecutionHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsViewsHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/views/src/Hook/ViewsViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views\\\\Hook\\\\ViewsViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/views/src/Hook/ViewsViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views\\\\ManyToOneHelper\\:\\:addFilter\\(\\) has no return type specified\\.$#',
@@ -51651,12 +51585,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:fieldViewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsExecutionHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsExecutionHooks\\:\\:viewsFormSubstitutions\\(\\) has no return type specified\\.$#',
@@ -51723,12 +51651,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views_test_data\\\\Hook\\\\ViewsTestDataViewsHooks\\:\\:viewsInvalidateCache\\(\\) has no return type specified\\.$#',
@@ -53817,12 +53739,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/views_ui/src/ViewUI.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views_ui_test_field\\\\Hook\\\\ViewsUiTestFieldViewsHooks\\:\\:viewsData\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/views_ui/tests/modules/views_ui_test_field/src/Hook/ViewsUiTestFieldViewsHooks.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\Tests\\\\views_ui\\\\Functional\\\\CustomBooleanTest\\:\\:dataSet\\(\\) has no return type specified\\.$#',
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ class ContentModerationViewsHooks {
   * Implements hook_views_data().
   */
  #[Hook('views_data')]
  public function viewsData() {
  public function viewsData(): array {
    return _content_moderation_views_data_object()->getViewsData();
  }

+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ class DatetimeViewsHooks {
   * Implements hook_field_views_data().
   */
  #[Hook('field_views_data')]
  public function fieldViewsData(FieldStorageConfigInterface $field_storage) {
  public function fieldViewsData(FieldStorageConfigInterface $field_storage): array {
    return datetime_type_field_views_data_helper($field_storage, [], $field_storage->getMainPropertyName());
  }

+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ class DatetimeRangeViewsHooks {
   * Implements hook_field_views_data().
   */
  #[Hook('field_views_data')]
  public function fieldViewsData(FieldStorageConfigInterface $field_storage) {
  public function fieldViewsData(FieldStorageConfigInterface $field_storage): array {
    // Include datetime.views.inc file in order for helper function
    // datetime_type_field_views_data_helper() to be available.
    \Drupal::moduleHandler()->loadInclude('datetime', 'inc', 'datetime.views');
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ class DblogViewsHooks {
   * Implements hook_views_data().
   */
  #[Hook('views_data')]
  public function viewsData() {
  public function viewsData(): array {
    $data = [];
    $data['watchdog']['table']['group'] = t('Watchdog');
    $data['watchdog']['table']['wizard_id'] = 'watchdog';
Loading