src/Traits/SquaredCapacity.php
public function allocate(int $capacity)
    {
        $this->capacity = max($this->square($capacity), $this->capacity);
    }
public function allocate(int $capacity)
    {
        $this->capacity = max($this->square($capacity), $this->capacity);
    }
public function allocate ( int $ capacity ) { $ this -> capacity = max ( $ this -> square ( $ capacity ) , $ this -> capacity ) ; }
Ensures that enough memory is allocated for a specified capacity. This
potentially reduces the number of reallocations as the size increases.

@param int $capacity The number of values for which capacity should be
allocated. Capacity will stay the same if this value
is less than or equal to the current capacity.
Ensures that enough memory is allocated for a specified capacity . This potentially reduces the number of reallocations as the size increases .