Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="1.9.12" installed="1.9.12" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.4.0" installed="5.4.0" location="./tools/psalm" copy="false"/>
<phar name="phpstan" version="1.10.14" installed="1.10.14" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.10.0" installed="5.10.0" location="./tools/psalm" copy="false"/>
</phive>
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
autoloader="tests/bootstrap.php"
findUnusedPsalmSuppress="true"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="src" />
Expand Down
1 change: 0 additions & 1 deletion src/Policy/OrmResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function __construct(string $appNamespace = 'App', array $overrides = [])
* @return mixed
* @throws \Authorization\Policy\Exception\MissingPolicyException When a policy for the
* resource has not been defined or cannot be resolved.
* @psalm-suppress MoreSpecificImplementedParamType
*/
public function getPolicy(mixed $resource): mixed
{
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/AuthorizationServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function testApplyScopeMethodMissing()
]);

$article = new Article();
$result = $service->applyScope($user, 'nope', $article);
$service->applyScope($user, 'nope', $article);
}

public function testApplyScopeAdditionalArguments()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Policy/OrmResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ public function testGetPolicyUnknownTable()

$articles = $this->createMock('Cake\Datasource\RepositoryInterface');
$resolver = new OrmResolver('TestApp');
$policy = $resolver->getPolicy($articles);
$resolver->getPolicy($articles);
}
}
3 changes: 2 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
* @link http://cakephp.org CakePHP(tm) Project
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/

use Authorization\AuthorizationPlugin;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Datasource\ConnectionManager;
use Cake\TestSuite\Fixture\SchemaLoader;
use function Cake\Core\env;

$findRoot = function ($root) {
do {
Expand All @@ -33,7 +35,6 @@
unset($findRoot);
chdir($root);

require_once 'vendor/cakephp/cakephp/src/basics.php';
require_once 'vendor/autoload.php';

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