Composer Workspace global packages

This commit is contained in:
Clemens Schwaighofer
2023-08-02 14:52:33 +09:00
parent c383a7b7b7
commit 1fc144e178
239 changed files with 5659 additions and 2712 deletions

View File

@@ -21,8 +21,11 @@ use Symfony\Component\String\UnicodeString;
*/
abstract class Helper implements HelperInterface
{
protected $helperSet = null;
protected $helperSet;
/**
* @return void
*/
public function setHelperSet(HelperSet $helperSet = null)
{
if (1 > \func_num_args()) {
@@ -88,6 +91,9 @@ abstract class Helper implements HelperInterface
return mb_substr($string, $from, $length, $encoding);
}
/**
* @return string
*/
public static function formatTime(int|float $secs)
{
static $timeFormats = [
@@ -117,6 +123,9 @@ abstract class Helper implements HelperInterface
}
}
/**
* @return string
*/
public static function formatMemory(int $memory)
{
if ($memory >= 1024 * 1024 * 1024) {
@@ -134,6 +143,9 @@ abstract class Helper implements HelperInterface
return sprintf('%d B', $memory);
}
/**
* @return string
*/
public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string)
{
$isDecorated = $formatter->isDecorated();