Code Duplication    Length = 16-16 lines in 2 locations

src/ClientLocal.php 2 locations

@@ 433-448 (lines=16) @@
430
        return $this->createMessage($data);
431
    }
432
433
    public function createPrivileges(array $data)
434
    {
435
        $connection = $this->container->get('connection');
436
        $acl = $this->container->get('acl');
437
        $privileges = new DirectusPrivilegesTableGateway($connection, $acl);
438
439
        $response = [
440
            'meta' => [
441
                'type' => 'item',
442
                'table' => 'directus_privileges'
443
            ],
444
            'data' => $privileges->insertPrivilege($data)
445
        ];
446
447
        return $this->createResponseFromData($response);
448
    }
449
450
    public function createTable($name, array $data = [])
451
    {
@@ 533-548 (lines=16) @@
530
        return $this->createResponseFromData($response);
531
    }
532
533
    public function getPreferences($table, $user)
534
    {
535
        $acl = $this->container->get('acl');
536
        $connection = $this->container->get('connection');
537
        $preferencesTableGateway = new DirectusPreferencesTableGateway($connection, $acl);
538
539
        $response = [
540
            'meta' => [
541
                'type' => 'item',
542
                'table' => 'directus_preferences'
543
            ],
544
            'data' => $preferencesTableGateway->fetchByUserAndTableAndTitle($user, $table)
545
        ];
546
547
        return $this->createResponseFromData($response);
548
    }
549
550
    /**
551
     * @inheritdoc