Skip to content

Commit

Permalink
Remove unnecessary Wye::results() method
Browse files Browse the repository at this point in the history
  • Loading branch information
stratedge committed Jan 28, 2018
1 parent 37f147e commit 2e95b0b
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/Wye.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,23 +329,14 @@ public static function getStatementAtIndex($index = 0)
// RESULTS
//**************************************************************************

public static function results($results = null)
{
if (is_null($results)) {
return static::getResults();
} else {
return static::setResults($results);
}
}

public static function getResults()
{
return static::$results;
}

public static function getResultAt($index = 0)
{
$results = static::results();
$results = static::getResults();

return !empty($results[$index]) ? $results[$index] : null;
}
Expand All @@ -363,11 +354,12 @@ public static function resetResults()
public static function addResult($result)
{
//Add result
$results = static::results();
$results = static::getResults();
$results[] = $result;

//Store results
static::results($results);
static::setResults($results);
static::setResults($results);
}


Expand Down

0 comments on commit 2e95b0b

Please sign in to comment.