]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/blobdiff - lib/Ban.php
Return types :<
[irc/unrealircd/unrealircd-rpc-php.git] / lib / Ban.php
index 4cffb818ecce1803e9282ed581f74e8db8944cfa..1b90e724017c7e81fc1e1b256e0a658460171914 100644 (file)
@@ -17,15 +17,14 @@ class Ban implements Contracts\Ban
 
     /**
      * @param  string  $user
-     * @param  string  $type
      * @param  array  $params
      * @return stdClass
      * @throws Exception
      */
-    public function add(string $user, string $type, array $params): stdClass
+    public function add(string $user, array $params): stdClass
     {
         $response = $this->connection->query('server_ban.add', [
-            'name' => $params['name'],
+            'name' => $user,
             'type' => $params['type'],
             'reason' => $params['reason'],
             'length' => $params['length'] ?? '1d',
@@ -40,15 +39,14 @@ class Ban implements Contracts\Ban
 
     /**
      * @param  string  $user
-     * @param  string  $type
      * @param  array  $params
      * @return stdClass
      * @throws Exception
      */
-    public function delete(string $user, string $type, array $params): stdClass
+    public function delete(string $user, array $params): stdClass
     {
         $response = $this->connection->query('server_ban.del', [
-            'name' => $params['name'],
+            'name' => $user,
             'type' => $params['type'],
         ]);