Skip to content

Commit d871c82

Browse files
committed
Data cursor names unificated
1 parent 66b8161 commit d871c82

15 files changed

+45
-45
lines changed

src/Pointer/Evaluate/LocatorEvaluate.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ abstract class LocatorEvaluate
4646
*
4747
* @var mixed
4848
*/
49-
protected $cursor;
49+
protected $dataCursor;
5050

5151
/**
5252
* Evaluation result.
@@ -203,7 +203,7 @@ public function forbidNonNumericIndices()
203203
*/
204204
public function perform()
205205
{
206-
$this->cursor = &$this->getData();
206+
$this->dataCursor = &$this->getData();
207207
$this->resetResult();
208208
foreach ($this->getLocator()->getReferenceList() as $reference) {
209209
$this->processReference($reference);
@@ -227,10 +227,10 @@ public function perform()
227227
*/
228228
protected function createReferenceEvaluate(Reference $reference)
229229
{
230-
if (is_object($this->cursor)) {
230+
if (is_object($this->dataCursor)) {
231231
return $this->createReferenceEvaluateProperty($reference);
232232
}
233-
if (is_array($this->cursor)) {
233+
if (is_array($this->dataCursor)) {
234234
return $this->createReferenceEvaluateIndex($reference);
235235
}
236236
return $this->createReferenceEvaluateScalar($reference);
@@ -286,7 +286,7 @@ protected function setupReferenceEvaluate(Reference $reference)
286286
{
287287
$this->referenceEvaluate = $this
288288
->createReferenceEvaluate($reference)
289-
->setData($this->cursor);
289+
->setDataCursor($this->dataCursor);
290290
return $this;
291291
}
292292

@@ -330,9 +330,9 @@ protected function processReferenceEvaluate(Reference $reference)
330330
->setupReferenceEvaluate($reference)
331331
->getReferenceEvaluate()
332332
->perform();
333-
$this->cursor = &$this
333+
$this->dataCursor = &$this
334334
->getReferenceEvaluate()
335-
->getData();
335+
->getDataCursor();
336336
$isReferenceResultSet = $this
337337
->getReferenceEvaluate()
338338
->isResultSet();

src/Pointer/Evaluate/LocatorRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class LocatorRead extends LocatorEvaluate
1010

1111
protected function processCursor()
1212
{
13-
return $this->setResult($this->cursor);
13+
return $this->setResult($this->dataCursor);
1414
}
1515

1616

src/Pointer/Evaluate/LocatorWrite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function forbidNumericIndexGaps()
5050

5151
protected function processCursor()
5252
{
53-
$this->cursor = $this->getValue();
53+
$this->dataCursor = $this->getValue();
5454
$result = null;
5555
return $this->setResult($result);
5656
}

src/Pointer/Evaluate/ReferenceEvaluate.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ abstract class ReferenceEvaluate
2020
*
2121
* @var mixed
2222
*/
23-
protected $data;
24-
25-
protected $result;
26-
27-
protected $isResultSet;
23+
protected $dataCursor;
2824

2925
/**
3026
* Flag of having data set.
3127
*
3228
* @var bool
3329
*/
34-
protected $isDataSet = false;
30+
protected $isDataCursorSet = false;
31+
32+
protected $result;
33+
34+
protected $isResultSet;
3535

3636
abstract protected function doesExist();
3737

@@ -86,20 +86,20 @@ protected function getReference()
8686
}
8787

8888

89-
public function setData(&$data)
89+
public function setDataCursor(&$dataCursor)
9090
{
91-
$this->data = &$data;
92-
$this->isDataSet = true;
91+
$this->dataCursor = &$dataCursor;
92+
$this->isDataCursorSet = true;
9393
return $this;
9494
}
9595

9696

97-
public function &getData()
97+
public function &getDataCursor()
9898
{
99-
if (!$this->isDataSet) {
99+
if (!$this->isDataCursorSet) {
100100
throw new LogicException("Data is not set in reference evaluator");
101101
}
102-
return $this->data;
102+
return $this->dataCursor;
103103
}
104104

105105

src/Pointer/Evaluate/ReferenceReadAllowedNonNumericIndex.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class ReferenceReadAllowedNonNumericIndex extends ReferenceEvaluate
88

99
protected function doesExist()
1010
{
11-
return array_key_exists($this->getIndex(), $this->getData());
11+
return array_key_exists($this->getIndex(), $this->getDataCursor());
1212
}
1313

1414

1515
protected function performExisting()
1616
{
17-
$this->data = &$this->data[$this->getIndex()];
17+
$this->dataCursor = &$this->dataCursor[$this->getIndex()];
1818
return $this;
1919
}
2020

src/Pointer/Evaluate/ReferenceReadNumericIndex.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class ReferenceReadNumericIndex extends ReferenceEvaluate
88

99
protected function doesExist()
1010
{
11-
return array_key_exists($this->getIndex(), $this->getData());
11+
return array_key_exists($this->getIndex(), $this->getDataCursor());
1212
}
1313

1414

1515
protected function performExisting()
1616
{
17-
$this->data = &$this->data[$this->getIndex()];
17+
$this->dataCursor = &$this->dataCursor[$this->getIndex()];
1818
return $this;
1919
}
2020

src/Pointer/Evaluate/ReferenceReadProperty.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class ReferenceReadProperty extends ReferenceEvaluate
88

99
protected function doesExist()
1010
{
11-
return property_exists($this->getData(), $this->getProperty());
11+
return property_exists($this->getDataCursor(), $this->getProperty());
1212
}
1313

1414

1515
protected function performExisting()
1616
{
17-
$this->data = &$this->data->{$this->getProperty()};
17+
$this->dataCursor = &$this->dataCursor->{$this->getProperty()};
1818
return $this;
1919
}
2020

src/Pointer/Evaluate/ReferenceTestAllowedNonNumericIndex.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class ReferenceTestAllowedNonNumericIndex extends ReferenceEvaluate
88

99
protected function doesExist()
1010
{
11-
return array_key_exists($this->getIndex(), $this->getData());
11+
return array_key_exists($this->getIndex(), $this->getDataCursor());
1212
}
1313

1414

1515
protected function performExisting()
1616
{
17-
$this->data = &$this->data[$this->getIndex()];
17+
$this->dataCursor = &$this->dataCursor[$this->getIndex()];
1818
return $this;
1919
}
2020

src/Pointer/Evaluate/ReferenceTestNumericIndex.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class ReferenceTestNumericIndex extends ReferenceEvaluate
88

99
protected function doesExist()
1010
{
11-
return array_key_exists($this->getIndex(), $this->getData());
11+
return array_key_exists($this->getIndex(), $this->getDataCursor());
1212
}
1313

1414

1515
protected function performExisting()
1616
{
17-
$this->data = &$this->data[$this->getIndex()];
17+
$this->dataCursor = &$this->dataCursor[$this->getIndex()];
1818
return $this;
1919
}
2020

src/Pointer/Evaluate/ReferenceTestProperty.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class ReferenceTestProperty extends ReferenceEvaluate
88

99
protected function doesExist()
1010
{
11-
return property_exists($this->getData(), $this->getProperty());
11+
return property_exists($this->getDataCursor(), $this->getProperty());
1212
}
1313

1414

1515
protected function performExisting()
1616
{
17-
$this->data = &$this->data->{$this->getProperty()};
17+
$this->dataCursor = &$this->dataCursor->{$this->getProperty()};
1818
return $this;
1919
}
2020

0 commit comments

Comments
 (0)