-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/Helpers/SequenceCalculator/DoubleSequenceCalculator.php
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,28 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: mouson | ||
* Date: 2017/1/10 | ||
* Time: 03:44 | ||
*/ | ||
|
||
namespace Mouson\Helpers\SequenceCalculator; | ||
|
||
class DoubleSequenceCalculator implements CalculatorInterface | ||
{ | ||
|
||
/** | ||
* @param $value | ||
* | ||
* @return int|mixed | ||
*/ | ||
public function calculate($value) | ||
{ | ||
return ($value * 2); | ||
} | ||
|
||
public function getSequenceName() | ||
{ | ||
return 'Double'; | ||
} | ||
} |