mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 07:28:41 +00:00
Documentation fixes
This commit is contained in:
parent
232244b981
commit
cfe6fb0059
|
|
@ -70,7 +70,7 @@ class FileLogger implements LoggerInterface
|
||||||
*
|
*
|
||||||
* Potential values are null or a valid file pointer
|
* Potential values are null or a valid file pointer
|
||||||
*
|
*
|
||||||
* @var resource
|
* @var resource|false
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $fp = false;
|
private $fp = false;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ namespace phpOMS\Math\Shape\D2;
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class Polygon implements Shape2DInterface
|
class Polygon implements ShapeInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -39,7 +39,7 @@ class Polygon implements Shape2DInterface
|
||||||
* @var array[]
|
* @var array[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $coord = null;
|
private $coord = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Polygon perimeter.
|
* Polygon perimeter.
|
||||||
|
|
@ -47,7 +47,7 @@ class Polygon implements Shape2DInterface
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $perimeter = null;
|
private $perimeter = 0.0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Polygon surface.
|
* Polygon surface.
|
||||||
|
|
@ -55,15 +55,15 @@ class Polygon implements Shape2DInterface
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $surface = null;
|
private $surface = 0.0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interior angle sum of the polygon.
|
* Interior angle sum of the polygon.
|
||||||
*
|
*
|
||||||
* @var float
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $interiorAngleSum = null;
|
private $interiorAngleSum = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exterior angle sum of the polygon.
|
* Exterior angle sum of the polygon.
|
||||||
|
|
@ -71,7 +71,7 @@ class Polygon implements Shape2DInterface
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $exteriorAngleSum = null;
|
private $exteriorAngleSum = 0.0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Polygon barycenter.
|
* Polygon barycenter.
|
||||||
|
|
@ -79,7 +79,7 @@ class Polygon implements Shape2DInterface
|
||||||
* @var float[]
|
* @var float[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $barycenter = null;
|
private $barycenter = ['x' => 0.0, 'y' => 0.0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Polygon edge length.
|
* Polygon edge length.
|
||||||
|
|
@ -87,7 +87,7 @@ class Polygon implements Shape2DInterface
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $edgeLength = [];
|
private $edgeLength = 0.0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Polygon inner length.
|
* Polygon inner length.
|
||||||
|
|
@ -95,15 +95,15 @@ class Polygon implements Shape2DInterface
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $innerLength = null;
|
private $innerLength = 0.0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Polygon inner edge angular.
|
* Polygon inner edge angular.
|
||||||
*
|
*
|
||||||
* @var float
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $innerEdgeAngular = null;
|
private $innerEdgeAngular = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
|
@ -150,7 +150,7 @@ class Polygon implements Shape2DInterface
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getInteriorAngleSum()
|
public function getInteriorAngleSum() : int
|
||||||
{
|
{
|
||||||
$this->interiorAngleSum = (count($this->coord) - 2) * 180;
|
$this->interiorAngleSum = (count($this->coord) - 2) * 180;
|
||||||
|
|
||||||
|
|
@ -184,9 +184,9 @@ class Polygon implements Shape2DInterface
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getSurface()
|
public function getSurface() : float
|
||||||
{
|
{
|
||||||
$this->surface = 0;
|
$this->surface = 0.0;
|
||||||
$count = count($this->coord);
|
$count = count($this->coord);
|
||||||
|
|
||||||
for ($i = 0; $i < $count - 2; $i++) {
|
for ($i = 0; $i < $count - 2; $i++) {
|
||||||
|
|
@ -214,14 +214,14 @@ class Polygon implements Shape2DInterface
|
||||||
*/
|
*/
|
||||||
public function reset()
|
public function reset()
|
||||||
{
|
{
|
||||||
$this->coord = null;
|
$this->coord = [];
|
||||||
$this->barycenter = null;
|
$this->barycenter = ['x' => 0.0, 'y' => 0.0];
|
||||||
$this->perimeter = null;
|
$this->perimeter = 0.0;
|
||||||
$this->surface = null;
|
$this->surface = 0.0;
|
||||||
$this->interiorAngleSum = null;
|
$this->interiorAngleSum = 0;
|
||||||
$this->edgeLength = null;
|
$this->edgeLength = 0.0;
|
||||||
$this->innerLength = null;
|
$this->innerLength = 0.0;
|
||||||
$this->innerEdgeAngular = null;
|
$this->innerEdgeAngular = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -158,14 +158,14 @@ class Response extends ResponseAbstract implements RenderableInterface
|
||||||
/**
|
/**
|
||||||
* Set response.
|
* Set response.
|
||||||
*
|
*
|
||||||
* @param string $response Response to set
|
* @param array $response Response to set
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function setResponse(string $response)
|
public function setResponse(array $response)
|
||||||
{
|
{
|
||||||
$this->response = $response;
|
$this->response = $response;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ abstract class ResponseAbstract implements MessageInterface, ArrayableInterface,
|
||||||
/**
|
/**
|
||||||
* Response status.
|
* Response status.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $status = 200;
|
protected $status = 200;
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ class PriorityQueue implements \Countable, \Serializable
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function unserialize($data) : array
|
public function unserialize(array $data) : array
|
||||||
{
|
{
|
||||||
$this->queue = json_decode($data);
|
$this->queue = json_decode($data);
|
||||||
$this->count = count($this->queue);
|
$this->count = count($this->queue);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ abstract class FileAbstract
|
||||||
private $size = 0;
|
private $size = 0;
|
||||||
private $createdAt = null;
|
private $createdAt = null;
|
||||||
private $changedAt = null;
|
private $changedAt = null;
|
||||||
private $owner = '';
|
private $owner = 0;
|
||||||
private $permission = '0000';
|
private $permission = '0000';
|
||||||
|
|
||||||
public function __construct(string $path)
|
public function __construct(string $path)
|
||||||
|
|
@ -83,7 +83,7 @@ abstract class FileAbstract
|
||||||
return $this->changedAt;
|
return $this->changedAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOwner() : string
|
public function getOwner() : int
|
||||||
{
|
{
|
||||||
return $this->owner;
|
return $this->owner;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class Currency
|
||||||
/**
|
/**
|
||||||
* ECB currency rates.
|
* ECB currency rates.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array|null
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static $ecbCurrencies = null;
|
private static $ecbCurrencies = null;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class View implements RenderableInterface
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $template = null;
|
protected $template = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Views.
|
* Views.
|
||||||
|
|
@ -64,7 +64,7 @@ class View implements RenderableInterface
|
||||||
/**
|
/**
|
||||||
* View Localization.
|
* View Localization.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var Localization
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $l11n = null;
|
protected $l11n = null;
|
||||||
|
|
@ -231,7 +231,7 @@ class View implements RenderableInterface
|
||||||
*
|
*
|
||||||
* @param string $id View ID
|
* @param string $id View ID
|
||||||
* @param View $view
|
* @param View $view
|
||||||
* @param null|int $order Order of view
|
* @param int $order Order of view
|
||||||
* @param bool $overwrite Overwrite existing view
|
* @param bool $overwrite Overwrite existing view
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
|
@ -239,13 +239,13 @@ class View implements RenderableInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function addView(string $id, View $view, $order = null, bool $overwrite = true)
|
public function addView(string $id, View $view, int $order = 0, bool $overwrite = true)
|
||||||
{
|
{
|
||||||
if ($overwrite || !isset($this->views[$id])) {
|
if ($overwrite || !isset($this->views[$id])) {
|
||||||
$this->views[$id] = $view;
|
$this->views[$id] = $view;
|
||||||
|
|
||||||
if ($order !== null) {
|
if ($order !== 0) {
|
||||||
$this->views = uasort($this->views, ['\phpOMS\Views\View', 'viewSort']);
|
uasort($this->views, ['\phpOMS\Views\View', 'viewSort']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user