Skip to content

Commit cc0f489

Browse files
committed
Change 'getAll' flash methods to less terse naming
1 parent 480bb94 commit cc0f489

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Diff for: src/Segment.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function getFlash($key, $alt = null)
174174
* @return mixed The flash values themselves.
175175
*
176176
*/
177-
public function getFlashAll($alt = array())
177+
public function getAllCurrentFlash($alt = array())
178178
{
179179
$this->resumeSession();
180180
return isset($_SESSION[Session::FLASH_NOW][$this->name])
@@ -224,7 +224,7 @@ public function getFlashNext($key, $alt = null)
224224
* @return mixed The flash values themselves.
225225
*
226226
*/
227-
public function getFlashNextAll($alt = array())
227+
public function getAllNextFlash($alt = array())
228228
{
229229
$this->resumeSession();
230230
return isset($_SESSION[Session::FLASH_NEXT][$this->name])

Diff for: src/SegmentInterface.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function getFlash($key, $alt = null);
9292
* @return mixed The flash values themselves.
9393
*
9494
*/
95-
public function getFlashAll($alt = array());
95+
public function getAllCurrentFlash($alt = array());
9696

9797
/**
9898
*
@@ -125,7 +125,7 @@ public function getFlashNext($key, $alt = null);
125125
* @return mixed The flash values themselves.
126126
*
127127
*/
128-
public function getFlashNextAll($alt = array());
128+
public function getAllNextFlash($alt = array());
129129

130130
/**
131131
*

Diff for: tests/SegmentTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ public function testFlash()
8686
$expect = 'bar';
8787
$expectAll = ['foo' => 'bar'];
8888
$this->assertSame($expect, $this->segment->getFlashNext('foo'));
89-
$this->assertSame($expectAll, $this->segment->getFlashNextAll());
89+
$this->assertSame($expectAll, $this->segment->getAllNextFlash());
9090
$this->assertNull($this->segment->getFlash('foo'));
91-
$this->assertSame(array(), $this->segment->getFlashAll());
91+
$this->assertSame(array(), $this->segment->getAllCurrentFlash());
9292

9393
// set a value and make it available now
9494
$this->segment->setFlashNow('baz', 'dib');
9595
$expect = 'dib';
9696
$expectAll = ['baz' => 'dib'];
9797
$this->assertSame($expect, $this->segment->getFlash('baz'));
98-
$this->assertSame($expectAll, $this->segment->getFlashAll());
98+
$this->assertSame($expectAll, $this->segment->getAllCurrentFlash());
9999
$this->assertSame($expect, $this->segment->getFlashNext('baz'));
100100

101101
// clear the next values

0 commit comments

Comments
 (0)