Extend dockblocks

This commit is contained in:
Dennis Eichhorn 2017-12-02 18:37:33 +01:00
parent 9a460a2dc7
commit bf49942244
7 changed files with 74 additions and 18 deletions

View File

@ -633,8 +633,8 @@ class DataMapperAbstract implements DataMapperInterface
/**
* Create has many
*
* @param array $obj Object to create
* @param mixed $objId Id to set
* @param array $obj Object to create
* @param mixed $objId Id to set
*
* @return void
*
@ -978,8 +978,6 @@ class DataMapperAbstract implements DataMapperInterface
*
* @return mixed
*
* @throws \Exception
*
* @since 1.0.0
*/
private static function updateRelationTable(array $objsIds, $objId)
@ -1888,6 +1886,13 @@ class DataMapperAbstract implements DataMapperInterface
return $obj;
}
/**
* Creates the current null object
*
* @return mixed
*
* @since 1.0.0
*/
private static function getNullModelObj()
{
$class = static::class;

View File

@ -131,6 +131,17 @@ class Grammar extends GrammarAbstract
return $sql;
}
/**
* Get query components based on query type.
*
* @param int $type Query type
*
* @return array Array of components to build query
*
* @throws \InvalidArgumentException Throws this exception if the query type is undefined
*
* @since 1.0.0
*/
private function getComponents(int $type) : array
{
switch ($type) {

View File

@ -207,6 +207,13 @@ class HttpSession implements SessionInterface
$this->sid = $sid;
}
/**
* Destroy the current session.
*
* @return void
*
* @since 1.0.0
*/
private function destroy() /* : void */
{
session_destroy();

View File

@ -40,8 +40,20 @@ use phpOMS\Uri\Http;
*/
class File extends FileAbstract implements FileInterface
{
/**
* Ftp connection
*
* @var resource
* @since 1.0.0
*/
private $con = null;
/**
* Ftp connection uri.
*
* @var Http
* @since 1.0.0
*/
private $uri = null;
public function __construct(string $path)

View File

@ -169,7 +169,7 @@ class File extends FileAbstract implements FileInterface
throw new PathException($path);
}
return self::createFileTime($path, filemtime($path));
return self::createFileTime(filemtime($path));
}
/**
@ -181,10 +181,19 @@ class File extends FileAbstract implements FileInterface
throw new PathException($path);
}
return self::createFileTime($path, filectime($path));
return self::createFileTime(filectime($path));
}
private static function createFileTime(string $path, int $time)
/**
* Create file time.
*
* @param int $time Time of the file
*
* @return \DateTime
*
* @since 1.0.0
*/
private static function createFileTime(int $time) : \DateTime
{
$fileTime = new \DateTime();
$fileTime->setTimestamp($time);

View File

@ -321,6 +321,15 @@ abstract class C128Abstract
return $image;
}
/**
* Calculate the code length for image dimensions
*
* @param string $codeString Code string to render
*
* @return int Length of the code
*
* @since 1.0.0
*/
private function calculateCodeLength(string $codeString) : int
{
$codeLength = 0;
@ -331,6 +340,15 @@ abstract class C128Abstract
return $codeLength;
}
/**
* Calculate the code dimensions
*
* @param string $codeString Code string to render
*
* @return array
*
* @since 1.0.0
*/
private function calculateDimensions(string $codeString) : array
{
$codeLength = $this->calculateCodeLength($codeString);

View File

@ -87,10 +87,7 @@ class JsonBuilder implements \Serializable, \JsonSerializable
}
/**
* String representation of object
* @link http://php.net/manual/en/serializable.serialize.php
* @return string the string representation of the object or null
* @since 5.1.0
* {@inheritdoc}
*/
public function serialize()
{
@ -98,19 +95,16 @@ class JsonBuilder implements \Serializable, \JsonSerializable
}
/**
* Constructs the object
* @link http://php.net/manual/en/serializable.unserialize.php
* @param string $serialized <p>
* The string representation of the object.
* </p>
* @return void
* @since 5.1.0
* {@inheritdoc}
*/
public function unserialize($serialized)
{
$this->json = json_decode($serialized, true);
}
/**
* {@inheritdoc}
*/
public function jsonSerialize()
{
return $this->getJson();