Skip to content

Commit e713973

Browse files
authored
Fixes various linter issues (#575)
- Fixes breaking change mentioned here: https://github.com/cakephp/cakephp-codesniffer/releases/tag/5.3.0 and locks cakephp/cakephp-codesniffer to ~5.3.0 - Ignores phpstan issue in src/Lib/Extension/CakeSearch/Extension.php and also locks phpstan to ~1.12.0
1 parent 6348137 commit e713973

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"phpunit/phpunit": "^10.0",
2828
"friendsofcake/search": "^7.0",
2929
"cakephp/authentication": "^3.0",
30-
"cakephp/cakephp-codesniffer": "^5.0",
31-
"phpstan/phpstan": "^1.8.5",
30+
"cakephp/cakephp-codesniffer": "~5.3.0",
31+
"phpstan/phpstan": "~1.12.0",
3232
"phpmd/phpmd": "^2.10",
3333
"cakephp/bake": "^3.0",
3434
"cakephp/debug_kit": "^5.0",

phpcs.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0"?>
22
<ruleset name="App">
3-
<config name="installed_paths" value="../../cakephp/cakephp-codesniffer" />
43
<rule ref="CakePHP"/>
54
</ruleset>

src/Lib/Extension/CakeSearch/Extension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ private function getSearchManager(Table $table): Manager
162162
));
163163
}
164164

165-
/** @var \Search\Model\Behavior\SearchBehavior $search */
165+
/** @var \Search\Model\Behavior\SearchBehavior&\Cake\ORM\Behavior $search */
166+
/** @phpstan-ignore-next-line */
166167
$search = $table->getBehavior('Search');
167168

168169
return $search->searchManager();

0 commit comments

Comments
 (0)