We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bdfe0a commit 6707217Copy full SHA for 6707217
src/InflectTrait.php
@@ -1,4 +1,5 @@
1
<?php
2
+declare(strict_types=1);
3
4
namespace CrudJsonApi;
5
@@ -13,6 +14,10 @@ trait InflectTrait
13
14
*/
15
protected function inflect(object $configClass, string $input): string
16
{
17
+ if (!method_exists($configClass, 'getConfig')) {
18
+ return $input;
19
+ }
20
+
21
$inflect = $configClass->getConfig('inflect', 'variable');
22
23
if (!$inflect) {
src/View/JsonApiView.php
@@ -8,9 +8,7 @@
8
use Cake\Event\EventManager;
9
use Cake\Http\Response;
10
use Cake\Http\ServerRequest;
11
-use Cake\ORM\Association;
12
use Cake\ORM\Entity;
-use Cake\Routing\Router;
use Cake\Utility\Inflector;
use Cake\View\View;
use Crud\Error\Exception\CrudException;
0 commit comments