public function getItemsByTypes(array $types): array
    {
        return array_filter(
            $this->getItems(),
            function (Item $item) use ($types) {
                return in_array(
                    $item->getType(),
                    $types
                );
            }
        );
    }
public function getItemsByTypes(array $types): array
    {
        return array_filter(
            $this->getItems(),
            function (Item $item) use ($types) {
                return in_array(
                    $item->getType(),
                    $types
                );
            }
        );
    }
public function getItemsByTypes ( array $ types ) : array { return array_filter ( $ this -> getItems ( ) , function ( Item $ item ) use ( $ types ) { return in_array ( $ item -> getType ( ) , $ types ) ; } ) ; }
Get Items by a certain types.

@param array $types

@return Item[]
Get Items by a certain types .