Skip to content

Commit 6707217

Browse files
committed
Fix failing CI
1 parent 3bdfe0a commit 6707217

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/InflectTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
declare(strict_types=1);
23

34
namespace CrudJsonApi;
45

@@ -13,6 +14,10 @@ trait InflectTrait
1314
*/
1415
protected function inflect(object $configClass, string $input): string
1516
{
17+
if (!method_exists($configClass, 'getConfig')) {
18+
return $input;
19+
}
20+
1621
$inflect = $configClass->getConfig('inflect', 'variable');
1722

1823
if (!$inflect) {

src/View/JsonApiView.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
use Cake\Event\EventManager;
99
use Cake\Http\Response;
1010
use Cake\Http\ServerRequest;
11-
use Cake\ORM\Association;
1211
use Cake\ORM\Entity;
13-
use Cake\Routing\Router;
1412
use Cake\Utility\Inflector;
1513
use Cake\View\View;
1614
use Crud\Error\Exception\CrudException;

0 commit comments

Comments
 (0)