Skip to content

Commit

Permalink
attempt phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
tregismoreira committed Jul 22, 2024
1 parent 90fab75 commit e7b41ce
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ rules:
parameters:
level: 8
paths:
- src
- modules/custom
- modules/social_features
- src
- modules/custom
- modules/social_features
excludePaths:
analyseAndScan:
- */social_demo/*
Expand All @@ -24,58 +24,58 @@ parameters:
# yet, disable for now.
checkGenericClassInNonGenericObjectType: false
drupal:
drupal_root: %currentWorkingDirectory%/html/core
entityMapping:
activity:
class: Drupal\activity_creator\Entity\Activity
storage: Drupal\Core\Entity\ContentEntityStorageBase
comment:
class: Drupal\social_comment\Entity\Comment
storage: Drupal\comment\CommentStorage
event_enrollment:
class: Drupal\social_event\Entity\EventEnrollment
storage: Drupal\Core\Entity\ContentEntityStorageBase
font:
class: Drupal\social_font\Entity\Font
storage: Drupal\Core\Entity\ContentEntityStorageBase
group:
class: Drupal\social_group\Entity\Group
storage: Drupal\group\Entity\Storage\GroupStorage
group_content:
class: Drupal\group\Entity\GroupRelationship
storage: Drupal\group\Entity\Storage\GroupRelationshipStorage
mentions:
class: Drupal\mentions\Entity\Mentions
storage: Drupal\Core\Entity\ContentEntityStorageBase
mentions_type:
class: Drupal\mentions\Entity\MentionsType
storage: Drupal\Core\Config\Entity\ConfigEntityStorage
post:
class: Drupal\social_post\Entity\Post
storage: Drupal\Core\Entity\ContentEntityStorageBase
post_type:
class: Drupal\social_post\Entity\PostType
storage: Drupal\Core\Config\Entity\ConfigEntityStorage
queue_storage_entity:
class: Drupal\social_queue_storage\Entity
storage: Drupal\Core\Entity\ContentEntityStorageBase
drupal_root: %currentWorkingDirectory%/html/core
entityMapping:
activity:
class: Drupal\activity_creator\Entity\Activity
storage: Drupal\Core\Entity\ContentEntityStorageBase
comment:
class: Drupal\social_comment\Entity\Comment
storage: Drupal\comment\CommentStorage
event_enrollment:
class: Drupal\social_event\Entity\EventEnrollment
storage: Drupal\Core\Entity\ContentEntityStorageBase
font:
class: Drupal\social_font\Entity\Font
storage: Drupal\Core\Entity\ContentEntityStorageBase
group:
class: Drupal\social_group\Entity\Group
storage: Drupal\group\Entity\Storage\GroupStorage
group_content:
class: Drupal\group\Entity\GroupRelationship
storage: Drupal\group\Entity\Storage\GroupRelationshipStorage
mentions:
class: Drupal\mentions\Entity\Mentions
storage: Drupal\Core\Entity\ContentEntityStorageBase
mentions_type:
class: Drupal\mentions\Entity\MentionsType
storage: Drupal\Core\Config\Entity\ConfigEntityStorage
post:
class: Drupal\social_post\Entity\Post
storage: Drupal\Core\Entity\ContentEntityStorageBase
post_type:
class: Drupal\social_post\Entity\PostType
storage: Drupal\Core\Config\Entity\ConfigEntityStorage
queue_storage_entity:
class: Drupal\social_queue_storage\Entity
storage: Drupal\Core\Entity\ContentEntityStorageBase

# When writing Drupal code we have arrays all over the place and even all
# entities are considered iterable type. Thus it's more sensible to disable
# this check than work with an ever expanding baseline.
# See https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
checkMissingIterableValueType: false
ignoreErrors:
# See - https://github.com/mglaman/drupal-check/pull/187
- '#Unsafe usage of new static\(\)#'
# See - https://github.com/mglaman/drupal-check/pull/187
- '#Unsafe usage of new static\(\)#'

# Stub files provide type information for classes and functions that are
# otherwise difficult to analyze, improving the accuracy of PHPStan's checks.
stubFiles:
- src/PHPStan/Stubs/social_eda/Address.stub
- src/PHPStan/Stubs/social_eda/DateTime.stub
- src/PHPStan/Stubs/social_eda/Entity.stub
- src/PHPStan/Stubs/social_eda/Href.stub
- src/PHPStan/Stubs/social_eda/User.stub
- src/PHPStan/Stubs/social_eda_dispatcher/Dispatcher.stub
- src/PHPStan/Stubs/social_eda_dispatcher/CloudEvent.stub
- src/PHPStan/Stubs/social_eda/Address.stub
- src/PHPStan/Stubs/social_eda/DateTime.stub
- src/PHPStan/Stubs/social_eda/Entity.stub
- src/PHPStan/Stubs/social_eda/Href.stub
- src/PHPStan/Stubs/social_eda/User.stub
- src/PHPStan/Stubs/social_eda_dispatcher/Dispatcher.stub
- src/PHPStan/Stubs/social_eda_dispatcher/CloudEvent.stub

0 comments on commit e7b41ce

Please sign in to comment.