Skip to content

Commit

Permalink
Renamed NoSemanticVersionException to InvalidVersionException
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayne committed Jul 22, 2016
1 parent 5aa7931 commit 266c6bf
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Download and extract the library. Then include `src/autoload.php`.

The library contains the following classes:

* `NoSemanticVersionException`: Thrown by `SemanticVersion` on invalid input
* `InvalidVersionException`: Thrown by `SemanticVersion` on invalid input

* `SemanticComparator`: The semantic versioning comparator for comparing `SemanticVersion` objects

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
/**
* Exception thrown when parsing invalid versions.
*
* @since 1.0.0-rc.1
* @since 1.0.0-rc.3
*/
class NoSemanticVersionException extends RuntimeException
class InvalidVersionException extends RuntimeException
{
}
10 changes: 5 additions & 5 deletions src/SemanticVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SemanticVersion implements SemanticVersionInterface

/**
* @param string $version
* @throws NoSemanticVersionException On incompatible `$version`.
* @throws InvalidVersionException On incompatible `$version`.
*/
public function __construct($version)
{
Expand Down Expand Up @@ -90,7 +90,7 @@ public function __toString()

/**
* @param string $pre
* @throws NoSemanticVersionException
* @throws InvalidVersionException
*/
private function setPre($pre)
{
Expand All @@ -106,7 +106,7 @@ private function setPre($pre)

/**
* @param string $meta
* @throws NoSemanticVersionException
* @throws InvalidVersionException
*/
private function setMeta($meta)
{
Expand All @@ -121,11 +121,11 @@ private function setMeta($meta)
}

/**
* @return NoSemanticVersionException
* @return InvalidVersionException
*/
private function buildException()
{
return new NoSemanticVersionException(sprintf('Invalid semantic version `%s`.', $this->getVersion()));
return new InvalidVersionException(sprintf('Invalid semantic version `%s`.', $this->getVersion()));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @since 1.0.0-rc.1
*/

require_once __DIR__ . '/NoSemanticVersionException.php';
require_once __DIR__ . '/InvalidVersionException.php';
require_once __DIR__ . '/SemanticComparatorInterface.php';
require_once __DIR__ . '/SemanticComparator.php';
require_once __DIR__ . '/SemanticVersionInterface.php';
Expand Down
2 changes: 1 addition & 1 deletion tests/SemanticVersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function testValidVersion($version, $major, $minor, $patch, $pre, $meta,

/**
* @dataProvider provideInvalidVersions
* @expectedException \Rayne\SemanticVersioning\NoSemanticVersionException
* @expectedException \Rayne\SemanticVersioning\InvalidVersionException
* @param mixed $version
*/
public function testInvalidVersion($version)
Expand Down

0 comments on commit 266c6bf

Please sign in to comment.