Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Feb 18, 2024
1 parent 1f75a07 commit 130557b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/psalm.yml
@@ -1,4 +1,4 @@
name: 'Static Code Analysis'
name: "Static Code Analysis"

on: [push, pull_request]

Expand All @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.2]
php: [8.3]
stability: [prefer-stable] #prefer-lowest,

name: PHPStan - P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
env:
Expand Down
2 changes: 1 addition & 1 deletion packages/extractor/src/TextData.php
Expand Up @@ -18,7 +18,7 @@ public function __construct(
/** @psalm-suppress RedundantPropertyInitializationCheck */
public function getTextAnalysis(): Analysis
{
return (new TextAnalyzer($this->getText(), false, 4))->exec();
return (new TextAnalyzer($this->getText(), false, 1))->exec();
}

private ?string $text = null;
Expand Down
3 changes: 1 addition & 2 deletions packages/text-analyzer/README.md
Expand Up @@ -31,8 +31,7 @@ use \PiedWeb\ExpressionHarvester\MultiAnalyzer;
$test = new MultiAnalyzer($onlyInSentence = true, $expressionMaxWords = 5 );

$result = $test->addContent("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed...");
$result->getExpressions();
$result->getWordNumber(); // @çeturn int
$result->getExpressions();

$results = $test->exec(); // @return \PiedWeb\TextAnalyzer\Analysis
// same methods except in get expression, the value for each expression is not anymore his number
Expand Down
2 changes: 1 addition & 1 deletion packages/text-analyzer/src/Analysis.php
Expand Up @@ -20,7 +20,7 @@ public function getExpressionsByDensity(): array
{
$expressions = $this->expressions;
foreach ($expressions as $k => $v) {
$expressions[$k] = round(($v / $this->getWordNumber()) * 10000) / 100;
$expressions[$k] = round(($v / $this->wordNumber) * 10000) / 100;
}

return $expressions;
Expand Down

0 comments on commit 130557b

Please sign in to comment.