Skip to content

Overriding PHPDoc types (or at least force them to be absolute) #4367

Answered by ondrejmirtes
avdv asked this question in Support
Discussion options

You must be logged in to vote

Hello, have you checked out the Stub files feature? It's built exactly for this purpose - overriding wrong 3rd party PHPDocs :) https://phpstan.org/user-guide/stub-files

In this case this is a sufficient stub file that should be registered:

<?php

namespace FacebookAds\Object\ServerSide;

class Event implements ArrayAccess {
  ...

  /**
   * Sets CustomData object that includes additional business data about the event.
   * @param \FacebookAds\Object\ServerSide\CustomData $custom_data
   * @return $this
   */
  public function setCustomData($custom_data) {
  }
...
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@avdv
Comment options

Answer selected by avdv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants