PartialAllocationPromise   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A force() 0 4 1
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