php-ml/src/Helper/Trainable.php
Tomáš Votruba 46fa2c2cca Update to EasyCodingStandard 4 (#273)
* update ECS config to v4

* composer: require Symplify 4

* apply coding-standard: use constants over functions, protected setUp() in tests, array indentation

* ecs: add false positive case

* composer: update lock

* bump to ECS 4.4

* update composer.lock

* shorten ECS config name

* ecs: ignore assignments in while()

* fix cs
2018-06-15 07:57:45 +02:00

25 lines
406 B
PHP

<?php
declare(strict_types=1);
namespace Phpml\Helper;
trait Trainable
{
/**
* @var array
*/
private $samples = [];
/**
* @var array
*/
private $targets = [];
public function train(array $samples, array $targets): void
{
$this->samples = array_merge($this->samples, $samples);
$this->targets = array_merge($this->targets, $targets);
}
}