This repository has been archived by the owner on Oct 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds valid and invalid checks. Adds static validator methods for extr…
…action
- Loading branch information
Craig Paul
committed
Oct 19, 2016
1 parent
199e6e6
commit 0eb47a9
Showing
2 changed files
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace CraigPaul\Moneris; | ||
|
||
class Validator | ||
{ | ||
/** | ||
* @param array $array | ||
* | ||
* @return bool | ||
*/ | ||
public static function empty(array $array = []) | ||
{ | ||
return empty($array); | ||
} | ||
|
||
/** | ||
* @param array $array | ||
* @param string $key | ||
* | ||
* @return bool | ||
*/ | ||
public static function set(array $array, string $key) | ||
{ | ||
return isset($array[$key]); | ||
} | ||
} |