public function can_pin_discussions(stdClass $user) : bool {
        return $this->forum->get_type() !== 'single' &&
                has_capability('mod/forum:pindiscussions', $this->get_context(), $user);
    }
public function can_pin_discussions(stdClass $user) : bool {
        return $this->forum->get_type() !== 'single' &&
                has_capability('mod/forum:pindiscussions', $this->get_context(), $user);
    }
public function can_pin_discussions ( stdClass $ user ) : bool { return $ this -> forum -> get_type ( ) !== 'single' && has_capability ( 'mod/forum:pindiscussions' , $ this -> get_context ( ) , $ user ) ; }
Can the user pin discussions in this forum?

@param stdClass $user The user to check
@return bool
Can the user pin discussions in this forum?