Skip to content

Commit

Permalink
Change 'getAll' flash methods to less terse naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jakejohns committed Apr 11, 2016
1 parent 480bb94 commit cc0f489
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Segment.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function getFlash($key, $alt = null)
* @return mixed The flash values themselves.
*
*/
public function getFlashAll($alt = array())
public function getAllCurrentFlash($alt = array())
{
$this->resumeSession();
return isset($_SESSION[Session::FLASH_NOW][$this->name])
Expand Down Expand Up @@ -224,7 +224,7 @@ public function getFlashNext($key, $alt = null)
* @return mixed The flash values themselves.
*
*/
public function getFlashNextAll($alt = array())
public function getAllNextFlash($alt = array())
{
$this->resumeSession();
return isset($_SESSION[Session::FLASH_NEXT][$this->name])
Expand Down
4 changes: 2 additions & 2 deletions src/SegmentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function getFlash($key, $alt = null);
* @return mixed The flash values themselves.
*
*/
public function getFlashAll($alt = array());
public function getAllCurrentFlash($alt = array());

/**
*
Expand Down Expand Up @@ -125,7 +125,7 @@ public function getFlashNext($key, $alt = null);
* @return mixed The flash values themselves.
*
*/
public function getFlashNextAll($alt = array());
public function getAllNextFlash($alt = array());

/**
*
Expand Down
6 changes: 3 additions & 3 deletions tests/SegmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ public function testFlash()
$expect = 'bar';
$expectAll = ['foo' => 'bar'];
$this->assertSame($expect, $this->segment->getFlashNext('foo'));
$this->assertSame($expectAll, $this->segment->getFlashNextAll());
$this->assertSame($expectAll, $this->segment->getAllNextFlash());
$this->assertNull($this->segment->getFlash('foo'));
$this->assertSame(array(), $this->segment->getFlashAll());
$this->assertSame(array(), $this->segment->getAllCurrentFlash());

// set a value and make it available now
$this->segment->setFlashNow('baz', 'dib');
$expect = 'dib';
$expectAll = ['baz' => 'dib'];
$this->assertSame($expect, $this->segment->getFlash('baz'));
$this->assertSame($expectAll, $this->segment->getFlashAll());
$this->assertSame($expectAll, $this->segment->getAllCurrentFlash());
$this->assertSame($expect, $this->segment->getFlashNext('baz'));

// clear the next values
Expand Down

0 comments on commit cc0f489

Please sign in to comment.