diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00b4bd9c8..57d9b0623 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,6 +60,13 @@ jobs: ports: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 + mssql: + image: mcr.microsoft.com/mssql/server:2019-latest + env: + SA_PASSWORD: c0MplicatedP@ssword + ACCEPT_EULA: 'Y' + ports: + - 1433:1433 redis: image: redis ports: diff --git a/Ai/Ocr/BasicOcr.php b/Ai/Ocr/BasicOcr.php index 934104e48..68baaa8b2 100644 --- a/Ai/Ocr/BasicOcr.php +++ b/Ai/Ocr/BasicOcr.php @@ -248,7 +248,7 @@ final class BasicOcr * * @since 1.0.0 */ - public function match(string $path, int $comparison = 3, int $limit = 0) : array + public function matchImage(string $path, int $comparison = 3, int $limit = 0) : array { // @todo: implement image reading if it isn't an mnist file $Xtest = $this->readImages($path, $limit); diff --git a/Dispatcher/Dispatcher.php b/Dispatcher/Dispatcher.php index 92dc52a88..72d66fa5d 100644 --- a/Dispatcher/Dispatcher.php +++ b/Dispatcher/Dispatcher.php @@ -129,7 +129,7 @@ final class Dispatcher implements DispatcherInterface $views[$controller] = $data === null ? $function() : $function(...$data); } elseif ($c === 2) { - $obj = $this->getController($dispatch[0]); + $obj = $this->getController($dispatch[0]); $views[$controller] = $data === null ? $obj->{$dispatch[1]}() : $obj->{$dispatch[1]}(...$data); diff --git a/Math/Stochastic/NaiveBayesClassifier.php b/Math/Stochastic/NaiveBayesClassifier.php index de456e290..3098b6206 100644 --- a/Math/Stochastic/NaiveBayesClassifier.php +++ b/Math/Stochastic/NaiveBayesClassifier.php @@ -123,7 +123,7 @@ final class NaiveBayesClassifier * * @since 1.0.0 */ - public function match(string $criteria, array $toMatch, int $minimum = 3) : float + public function matchCriteria(string $criteria, array $toMatch, int $minimum = 3) : float { $this->preCalculateProbabilities($toMatch); diff --git a/tests/Ai/Ocr/BasicOcrTest.php b/tests/Ai/Ocr/BasicOcrTest.php index fdb4717dc..653423cf0 100644 --- a/tests/Ai/Ocr/BasicOcrTest.php +++ b/tests/Ai/Ocr/BasicOcrTest.php @@ -38,7 +38,7 @@ final class BasicOcrTest extends \PHPUnit\Framework\TestCase ['label' => 0, 'prob' => 1], ['label' => 0, 'prob' => 1], ['label' => 0, 'prob' => 1], ['label' => 4, 'prob' => 2 / 3], ['label' => 9, 'prob' => 1 / 3], ['label' => 4, 'prob' => 2 / 3], ], - $ocr->match(__DIR__ . '/t10k-images-idx3-ubyte', 3, 5) + $ocr->matchImage(__DIR__ . '/t10k-images-idx3-ubyte', 3, 5) ); } diff --git a/tests/Math/Stochastic/NaiveBayesClassifierTest.php b/tests/Math/Stochastic/NaiveBayesClassifierTest.php index ad07b719c..2ecf5440e 100644 --- a/tests/Math/Stochastic/NaiveBayesClassifierTest.php +++ b/tests/Math/Stochastic/NaiveBayesClassifierTest.php @@ -69,7 +69,7 @@ final class NaiveBayesClassifierTest extends \PHPUnit\Framework\TestCase self::assertEqualsWithDelta( 0.6, - $filter->match('play', ['weather' => ['Sunny']], 1), + $filter->matchCriteria('play', ['weather' => ['Sunny']], 1), 0.01 ); } @@ -86,7 +86,7 @@ final class NaiveBayesClassifierTest extends \PHPUnit\Framework\TestCase self::assertEqualsWithDelta( 0.999988, - $filter->match('female', ['height' => 6, 'weight' => 130, 'foot' => 8]), + $filter->matchCriteria('female', ['height' => 6, 'weight' => 130, 'foot' => 8]), 0.01 ); }