Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
AnourValar committed Dec 6, 2023
1 parent 87ac392 commit 138e736
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"orchestra/testbench": "^8.6",
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "^3.26",
"squizlabs/php_codesniffer": "^3.7"
"squizlabs/php_codesniffer": "^3.7",
"psalm/plugin-laravel": "^2.8"
},
"autoload": {
"psr-4": {"AnourValar\\LaravelAtom\\": "src/"}
Expand Down
40 changes: 40 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<psalm
errorLevel="7"
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"
findUnusedBaselineEntry="true"
findUnusedCode="true"
findUnusedPsalmSuppress="true"
findUnusedVariablesAndParams="true"
>
<projectFiles>
<directory name="src"/>
<directory name="tests"/>
<ignoreFiles>
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
</plugins>

<issueHandlers>
<UnusedClosureParam errorLevel="suppress" />
<PossiblyUnusedMethod errorLevel="suppress" />
<UnusedClass errorLevel="suppress" />
<PossiblyUnusedParam errorLevel="suppress" />
<PossiblyUnusedProperty errorLevel="suppress" />
<PossiblyUnusedReturnValue errorLevel="suppress" />
<MissingTemplateParam errorLevel="suppress" />
<UnsupportedPropertyReferenceUsage errorLevel="suppress" />
</issueHandlers>

<forbiddenFunctions>
<function name="var_dump" />
<function name="dd" />
<function name="dump" />
</forbiddenFunctions>
</psalm>
5 changes: 2 additions & 3 deletions src/Http/Middleware/Web/Select2.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@ public function handle(Request $request, Closure $next)
}

$response = $next($request);
$this->convertResponse($response, $request);
$this->convertResponse($response);

return $response;
}

/**
* @param \Symfony\Component\HttpFoundation\Response $response
* @param \Illuminate\Http\Request $request
* @return void
*/
private function convertResponse(\Symfony\Component\HttpFoundation\Response &$response, Request $request): void
private function convertResponse(\Symfony\Component\HttpFoundation\Response &$response): void
{
$content = $response->getOriginalContent();

Expand Down

0 comments on commit 138e736

Please sign in to comment.