mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 23:48:40 +00:00
phpcs fixes
This commit is contained in:
parent
fb295292be
commit
710ff5f7d3
|
|
@ -369,7 +369,7 @@ final class Complex
|
||||||
public function div(int|float|self $value) : self
|
public function div(int|float|self $value) : self
|
||||||
{
|
{
|
||||||
if (\is_numeric($value)) {
|
if (\is_numeric($value)) {
|
||||||
return $this->divScalar($value);
|
return $this->divScalar($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->divComplex($value);
|
return $this->divComplex($value);
|
||||||
|
|
|
||||||
|
|
@ -31,21 +31,21 @@ use phpOMS\Views\View;
|
||||||
*/
|
*/
|
||||||
final class SocketResponse extends ResponseAbstract implements RenderableInterface
|
final class SocketResponse extends ResponseAbstract implements RenderableInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set response.
|
* Set response.
|
||||||
*
|
*
|
||||||
* @param array $response Response to set
|
* @param array $response Response to set
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setResponse(array $response) : void
|
public function setResponse(array $response) : void
|
||||||
{
|
{
|
||||||
$this->response = $response;
|
$this->response = $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove response by ID.
|
* Remove response by ID.
|
||||||
*
|
*
|
||||||
* @param mixed $id Response ID
|
* @param mixed $id Response ID
|
||||||
|
|
@ -54,24 +54,24 @@ final class SocketResponse extends ResponseAbstract implements RenderableInterfa
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function remove($id) : bool
|
public function remove($id) : bool
|
||||||
{
|
{
|
||||||
if (isset($this->response[$id])) {
|
if (isset($this->response[$id])) {
|
||||||
unset($this->response[$id]);
|
unset($this->response[$id]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getJsonData() : array
|
public function getJsonData() : array
|
||||||
{
|
{
|
||||||
return \json_decode($this->getRaw(), true);
|
return \json_decode($this->getRaw(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 8.0
|
||||||
|
*
|
||||||
|
* @package phpOMS\Uri
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
@ -402,7 +402,7 @@ final class File extends FileAbstract implements FileInterface
|
||||||
return false; // @codeCoverageIgnore
|
return false; // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
|
|
||||||
\touch($path);
|
\touch($path);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ final class SystemUtils
|
||||||
\exec('wmic cpu get LoadPercentage', $cpuUsage);
|
\exec('wmic cpu get LoadPercentage', $cpuUsage);
|
||||||
$cpuUsage = $cpuUsage[1];
|
$cpuUsage = $cpuUsage[1];
|
||||||
} elseif (\stristr(\PHP_OS, 'LINUX') !== false) {
|
} elseif (\stristr(\PHP_OS, 'LINUX') !== false) {
|
||||||
$loadavg = \sys_getloadavg();
|
$loadavg = \sys_getloadavg();
|
||||||
|
|
||||||
if ($loadavg === false) {
|
if ($loadavg === false) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user