Skip to content

Commit

Permalink
Psalm fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ProklUng committed May 14, 2021
1 parent c8660d0 commit bb12423
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Services/DetailPageProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private function query(): array
);
$arResult['type'] = 'article';
$arResult['timePublished'] = $ob['TIMESTAMP_X'];
$arResult['url'] = $this->getFullUrl((string)$ob['DETAIL_PAGE_URL']) ?? '';
$arResult['url'] = $this->getFullUrl($ob['DETAIL_PAGE_URL']) ?? '';

$idPicture = (int)$ob['PREVIEW_PICTURE'];
if (!$idPicture) {
Expand Down
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
"symfony/cache": "^4 || ^5"
},
"require-dev": {
"proklung/bitrix-phpunit-testing-tools": "^1.0",
"proklung/phpunit-testing-tools": "^1.0",
"symfony/framework-bundle": "^3.4 || ^4.0 || ^5.0"
"proklung/bitrix-phpunit-testing-tools": "^1.0"
},
"extra": {
"installer-paths": {
Expand Down
78 changes: 78 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0"?>
<psalm
errorLevel="3"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
allowStringToStandInForClass="true"
allowCoercionFromStringToClassConst="true"
findUnusedPsalmSuppress="true"
skipChecksOnUnresolvableIncludes="true"
>
<plugins>
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
<pluginClass class="Psalm\MockeryPlugin\Plugin"/>
</plugins>
<projectFiles>
<directory name="/"/>
<ignoreFiles>
<directory name="vendor"/>
<directory name="Tests"/>
<file name="DependencyInjection/Configuration.php"/>
</ignoreFiles>
</projectFiles>
<extraFiles>
<directory name="vendor/sheerockoff/bitrix-ci/files/bitrix/modules/iblock"/>
<directory name="vendor/sheerockoff/bitrix-ci/files/bitrix/modules/main"/>
</extraFiles>
<issueHandlers>
<InvalidCatch>
<errorLevel type="suppress">
<referencedClass name="Psr\SimpleCache\InvalidArgumentException"/>
<referencedClass name="Psr\Cache\InvalidArgumentException"/>
</errorLevel>
</InvalidCatch>
<InvalidThrow>
<errorLevel type="suppress">
<referencedClass name="Psr\SimpleCache\InvalidArgumentException"/>
<referencedClass name="Psr\Cache\InvalidArgumentException"/>
</errorLevel>
</InvalidThrow>
<UnusedVariable>
<errorLevel type="suppress">
<directory name="/"/>
</errorLevel>
</UnusedVariable>
<UndefinedConstant>
<errorLevel type="suppress">
<directory name="/"/>
</errorLevel>
</UndefinedConstant>
<PropertyNotSetInConstructor>
<errorLevel type="suppress">
<directory name="/"/>
</errorLevel>
</PropertyNotSetInConstructor>
<ImplicitToStringCast>
<errorLevel type="suppress">
<directory name="/"/>
</errorLevel>
</ImplicitToStringCast>
<LessSpecificReturnStatement>
<errorLevel type="suppress">
<directory name="/"/>
</errorLevel>
</LessSpecificReturnStatement>
<MoreSpecificReturnType>
<errorLevel type="suppress">
<directory name="/"/>
</errorLevel>
</MoreSpecificReturnType>
<PossiblyInvalidMethodCall>
<errorLevel type="suppress">
<file name="Services/DetailPageProcessor.php"/>
</errorLevel>
</PossiblyInvalidMethodCall>
</issueHandlers>
</psalm>

0 comments on commit bb12423

Please sign in to comment.