Skip to content

Commit

Permalink
Merge pull request #96 from gnugat/text-decrement
Browse files Browse the repository at this point in the history
Text decrement
  • Loading branch information
Loïc Chardonnet committed Nov 28, 2014
2 parents 982631d + ad6d77a commit 200a31c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions doc/03-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ class Text
// Throws InvalidLineNumberException if $lineNumber is not a positive integer lower than the length
public function setCurrentLineNumber($lineNumber);
public function getCurrentLineNumber();
public function incrementCurrentLineNumber($lines);
public function decrementCurrentLineNumber($lines);
public function incrementCurrentLineNumber($number);
public function decrementCurrentLineNumber($number);

// Throws InvalidLineNumberException if $lineNumber is not a positive integer lower than the length
public function getLine($lineNumber = null);
Expand Down
12 changes: 6 additions & 6 deletions src/Gnugat/Redaktilo/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ public function setLine($line, $lineNumber = null)
*
* @throws InvalidLineNumberException if $number is not an integer
* @throws InvalidLineNumberException if $number is negative
* @throws InvalidLineNumberException if $number is greater or equal than the number of lines
* @throws InvalidLineNumberException if the result would be greater or equal than the number of lines
* @throws InvalidLineNumberException if $number is greater or equal than the length
* @throws InvalidLineNumberException if the result would be greater or equal than the length
*
* @api
*/
Expand All @@ -183,9 +183,9 @@ public function incrementCurrentLineNumber($number)
/**
* @param int $number
*
* @throws InvalidLineNumberException if $lines is not an integer
* @throws InvalidLineNumberException if $lines is negative
* @throws InvalidLineNumberException if $lines is greater or equal than the number of lines
* @throws InvalidLineNumberException if $number is not an integer
* @throws InvalidLineNumberException if $number is negative
* @throws InvalidLineNumberException if $number is greater or equal than the length
* @throws InvalidLineNumberException if the result would be negative
*
* @api
Expand All @@ -203,7 +203,7 @@ public function decrementCurrentLineNumber($number)
*
* @throws InvalidLineNumberException if $lineNumber is not an integer
* @throws InvalidLineNumberException if $lineNumber is negative
* @throws InvalidLineNumberException if $lineNumber is greater or equal than the number of lines
* @throws InvalidLineNumberException if $lineNumber is greater or equal than the length
*/
protected function throwOnInvalidLineNumber($lineNumber)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/spec/Gnugat/Redaktilo/TextSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function it_increments_current_line_number()
$this->getCurrentLineNumber()->shouldBe(2);
}

function it_cannot_increment_current_line_number_with_invalid_lines()
function it_cannot_increment_current_line_number_with_invalid_number()
{
$exception = '\Gnugat\Redaktilo\Exception\InvalidLineNumberException';

Expand All @@ -151,7 +151,7 @@ function it_decrements_current_line_number()
$this->getCurrentLineNumber()->shouldBe(1);
}

function it_cannot_decrement_current_line_number_with_invalid_lines()
function it_cannot_decrement_current_line_number_with_invalid_number()
{
$exception = '\Gnugat\Redaktilo\Exception\InvalidLineNumberException';

Expand Down

0 comments on commit 200a31c

Please sign in to comment.