protected function getQuantity(array $insertedPKs)
    {
        if (is_int($this->quantity)) {
            return $this->quantity;
        }

        if ($this->quantity === 'random') {
            return mt_rand(0, count($insertedPKs[$this->relatedClass]));
        }

        return count($insertedPKs[$this->relatedClass]);
    }
protected function getQuantity(array $insertedPKs)
    {
        if (is_int($this->quantity)) {
            return $this->quantity;
        }

        if ($this->quantity === 'random') {
            return mt_rand(0, count($insertedPKs[$this->relatedClass]));
        }

        return count($insertedPKs[$this->relatedClass]);
    }
protected function getQuantity ( array $ insertedPKs ) { if ( is_int ( $ this -> quantity ) ) { return $ this -> quantity ; } if ( $ this -> quantity === 'random' ) { return mt_rand ( 0 , count ( $ insertedPKs [ $ this -> relatedClass ] ) ) ; } return count ( $ insertedPKs [ $ this -> relatedClass ] ) ; }
Get the number of models to attach.

@param  array[] $insertedPKs
@return int
Get the number of models to attach .