diff --git a/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php b/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php index fa05053b0..2341a820d 100644 --- a/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php +++ b/Math/Statistic/Forecast/Regression/MultipleLinearRegression.php @@ -30,23 +30,19 @@ class MultipleLinearRegression return $XT->mult($X)->inverse()->mult($XT)->mult($Y)->getMatrix(); } - public static function getVariance() : float { } - public static function getPredictionInterval() : array { } - public static function getSlope(float $b1, float $y, float $x) : float { return 0.0; } - public static function getElasticity(float $b1, float $y, float $x): float { return 0.0; diff --git a/Module/ModuleAbstract.php b/Module/ModuleAbstract.php index 8dd150379..5aa940154 100644 --- a/Module/ModuleAbstract.php +++ b/Module/ModuleAbstract.php @@ -264,6 +264,32 @@ abstract class ModuleAbstract ]); } + /** + * Create a model + * + * @param int $account Account id + * @param array $objs Response object + * @param string $mapper Object mapper + * @param string $trigger Trigger for the event manager + * + * @return void + * + * @since 1.0.0 + */ + protected function createModels(int $account, array $objs, string $mapper, string $trigger) : void + { + foreach ($objs as $obj) { + $this->app->eventManager->trigger('PRE:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', $obj); + $mapper::create($obj); + $this->app->eventManager->trigger('POST:Module:' . static::MODULE_NAME . '-' . $trigger . '-create', '', [ + $account, + null, $obj, + 0, 0, + static::MODULE_NAME, + ]); + } + } + /** * Update a model * diff --git a/Stdlib/Graph/Edge.php b/Stdlib/Graph/Edge.php index 3f6233f57..1e2a5dccb 100644 --- a/Stdlib/Graph/Edge.php +++ b/Stdlib/Graph/Edge.php @@ -127,7 +127,6 @@ class Edge return $this->weight; } - /** * Is directed edge * diff --git a/Utils/Parser/Markdown/Markdown.php b/Utils/Parser/Markdown/Markdown.php index db83c4a55..4c043f2ad 100644 --- a/Utils/Parser/Markdown/Markdown.php +++ b/Utils/Parser/Markdown/Markdown.php @@ -99,7 +99,6 @@ class Markdown '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', ]; - /** * Regex for em. * diff --git a/tests/Socket/CommandManagerTest.php b/tests/Socket/CommandManagerTest.php index 9c3a24e55..dbae5968f 100644 --- a/tests/Socket/CommandManagerTest.php +++ b/tests/Socket/CommandManagerTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Socket; require_once __DIR__ . '/../Autoloader.php'; - /** * @internal */ diff --git a/tests/Socket/SocketTypeTest.php b/tests/Socket/SocketTypeTest.php index a306639da..0b7a82661 100644 --- a/tests/Socket/SocketTypeTest.php +++ b/tests/Socket/SocketTypeTest.php @@ -16,7 +16,6 @@ namespace phpOMS\tests\Socket; require_once __DIR__ . '/../Autoloader.php'; - /** * @internal */