original_string: public function edit($channelId, $typeId, $type, $allow = null, $deny = null)
      {
          $current = $this->show($channelId, $typeId, $type);
          if (is_null($current)) {
              return $this->create($channelId, $typeId, $type, $allow, $deny);
          }
          if (is_null($allow)) {
              $allow = $current['allow'];
          }
          if (is_null($deny)) {
              $deny = $current['deny'];
          }
          return $this->request('PUT', 'channels/' . $channelId . '/permissions/' . $typeId, [
              'json' => [
                  'type' => $current['type'],
                  'id' => $current['id'],
                  'allow' => $allow,
                  'deny' => $deny
              ]
          ]);
      }
code: public function edit($channelId, $typeId, $type, $allow = null, $deny = null)
      {
          $current = $this->show($channelId, $typeId, $type);
          if (is_null($current)) {
              return $this->create($channelId, $typeId, $type, $allow, $deny);
          }
          if (is_null($allow)) {
              $allow = $current['allow'];
          }
          if (is_null($deny)) {
              $deny = $current['deny'];
          }
          return $this->request('PUT', 'channels/' . $channelId . '/permissions/' . $typeId, [
              'json' => [
                  'type' => $current['type'],
                  'id' => $current['id'],
                  'allow' => $allow,
                  'deny' => $deny
              ]
          ]);
      }
code_tokens: public function edit ( $ channelId , $ typeId , $ type , $ allow = null , $ deny = null ) { $ current = $ this -> show ( $ channelId , $ typeId , $ type ) ; if ( is_null ( $ current ) ) { return $ this -> create ( $ channelId , $ typeId , $ type , $ allow , $ deny ) ; } if ( is_null ( $ allow ) ) { $ allow = $ current [ 'allow' ] ; } if ( is_null ( $ deny ) ) { $ deny = $ current [ 'deny' ] ; } return $ this -> request ( 'PUT' , 'channels/' . $ channelId . '/permissions/' . $ typeId , [ 'json' => [ 'type' => $ current [ 'type' ] , 'id' => $ current [ 'id' ] , 'allow' => $ allow , 'deny' => $ deny ] ] ) ; }
docstring: Edit channel permissions.
  
  @param string $channelId
  @param string $typeId
  @param string $type
  @param null   $allow
  @param null   $deny
  @return array
docstring_tokens: Edit channel permissions .