public function setLength($length = null)
    {
        $length = (null === $length) ? $this->datasetCount : $length;
        $this->length = (\abs($length) > $this->datasetCount) ? $this->datasetCount : $length;

        return $this;
    }
public function setLength($length = null)
    {
        $length = (null === $length) ? $this->datasetCount : $length;
        $this->length = (\abs($length) > $this->datasetCount) ? $this->datasetCount : $length;

        return $this;
    }
public function setLength ( $ length = null ) { $ length = ( null === $ length ) ? $ this -> datasetCount : $ length ; $ this -> length = ( \ abs ( $ length ) > $ this -> datasetCount ) ? $ this -> datasetCount : $ length ; return $ this ; }
Set the length.

@param null|int $length
The length

@return $this
Set the length .