Skip to content

Commit a47a948

Browse files
authored
Merge pull request #237 from cakephp/3.x-stan
3.x: update stan
2 parents be41f59 + e49f0eb commit a47a948

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

.phive/phars.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpstan" version="1.9.12" installed="1.9.12" location="./tools/phpstan" copy="false"/>
4-
<phar name="psalm" version="5.4.0" installed="5.4.0" location="./tools/psalm" copy="false"/>
3+
<phar name="phpstan" version="1.10.14" installed="1.10.14" location="./tools/phpstan" copy="false"/>
4+
<phar name="psalm" version="5.10.0" installed="5.10.0" location="./tools/psalm" copy="false"/>
55
</phive>

psalm.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
66
errorBaseline="psalm-baseline.xml"
77
autoloader="tests/bootstrap.php"
8+
findUnusedPsalmSuppress="true"
9+
findUnusedBaselineEntry="true"
10+
findUnusedCode="false"
811
>
912
<projectFiles>
1013
<directory name="src" />

src/Policy/OrmResolver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public function __construct(string $appNamespace = 'App', array $overrides = [])
6262
* @return mixed
6363
* @throws \Authorization\Policy\Exception\MissingPolicyException When a policy for the
6464
* resource has not been defined or cannot be resolved.
65-
* @psalm-suppress MoreSpecificImplementedParamType
6665
*/
6766
public function getPolicy(mixed $resource): mixed
6867
{

tests/TestCase/AuthorizationServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function testApplyScopeMethodMissing()
173173
]);
174174

175175
$article = new Article();
176-
$result = $service->applyScope($user, 'nope', $article);
176+
$service->applyScope($user, 'nope', $article);
177177
}
178178

179179
public function testApplyScopeAdditionalArguments()

tests/TestCase/Policy/OrmResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,6 @@ public function testGetPolicyUnknownTable()
117117

118118
$articles = $this->createMock('Cake\Datasource\RepositoryInterface');
119119
$resolver = new OrmResolver('TestApp');
120-
$policy = $resolver->getPolicy($articles);
120+
$resolver->getPolicy($articles);
121121
}
122122
}

tests/bootstrap.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
* @link http://cakephp.org CakePHP(tm) Project
1414
* @license http://www.opensource.org/licenses/mit-license.php MIT License
1515
*/
16+
1617
use Authorization\AuthorizationPlugin;
1718
use Cake\Core\Configure;
1819
use Cake\Core\Plugin;
1920
use Cake\Datasource\ConnectionManager;
2021
use Cake\TestSuite\Fixture\SchemaLoader;
22+
use function Cake\Core\env;
2123

2224
$findRoot = function ($root) {
2325
do {
@@ -33,7 +35,6 @@
3335
unset($findRoot);
3436
chdir($root);
3537

36-
require_once 'vendor/cakephp/cakephp/src/basics.php';
3738
require_once 'vendor/autoload.php';
3839

3940
define('ROOT', $root . DS . 'tests' . DS . 'test_app' . DS);

0 commit comments

Comments
 (0)