Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Drop php < 7 (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire authored and OskarStark committed Feb 9, 2017
1 parent f4a5022 commit 32742eb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

],
"require": {
"php": "^5.6 || ^7.0",
"php": "^7.0",
"paragonie/random_compat": "^2.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion lib/FixedBitNotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class FixedBitNotation
* @param bool $padFinalGroup Add padding to end of encoded output
* @param string $padCharacter Character to use for padding
*/
public function __construct($bitsPerCharacter, $chars = null, $rightPadFinalBits = false, $padFinalGroup = false, $padCharacter = '=')
public function __construct(int $bitsPerCharacter, string $chars = null, bool $rightPadFinalBits = false, bool $padFinalGroup = false, string $padCharacter = '=')
{
// Ensure validity of $chars
if (!is_string($chars) || ($charLength = strlen($chars)) < 2) {
Expand Down
4 changes: 2 additions & 2 deletions lib/GoogleAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GoogleAuthenticator
* @param int $passCodeLength
* @param int $secretLength
*/
public function __construct($passCodeLength = 6, $secretLength = 10)
public function __construct(int $passCodeLength = 6, int $secretLength = 10)
{
$this->passCodeLength = $passCodeLength;
$this->secretLength = $secretLength;
Expand Down Expand Up @@ -144,7 +144,7 @@ protected static function hashToInt($bytes, $start)
*
* @see http://codereview.stackexchange.com/q/13512/6747
*/
private function codesEqual($known, $given)
private function codesEqual(string $known, string $given): bool
{
if (strlen($given) !== strlen($known)) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion sample/web/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Users
{
public function __construct($file = '../users.dat')
public function __construct(string $file = '../users.dat')
{
$this->userFile = $file;

Expand Down

0 comments on commit 32742eb

Please sign in to comment.