-
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.
Merge branch 'release/v0.1.1' into main
- Loading branch information
Showing
8 changed files
with
1,554 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
## v0.1.1 (2022-11-28) | ||
* Imported time and number plugins from Dictum | ||
|
||
## v0.1.0 (2022-11-28) | ||
* Built initial locale and timezone management |
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,123 @@ | ||
<?php | ||
|
||
/** | ||
* @package Cosmos | ||
* @license http://opensource.org/licenses/MIT | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DecodeLabs\Cosmos\Extension; | ||
|
||
use DecodeLabs\Cosmos\Locale; | ||
|
||
/** | ||
* @template TReturn | ||
*/ | ||
interface Number | ||
{ | ||
/** | ||
* @phpstan-return ($value is null ? null : TReturn) | ||
*/ | ||
public function format( | ||
int|float|string|null $value, | ||
?string $unit = null, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($value is null ? null : TReturn) | ||
*/ | ||
public function pattern( | ||
int|float|string|null $value, | ||
string $pattern, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($value is null ? null : TReturn) | ||
*/ | ||
public function decimal( | ||
int|float|string|null $value, | ||
?int $precision = null, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($value is null ? null : TReturn) | ||
*/ | ||
public function currency( | ||
int|float|string|null $value, | ||
?string $code, | ||
?bool $rounded = null, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($value is null ? null : TReturn) | ||
*/ | ||
public function percent( | ||
int|float|string|null $value, | ||
float $total = 100.0, | ||
int $decimals = 0, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($value is null ? null : TReturn) | ||
*/ | ||
public function scientific( | ||
int|float|string|null $value, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($value is null ? null : TReturn) | ||
*/ | ||
public function spellout( | ||
int|float|string|null $value, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($value is null ? null : TReturn) | ||
*/ | ||
public function ordinal( | ||
int|float|string|null $value, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($diff is null ? null : TReturn) | ||
*/ | ||
public function diff( | ||
int|float|string|null $diff, | ||
?bool $invert = false, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($bytes is null ? null : TReturn) | ||
*/ | ||
public function fileSize( | ||
?int $bytes, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($bytes is null ? null : TReturn) | ||
*/ | ||
public function fileSizeDec( | ||
?int $bytes, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
|
||
/** | ||
* @phpstan-return ($counter is null ? null : TReturn) | ||
*/ | ||
public function counter( | ||
int|float|string|null $counter, | ||
bool $allowZero = false, | ||
string|Locale|null $locale = null | ||
): mixed; | ||
} |
Oops, something went wrong.