mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
fix static analysis
This commit is contained in:
parent
859a04c791
commit
3d68874c2c
|
|
@ -26,6 +26,8 @@ use phpOMS\DataStorage\Database\Query\Where;
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @template T
|
||||||
*/
|
*/
|
||||||
class DataMapperFactory
|
class DataMapperFactory
|
||||||
{
|
{
|
||||||
|
|
@ -117,7 +119,7 @@ class DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Model to use by the mapper.
|
* Model to use by the mapper.
|
||||||
*
|
*
|
||||||
* @var class-string
|
* @var class-string<T>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODEL = '';
|
public const MODEL = '';
|
||||||
|
|
@ -195,13 +197,16 @@ class DataMapperFactory
|
||||||
*
|
*
|
||||||
* @param ConnectionAbstract $db Database connection
|
* @param ConnectionAbstract $db Database connection
|
||||||
*
|
*
|
||||||
* @return ReadMapper
|
* @return ReadMapper<T>
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function get(ConnectionAbstract $db = null) : ReadMapper
|
public static function get(ConnectionAbstract $db = null) : ReadMapper
|
||||||
{
|
{
|
||||||
return (new ReadMapper(new static(), $db ?? self::$db))->get();
|
/** @var ReadMapper<T> $reader */
|
||||||
|
$reader = new ReadMapper(new static(), $db ?? self::$db);
|
||||||
|
|
||||||
|
return $reader->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -215,7 +220,10 @@ class DataMapperFactory
|
||||||
*/
|
*/
|
||||||
public static function getRaw(ConnectionAbstract $db = null) : ReadMapper
|
public static function getRaw(ConnectionAbstract $db = null) : ReadMapper
|
||||||
{
|
{
|
||||||
return (new ReadMapper(new static(), $db ?? self::$db))->getRaw();
|
/** @var ReadMapper<T> $reader */
|
||||||
|
$reader = new ReadMapper(new static(), $db ?? self::$db);
|
||||||
|
|
||||||
|
return $reader->getRaw();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -271,7 +279,10 @@ class DataMapperFactory
|
||||||
*/
|
*/
|
||||||
public static function getAll(ConnectionAbstract $db = null) : ReadMapper
|
public static function getAll(ConnectionAbstract $db = null) : ReadMapper
|
||||||
{
|
{
|
||||||
return (new ReadMapper(new static(), $db ?? self::$db))->getAll();
|
/** @var ReadMapper<T> $reader */
|
||||||
|
$reader = new ReadMapper(new static(), $db ?? self::$db);
|
||||||
|
|
||||||
|
return $reader->getAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ use phpOMS\Utils\ArrayUtils;
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @template R
|
||||||
*/
|
*/
|
||||||
final class ReadMapper extends DataMapperAbstract
|
final class ReadMapper extends DataMapperAbstract
|
||||||
{
|
{
|
||||||
|
|
@ -132,7 +134,7 @@ final class ReadMapper extends DataMapperAbstract
|
||||||
*
|
*
|
||||||
* @param mixed ...$options Options to pass to read mapper
|
* @param mixed ...$options Options to pass to read mapper
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return R
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -164,7 +166,7 @@ final class ReadMapper extends DataMapperAbstract
|
||||||
* Careful, this doesn't merge with the internal query.
|
* Careful, this doesn't merge with the internal query.
|
||||||
* If you want to merge it use ->query() instead
|
* If you want to merge it use ->query() instead
|
||||||
*
|
*
|
||||||
* @return object|array
|
* @return R
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @template T of City
|
||||||
|
* @extends DataMapperFactory<T>
|
||||||
*/
|
*/
|
||||||
class CityMapper extends DataMapperFactory
|
class CityMapper extends DataMapperFactory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @template T of Country
|
||||||
|
* @extends DataMapperFactory<T>
|
||||||
*/
|
*/
|
||||||
class CountryMapper extends DataMapperFactory
|
class CountryMapper extends DataMapperFactory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @template T of Currency
|
||||||
|
* @extends DataMapperFactory<T>
|
||||||
*/
|
*/
|
||||||
final class CurrencyMapper extends DataMapperFactory
|
final class CurrencyMapper extends DataMapperFactory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @template T of Iban
|
||||||
|
* @extends DataMapperFactory<T>
|
||||||
*/
|
*/
|
||||||
class IbanMapper extends DataMapperFactory
|
class IbanMapper extends DataMapperFactory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @template T of Language
|
||||||
|
* @extends DataMapperFactory<T>
|
||||||
*/
|
*/
|
||||||
class LanguageMapper extends DataMapperFactory
|
class LanguageMapper extends DataMapperFactory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @template T of Conditional
|
||||||
|
* @extends DataMapperFactory<T>
|
||||||
*/
|
*/
|
||||||
final class ConditionalMapper extends DataMapperFactory
|
final class ConditionalMapper extends DataMapperFactory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user