Skip to content

Commit

Permalink
[TASK] Align the stubs with the code of the TYPO3 11LTS Core
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverklee committed Oct 23, 2022
1 parent 5f72c48 commit 1be4a73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stubs/GeneralUtility.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace TYPO3\CMS\Core\Utility;
class GeneralUtility
{
/**
* @template T
* @template T of object
* @phpstan-param class-string<T> $className
* @phpstan-param array<int, mixed> $constructorArguments
* @phpstan-return T
Expand Down
5 changes: 5 additions & 0 deletions stubs/ObjectStorage.stub
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,35 @@ class ObjectStorage implements \Iterator, \ArrayAccess
* @param TEntity $value
* @param mixed $information
*/
#[\ReturnTypeWillChange]
public function offsetSet($value, $information);

/**
* @param TEntity|int $value
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($value);

/**
* @param TEntity|int $value
*/
#[\ReturnTypeWillChange]
public function offsetUnset($value);

/**
* @param TEntity|int $value
* @return ($value is int ? TEntity|null : mixed)
*/
#[\ReturnTypeWillChange]
public function offsetGet($value);

/**
* This is different from the SplObjectStorage as the key in this implementation is the object hash (string).
* @phpstan-ignore-next-line See https://forge.typo3.org/issues/98146
* @return string|null
*/
#[\ReturnTypeWillChange]
public function key();

/**
Expand Down

0 comments on commit 1be4a73

Please sign in to comment.