Skip to content

Commit

Permalink
[MethodDocBlockGenerator] remove // LINK to only leave path in method…
Browse files Browse the repository at this point in the history
… description
  • Loading branch information
RobinDev committed Nov 9, 2023
1 parent bd72722 commit e035f18
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .phpunit.cache/test-results
@@ -1 +1 @@
{"version":1,"defects":{"GoogleSerpTest::testPuphpeteerMobile":8,"GoogleSerpTest::testCurlMobile":8,"GoogleSerpTest::testExtractionPositionZero":8,"GoogleSerpTest::testExtractMaps":8,"GlobalTest::testTextDataExtractor":7,"GoogleSerpTest::testExtractMapsB":8,"GoogleTrendsTest::testTrendsPuppet":7,"GoogleSuggesterTest::testGoogleSuggester":8,"GoogleTrendsTest::testTrendsCurl":8,"PiedWeb\\MethodDocBlockGenerator\\Test\\MethodDocBlockGeneratorTest::testIt":7,"GoogleSerpTest::testRelatedSearches":8},"times":{"PiedWeb\\Crawler\\Test\\CrawlerTest::testIt":1.643,"PiedWeb\\Crawler\\Test\\CrawlerTest::testCommand":0.421,"PiedWeb\\Crawler\\Test\\CrawlerTest::testWitchCachId":0.839,"PiedWeb\\Curl\\Test\\HelperTest::testSchemeFromProxy":0.001,"PiedWeb\\Curl\\Test\\HelperTest::testCheckContentType":0,"PiedWeb\\Curl\\Test\\HelperTest::testCheckStatusCode":0,"PiedWeb\\Curl\\Test\\RequestTest::testDownloadIfHtml":0.267,"PiedWeb\\Curl\\Test\\RequestTest::testNotDownload":0.212,"PiedWeb\\Curl\\Test\\RequestTest::testEffectiveUrl":20.474,"PiedWeb\\Curl\\Test\\RequestTest::testCurlError":0.043,"PiedWeb\\Curl\\Test\\RequestTest::test404":0.201,"PiedWeb\\Curl\\Test\\RequestTest::testAllMethods":1.24,"PiedWeb\\Curl\\Test\\RequestTest::testMultipleCheckInHeaders":0.119,"PiedWeb\\Curl\\Test\\RequestTest::testProxy":1.002,"PiedWeb\\Curl\\Test\\RequestTest::testAbortIfTooBig":0.247,"PiedWeb\\Curl\\Test\\RequestTest::testDownloadOnlyFirstBytes":0.206,"PiedWeb\\Curl\\Test\\RequestTest::testResponseFromCache":0.001,"PiedWeb\\Curl\\Test\\StaticWrapperTest::testStaticGet":0.061,"GlobalTest::testEncoding":0.004,"GlobalTest::testCanonical":0.623,"GlobalTest::testTextDataExtractor":0.388,"GlobalTest::testHrefLangExtractor":0.337,"GoogleSerpTest::testPuphpeteerMobile":0.001,"GoogleSerpTest::testCurlMobile":0.154,"GoogleSerpTest::testExtractionPositionZero":0.176,"GoogleSerpTest::testExtractMaps":0.138,"GoogleSuggesterTest::testGoogleSuggester":1.514,"GoogleTrendsTest::testTrendsCurl":2.699,"GoogleTrendsTest::testTrendsPuppet":34.14,"PiedWeb\\TextAnalyzer\\Test\\AnalyzerTest::testMultiAnalyzer":0.02,"PiedWeb\\TextAnalyzer\\Test\\AnalyzerTest::testTextAnalyzer":0.004,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testSimpleSentences":0.001,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testRemoveExtremityStopWords":0.001,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testRemoveExtremityStopWords2":0,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testRemoveStopWords":0,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testStripTags":0.001,"GoogleSerpTest::testRelatedSearches":0.129,"GoogleSerpTest::testExtractMapsB":0.704,"PiedWeb\\MethodDocBlockGenerator\\Test\\MethodDocBlockGeneratorTest::testIt":0.001,"PiedWeb\\Crawler\\Test\\CrawlerTest::testCrawlerUrl":10.308}}
{"version":1,"defects":{"GoogleSerpTest::testPuphpeteerMobile":8,"GoogleSerpTest::testCurlMobile":8,"GoogleSerpTest::testExtractionPositionZero":8,"GoogleSerpTest::testExtractMaps":8,"GlobalTest::testTextDataExtractor":7,"GoogleSerpTest::testExtractMapsB":8,"GoogleTrendsTest::testTrendsPuppet":7,"GoogleSuggesterTest::testGoogleSuggester":8,"GoogleTrendsTest::testTrendsCurl":8,"PiedWeb\\MethodDocBlockGenerator\\Test\\MethodDocBlockGeneratorTest::testIt":7,"GoogleSerpTest::testRelatedSearches":8},"times":{"PiedWeb\\Crawler\\Test\\CrawlerTest::testIt":1.643,"PiedWeb\\Crawler\\Test\\CrawlerTest::testCommand":0.421,"PiedWeb\\Crawler\\Test\\CrawlerTest::testWitchCachId":0.839,"PiedWeb\\Curl\\Test\\HelperTest::testSchemeFromProxy":0.001,"PiedWeb\\Curl\\Test\\HelperTest::testCheckContentType":0,"PiedWeb\\Curl\\Test\\HelperTest::testCheckStatusCode":0,"PiedWeb\\Curl\\Test\\RequestTest::testDownloadIfHtml":0.267,"PiedWeb\\Curl\\Test\\RequestTest::testNotDownload":0.212,"PiedWeb\\Curl\\Test\\RequestTest::testEffectiveUrl":20.474,"PiedWeb\\Curl\\Test\\RequestTest::testCurlError":0.043,"PiedWeb\\Curl\\Test\\RequestTest::test404":0.201,"PiedWeb\\Curl\\Test\\RequestTest::testAllMethods":1.24,"PiedWeb\\Curl\\Test\\RequestTest::testMultipleCheckInHeaders":0.119,"PiedWeb\\Curl\\Test\\RequestTest::testProxy":1.002,"PiedWeb\\Curl\\Test\\RequestTest::testAbortIfTooBig":0.247,"PiedWeb\\Curl\\Test\\RequestTest::testDownloadOnlyFirstBytes":0.206,"PiedWeb\\Curl\\Test\\RequestTest::testResponseFromCache":0.001,"PiedWeb\\Curl\\Test\\StaticWrapperTest::testStaticGet":0.061,"GlobalTest::testEncoding":0.004,"GlobalTest::testCanonical":0.623,"GlobalTest::testTextDataExtractor":0.388,"GlobalTest::testHrefLangExtractor":0.337,"GoogleSerpTest::testPuphpeteerMobile":0.001,"GoogleSerpTest::testCurlMobile":0.154,"GoogleSerpTest::testExtractionPositionZero":0.176,"GoogleSerpTest::testExtractMaps":0.138,"GoogleSuggesterTest::testGoogleSuggester":1.514,"GoogleTrendsTest::testTrendsCurl":2.699,"GoogleTrendsTest::testTrendsPuppet":34.14,"PiedWeb\\TextAnalyzer\\Test\\AnalyzerTest::testMultiAnalyzer":0.02,"PiedWeb\\TextAnalyzer\\Test\\AnalyzerTest::testTextAnalyzer":0.004,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testSimpleSentences":0.001,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testRemoveExtremityStopWords":0.001,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testRemoveExtremityStopWords2":0,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testRemoveStopWords":0,"PiedWeb\\ExpressionHarvester\\Test\\CleanTextTest::testStripTags":0.001,"GoogleSerpTest::testRelatedSearches":0.129,"GoogleSerpTest::testExtractMapsB":0.704,"PiedWeb\\MethodDocBlockGenerator\\Test\\MethodDocBlockGeneratorTest::testIt":0.003,"PiedWeb\\Crawler\\Test\\CrawlerTest::testCrawlerUrl":10.308}}
2 changes: 1 addition & 1 deletion packages/curl/src/Helper.php
Expand Up @@ -41,7 +41,7 @@ public static function httpParseHeaders(string $raw_headers): array
if (! isset($headers[$h[0]])) {
$headers[$h[0]] = trim($h[1]);
} elseif (\is_array($headers[$h[0]])) {
$headers[$h[0]] = array_merge($headers[$h[0]], [trim($h[1])]);
$headers[$h[0]] = [...$headers[$h[0]], trim($h[1])];

Check failure on line 44 in packages/curl/src/Helper.php

View workflow job for this annotation

GitHub Actions / psalm

InvalidOperand

packages/curl/src/Helper.php:44:43: InvalidOperand: Cannot use spread operator on non-iterable type list{0: string, 1?: mixed|string, ...<mixed>}|string (see https://psalm.dev/058)
} else {
$headers[$h[0]] = [...[$headers[$h[0]]], ...[trim($h[1])]];
}
Expand Down
Expand Up @@ -36,7 +36,10 @@ public function run(string $extensionClassName): string

$phpDoc .= ' * @method '.('' === $returnType ? '' : $returnType.' ').$method->getName().'('.implode(', ', $paramStrings).')';
if ($this->addLink) {
$phpDoc .= ' // LINK '.$reflectionClass->getFileName().':'.$method->getStartLine();
$phpDoc .= "\n".' * '
.ltrim(str_replace(preg_replace('#/vendor/.+$#', '', __DIR__), '', $reflectionClass->getFileName()), '/')
.':'.$method->getStartLine()
."\n".' * ';
}
$phpDoc .= "\n";
}
Expand Down
2 changes: 1 addition & 1 deletion packages/text-analyzer/src/Analyzer.php
Expand Up @@ -47,7 +47,7 @@ private function getSentences(): array

$sentences = [];
foreach (explode(\chr(10), $this->text) as $paragraph) {
$sentences = array_merge($sentences, CleanText::getSentences($paragraph));
$sentences = [...$sentences, ...CleanText::getSentences($paragraph)];
}

return $sentences;
Expand Down

0 comments on commit e035f18

Please sign in to comment.