forked from pact-foundation/pact-php
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
216 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace PhpPact\Config\Enum; | ||
|
||
enum WriteMode: string | ||
{ | ||
/** | ||
* The entire file is overwritten | ||
*/ | ||
case OVERWRITE = 'overwrite'; | ||
/** | ||
* Interactions are added | ||
*/ | ||
case MERGE = 'merge'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace PhpPact\Config\Exception; | ||
|
||
use PhpPact\Exception\BaseException; | ||
|
||
class ConfigException extends BaseException | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace PhpPact\Config\Exception; | ||
|
||
class InvalidWriteModeException extends ConfigException | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace PhpPact\Consumer\Matcher\Enum; | ||
|
||
use PhpPact\Consumer\Matcher\Model\Range; | ||
|
||
enum HttpStatus: string | ||
{ | ||
case INFORMATION = 'info'; | ||
case SUCCESS = 'success'; | ||
case REDIRECT = 'redirect'; | ||
case CLIENT_ERROR = 'clientError'; | ||
case SERVER_ERROR = 'serverError'; | ||
case NON_ERROR = 'nonError'; | ||
case ERROR = 'error'; | ||
|
||
public function range(): Range | ||
{ | ||
return match($this) { | ||
self::INFORMATION => new Range(100, 199), | ||
self::SUCCESS => new Range(200, 299), | ||
self::REDIRECT => new Range(300, 399), | ||
self::CLIENT_ERROR => new Range(400, 499), | ||
self::SERVER_ERROR => new Range(500, 599), | ||
self::NON_ERROR => new Range(100, 399), | ||
self::ERROR => new Range(400, 599), | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace PhpPact\Consumer\Matcher\Enum; | ||
|
||
enum UuidFormat: string | ||
{ | ||
case SIMPLE = 'simple'; | ||
case LOWER_CASE_HYPHENATED = 'lower-case-hyphenated'; | ||
case UPPER_CASE_HYPHENATED = 'upper-case-hyphenated'; | ||
case URN = 'URN'; | ||
} |
Oops, something went wrong.