Core 'language' datatype has wrong @var types

Created on 15 February 2022, almost 3 years ago
Updated 16 January 2023, almost 2 years ago
$ drupal-check -a core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php
 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------- 
  Line   Language.php                                                           
 ------ ----------------------------------------------------------------------- 
  32     Property Drupal\Core\TypedData\Plugin\DataType\Language::$language     
         has unknown class Drupal\Core\Language as its type.                    
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols     
  40     Property Drupal\Core\TypedData\Plugin\DataType\Language::$language     
         (Drupal\Core\Language) in isset() is not nullable.                     
  41     Property Drupal\Core\TypedData\Plugin\DataType\Language::$language     
         (Drupal\Core\Language) does not accept                                 
         Drupal\Core\Language\LanguageInterface|null.                           
  43     Method Drupal\Core\TypedData\Plugin\DataType\Language::getValue()      
         should return Drupal\Core\Language\LanguageInterface|null but returns  
         Drupal\Core\Language.                                                  
  62     Property Drupal\Core\TypedData\Plugin\DataType\Language::$language     
         (Drupal\Core\Language) does not accept null.                           
  82     Property Drupal\Core\TypedData\Plugin\DataType\Language::$id (string)  
         in isset() is not nullable.                                            
  85     Property Drupal\Core\TypedData\Plugin\DataType\Language::$language     
         (Drupal\Core\Language) in isset() is not nullable.                     
  86     Call to method getId() on an unknown class Drupal\Core\Language.       
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols     
 ------ ----------------------------------------------------------------------- 

 [ERROR] Found 8 errors   
🐛 Bug report
Status

Needs work

Version

10.1

Component
Typed data 

Last updated 16 days ago

  • Maintained by
  • 🇦🇹Austria @fago
Created by

🇺🇸United States tr Cascadia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024