@@ 26-39 (lines=14) @@ | ||
23 | /** |
|
24 | * {@inheritdoc} |
|
25 | */ |
|
26 | public function setWith($value, $checkType = true) |
|
27 | { |
|
28 | parent::setWith($value, $checkType); |
|
29 | ||
30 | if ($checkType === true) { |
|
31 | if (self::isDataSource($this->value) === false) { |
|
32 | $this->fail($this->getLocale()->_('%s is not an datasource', $this)); |
|
33 | } else { |
|
34 | $this->pass(); |
|
35 | } |
|
36 | } |
|
37 | ||
38 | return $this; |
|
39 | } |
|
40 | ||
41 | /** |
|
42 | * @param $value |
@@ 124-137 (lines=14) @@ | ||
121 | /** |
|
122 | * {@inheritdoc} |
|
123 | */ |
|
124 | public function setWith($value, $checkType = true) |
|
125 | { |
|
126 | parent::setWith($value, $checkType); |
|
127 | ||
128 | if ($checkType === true) { |
|
129 | if ($this->value instanceof CollectionInterface) { |
|
130 | $this->pass(); |
|
131 | } else { |
|
132 | $this->fail($this->getLocale()->_('%s is not a collection', $this)); |
|
133 | } |
|
134 | } |
|
135 | ||
136 | return $this; |
|
137 | } |
|
138 | ||
139 | /** |
|
140 | * @param SpecificationInterface $criteria |