src/Money.php
public function allocateTo($n)
    {
        if (!is_int($n)) {
            throw new \InvalidArgumentException('Number of targets must be an integer');
        }

        if ($n <= 0) {
            throw new \InvalidArgumentException('Cannot allocate to none, target must be greater than zero');
        }

        return $this->allocate(array_fill(0, $n, 1));
    }
public function allocateTo($n)
    {
        if (!is_int($n)) {
            throw new \InvalidArgumentException('Number of targets must be an integer');
        }

        if ($n <= 0) {
            throw new \InvalidArgumentException('Cannot allocate to none, target must be greater than zero');
        }

        return $this->allocate(array_fill(0, $n, 1));
    }
public function allocateTo ( $ n ) { if ( ! is_int ( $ n ) ) { throw new \ InvalidArgumentException ( 'Number of targets must be an integer' ) ; } if ( $ n <= 0 ) { throw new \ InvalidArgumentException ( 'Cannot allocate to none, target must be greater than zero' ) ; } return $ this -> allocate ( array_fill ( 0 , $ n , 1 ) ) ; }
Allocate the money among N targets.

@param int $n

@return Money[]

@throws \InvalidArgumentException If number of targets is not an integer
Allocate the money among N targets .