@@ -37,6 +37,9 @@ discard block |
||
37 | 37 | /** @var string Set class to use */ |
38 | 38 | private $setClass = 'Totem\\Set'; |
39 | 39 | |
40 | + /** |
|
41 | + * @param string $class |
|
42 | + */ |
|
40 | 43 | public function setSetClass($class) |
41 | 44 | { |
42 | 45 | $reflection = new ReflectionClass($class); |
@@ -96,7 +99,7 @@ discard block |
||
96 | 99 | /** |
97 | 100 | * Returns the keys of the data |
98 | 101 | * |
99 | - * @return array |
|
102 | + * @return integer[] |
|
100 | 103 | * @throws InvalidArgumentException If the frozen data is not an array |
101 | 104 | */ |
102 | 105 | final public function getDataKeys() |
@@ -12,9 +12,7 @@ |
||
12 | 12 | namespace Totem; |
13 | 13 | |
14 | 14 | use stdClass; |
15 | - |
|
16 | 15 | use PHPUnit_Framework_TestCase; |
17 | - |
|
18 | 16 | use Totem\Snapshot\ArraySnapshot; |
19 | 17 | use Totem\Snapshot\ObjectSnapshot; |
20 | 18 | use Totem\Snapshot\CollectionSnapshot; |
@@ -163,7 +163,7 @@ |
||
163 | 163 | /** |
164 | 164 | * Calculate the difference between two snapshots for a given key |
165 | 165 | * |
166 | - * @param mixed $key Key to compare |
|
166 | + * @param integer $key Key to compare |
|
167 | 167 | * |
168 | 168 | * @return AbstractChange|null a change if a change was detected, null otherwise |
169 | 169 | * @internal |
@@ -13,18 +13,14 @@ |
||
13 | 13 | |
14 | 14 | use Countable; |
15 | 15 | use ArrayAccess; |
16 | - |
|
17 | 16 | use ArrayIterator; |
18 | 17 | use IteratorAggregate; |
19 | - |
|
20 | 18 | use RuntimeException; |
21 | 19 | use OutOfBoundsException; |
22 | 20 | use BadMethodCallException; |
23 | - |
|
24 | 21 | use Totem\Change\Removal; |
25 | 22 | use Totem\Change\Addition; |
26 | 23 | use Totem\Change\Modification; |
27 | - |
|
28 | 24 | use Totem\SetInterface; |
29 | 25 | use Totem\AbstractSnapshot; |
30 | 26 | use Totem\Snapshot\CollectionSnapshot; |
@@ -48,6 +48,7 @@ |
||
48 | 48 | * |
49 | 49 | * @param AbstractSnapshot $old Old snapshot |
50 | 50 | * @param AbstractSnapshot $new New snapshot |
51 | + * @return void |
|
51 | 52 | */ |
52 | 53 | public function compute(AbstractSnapshot $old, AbstractSnapshot $new); |
53 | 54 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * on the situation. |
51 | 51 | * |
52 | 52 | * @param mixed $data Either an array or a traversable, data to take a snapshot of |
53 | - * @param mixed $primary Property path compatible value to use to get the primary key of each elements |
|
53 | + * @param string $primary Property path compatible value to use to get the primary key of each elements |
|
54 | 54 | * @param array $options Array of options |
55 | 55 | * |
56 | 56 | * @throws InvalidArgumentException the $data is not an array or a Traversable |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | /** |
129 | 129 | * Returns the original key for the primary key $primary |
130 | 130 | * |
131 | - * @param mixed $primary Primary key to search |
|
131 | + * @param string $primary Primary key to search |
|
132 | 132 | * |
133 | 133 | * @return integer original key |
134 | 134 | * @throws InvalidArgumentException primary key not found |
@@ -12,9 +12,7 @@ |
||
12 | 12 | namespace Totem; |
13 | 13 | |
14 | 14 | use stdClass; |
15 | - |
|
16 | 15 | use PHPUnit_Framework_TestCase; |
17 | - |
|
18 | 16 | use Totem\Snapshot\ArraySnapshot; |
19 | 17 | use Totem\Snapshot\ObjectSnapshot; |
20 | 18 | use Totem\Snapshot\CollectionSnapshot; |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | use ReflectionMethod; |
15 | 15 | use ReflectionProperty; |
16 | - |
|
17 | 16 | use PHPUnit_Framework_TestCase; |
18 | 17 | |
19 | 18 | class AbstractSnapshotTest extends PHPUnit_Framework_TestCase |
@@ -12,9 +12,7 @@ |
||
12 | 12 | namespace Totem; |
13 | 13 | |
14 | 14 | use stdClass; |
15 | - |
|
16 | 15 | use PHPUnit_Framework_TestCase; |
17 | - |
|
18 | 16 | use Totem\Snapshot\ArraySnapshot; |
19 | 17 | use Totem\Snapshot\ObjectSnapshot; |
20 | 18 | use Totem\Snapshot\CollectionSnapshot; |
@@ -12,8 +12,6 @@ |
||
12 | 12 | namespace Totem\Snapshot; |
13 | 13 | |
14 | 14 | use stdClass; |
15 | -use ReflectionMethod; |
|
16 | - |
|
17 | 15 | use PHPUnit_Framework_TestCase; |
18 | 16 | |
19 | 17 | class ObjectSnapshotTest extends PHPUnit_Framework_TestCase |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | use ReflectionMethod; |
15 | 15 | use ReflectionProperty; |
16 | - |
|
17 | 16 | use PHPUnit_Framework_TestCase; |
18 | 17 | |
19 | 18 | class AbstractSnapshotTest extends PHPUnit_Framework_TestCase |