minor cs fixes

This commit is contained in:
Dennis Eichhorn 2020-02-25 22:15:28 +01:00
parent e89881e589
commit 808dd9dffc
9 changed files with 14 additions and 36 deletions

View File

@ -66,13 +66,6 @@ final class FormValidation implements \Serializable, ArrayableInterface, \JsonSe
return $this->__toString(); return $this->__toString();
} }
/**
* Render message.
*
* @return array<string, mixed>
*
* @since 1.0.0
*/
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@ -170,13 +170,6 @@ final class Notify implements \Serializable, ArrayableInterface, \JsonSerializab
return $this->__toString(); return $this->__toString();
} }
/**
* Render message.
*
* @return array<string, mixed>
*
* @since 1.0.0
*/
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@ -112,13 +112,6 @@ final class Redirect implements \Serializable, ArrayableInterface, \JsonSerializ
return $this->__toString(); return $this->__toString();
} }
/**
* Render message.
*
* @return array<string, mixed>
*
* @since 1.0.0
*/
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@ -117,13 +117,6 @@ final class Reload implements \Serializable, ArrayableInterface, \JsonSerializab
]; ];
} }
/**
* Generate message json.
*
* @return array<string, mixed>
*
* @since 1.0.0
*/
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@ -53,9 +53,9 @@ final class File
return \rtrim(\rtrim(\number_format($bytes / 1000, 1, $decimal, $thousands), '0'), $decimal) . 'kb'; return \rtrim(\rtrim(\number_format($bytes / 1000, 1, $decimal, $thousands), '0'), $decimal) . 'kb';
} elseif ($bytes > 999999 && $bytes < 1000000000) { } elseif ($bytes > 999999 && $bytes < 1000000000) {
return \rtrim(\rtrim(\number_format($bytes / 1000000, 1, $decimal, $thousands), '0'), $decimal) . 'mb'; return \rtrim(\rtrim(\number_format($bytes / 1000000, 1, $decimal, $thousands), '0'), $decimal) . 'mb';
} else {
return \rtrim(\rtrim(\number_format($bytes / 1000000000, 1, $decimal, $thousands), '0'), $decimal) . 'gb';
} }
return \rtrim(\rtrim(\number_format($bytes / 1000000000, 1, $decimal, $thousands), '0'), $decimal) . 'gb';
} }
/** /**
@ -75,8 +75,8 @@ final class File
return \rtrim(\rtrim(\number_format($kilobytes, 1, $decimal, $thousands), '0'), $decimal) . 'kb'; return \rtrim(\rtrim(\number_format($kilobytes, 1, $decimal, $thousands), '0'), $decimal) . 'kb';
} elseif ($kilobytes > 999 && $kilobytes < 1000000) { } elseif ($kilobytes > 999 && $kilobytes < 1000000) {
return \rtrim(\rtrim(\number_format($kilobytes / 1000, 1, $decimal, $thousands), '0'), $decimal) . 'mb'; return \rtrim(\rtrim(\number_format($kilobytes / 1000, 1, $decimal, $thousands), '0'), $decimal) . 'mb';
} else {
return \rtrim(\rtrim(\number_format($kilobytes / 1000000, 1, $decimal, $thousands), '0'), $decimal) . 'gb';
} }
return \rtrim(\rtrim(\number_format($kilobytes / 1000000, 1, $decimal, $thousands), '0'), $decimal) . 'gb';
} }
} }

View File

@ -100,7 +100,7 @@ class Repository
} elseif (\is_file($this->path . '/config')) { // Is this a bare repo? } elseif (\is_file($this->path . '/config')) { // Is this a bare repo?
$parseIni = \parse_ini_file($this->path . '/config'); $parseIni = \parse_ini_file($this->path . '/config');
if ($parseIni['bare']) { if ($parseIni !== false && $parseIni['bare']) {
$this->bare = true; $this->bare = true;
} }
} }

View File

@ -41,7 +41,10 @@ class Tar implements ArchiveInterface
$tar = new \PharData($destination); $tar = new \PharData($destination);
/** @var array $sources */ /**
* @var string $source
* @var string $relative
*/
foreach ($sources as $source => $relative) { foreach ($sources as $source => $relative) {
if (\is_numeric($source) && \realpath($relative) !== false) { if (\is_numeric($source) && \realpath($relative) !== false) {
$source = $relative; $source = $relative;

View File

@ -44,7 +44,10 @@ class Zip implements ArchiveInterface
return false; return false;
} }
/** @var array $sources<string, string> */ /**
* @var string $source
* @var string $relative
*/
foreach ($sources as $source => $relative) { foreach ($sources as $source => $relative) {
if (\is_numeric($source) && \realpath($relative) !== false) { if (\is_numeric($source) && \realpath($relative) !== false) {
$source = $relative; $source = $relative;

View File

@ -24,7 +24,7 @@ namespace phpOMS\Utils\RnG;
*/ */
class Name class Name
{ {
private static $names = [ private static array $names = [
'western' => [ 'western' => [
'female' => [ 'female' => [
'Aaliyah', 'Cece', 'Heidi', 'Lilly', 'Rebekah', 'Aarushi', 'Cecelia', 'Helen', 'Lily', 'Reese', 'Aaliyah', 'Cece', 'Heidi', 'Lilly', 'Rebekah', 'Aarushi', 'Cecelia', 'Helen', 'Lily', 'Reese',