src/Collection/Traits/ItemTypeMethods.php
protected function setItemType(?string $itemType = null): void
    {
        if ($itemType !== null) {
            $itemType = trim($itemType);
        }

        $this->itemType = $itemType;
    }
protected function setItemType(?string $itemType = null): void
    {
        if ($itemType !== null) {
            $itemType = trim($itemType);
        }

        $this->itemType = $itemType;
    }
protected function setItemType ( ? string $ itemType = null ) : void { if ( $ itemType !== null ) { $ itemType = trim ( $ itemType ) ; } $ this -> itemType = $ itemType ; }
Sets the item type

If a type is not provided, the item type is dynamic.

The type can be any fully-qualified class or interface name,
or one of the following type strings:
[array, object, bool, int, float, string, callable]

@param string|null $itemType The item type

@return void
Sets the item type