original_string: public function shift($size = 1, $value = false)
  	{
  		$size = (int) $size;
  
  		if ($size > 0)
  		{
  			$min = min($this->size, $size);
  
  			for ($i = $this->size - 1; $i >= $min; $i--)
  			{
  				$this[$i] = $this[$i - $min];
  			}
  
  			for ($i = 0; $i < $min; $i++)
  			{
  				$this[$i] = $value;
  			}
  		}
  		else
  		{
  			$min = min($this->size, -$size);
  
  			for ($i = 0; $i < $this->size - $min; $i++)
  			{
  				$this[$i] = $this[$i + $min];
  			}
  
  			for ($i = $this->size - $min; $i < $this->size; $i++)
  			{
  				$this[$i] = $value;
  			}
  		}
  
  		return $this;
  	}
code: public function shift($size = 1, $value = false)
  	{
  		$size = (int) $size;
  
  		if ($size > 0)
  		{
  			$min = min($this->size, $size);
  
  			for ($i = $this->size - 1; $i >= $min; $i--)
  			{
  				$this[$i] = $this[$i - $min];
  			}
  
  			for ($i = 0; $i < $min; $i++)
  			{
  				$this[$i] = $value;
  			}
  		}
  		else
  		{
  			$min = min($this->size, -$size);
  
  			for ($i = 0; $i < $this->size - $min; $i++)
  			{
  				$this[$i] = $this[$i + $min];
  			}
  
  			for ($i = $this->size - $min; $i < $this->size; $i++)
  			{
  				$this[$i] = $value;
  			}
  		}
  
  		return $this;
  	}
code_tokens: public function shift ( $ size = 1 , $ value = false ) { $ size = ( int ) $ size ; if ( $ size > 0 ) { $ min = min ( $ this -> size , $ size ) ; for ( $ i = $ this -> size - 1 ; $ i >= $ min ; $ i -- ) { $ this [ $ i ] = $ this [ $ i - $ min ] ; } for ( $ i = 0 ; $ i < $ min ; $ i ++ ) { $ this [ $ i ] = $ value ; } } else { $ min = min ( $ this -> size , - $ size ) ; for ( $ i = 0 ; $ i < $ this -> size - $ min ; $ i ++ ) { $ this [ $ i ] = $ this [ $ i + $ min ] ; } for ( $ i = $ this -> size - $ min ; $ i < $ this -> size ; $ i ++ ) { $ this [ $ i ] = $ value ; } } return $ this ; }
docstring: Shift a bit array.
  
  @param   int       $size   Size to shift.
  Negative value means the shifting is done right to left while
  positive value means the shifting is done left to right.
  @param   boolean   $value  Value to shift
  
  @return  BitArray  $this for chaining
  
  @since   1.2.0
docstring_tokens: Shift a bit array .