PartialAllocationPromise::force()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace ResourcePool;
3
4
/**
5
 * @author Josh Di Fabio <[email protected]>
6
 *
7
 * @api
8
 */
9
class PartialAllocationPromise extends AllocationPromise
10
{
11
    /**
12
     * Returns the allocation now, synchronously
13
     * 
14
     * If the pool does not have sufficient resources available then the number of resources will
15
     * burst beyond the pool size in order to facilitate this allocation
16
     *
17
     * @return Allocation
18
     * @throws \RuntimeException thrown if the allocation has previously failed
19
     */
20
    public function force()
21
    {
22
        return $this->getResult(true);
23
    }
24
}
25