Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4 from herpaderpaldent/analysis-z95Q2N
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
herpaderpaldent authored Dec 30, 2018
2 parents fbf87f1 + 23d634e commit aaf4885
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/Http/Controllers/BaseNotificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
* Created by PhpStorm.
* User: felix
* Date: 30.12.2018
* Time: 15:31
* Time: 15:31.
*/

namespace Herpaderpaldent\Seat\SeatNotifications\Http\Controllers;


use Seat\Web\Http\Controllers\Controller;

abstract class BaseNotificationController extends Controller
{
abstract public function getNotification() : string;

abstract public function getPrivateView() : string;
abstract public function getChannelView() : string;

}
abstract public function getChannelView() : string;
}
1 change: 0 additions & 1 deletion src/Http/Controllers/Discord/DiscordServerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,5 +277,4 @@ public function getSocket($gateway)
{
return new WebSocketClient($gateway);
}

}
11 changes: 6 additions & 5 deletions src/Http/Controllers/Notifications/RefreshTokenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function isSubscribed(Group $group, $via, $channel = false)
return false;
}

public function isDisabledButton($channel ,$view) : bool
public function isDisabledButton($channel, $view) : bool
{
// return false if slack has not been setup
if($channel === 'slack') {
Expand All @@ -140,15 +140,16 @@ public function isDisabledButton($channel ,$view) : bool
if($view === 'private') {

if(auth()->user()->has('seatnotifications.refresh_token', false)) {
if( $channel === 'discord')
if( (new DiscordUser)->isUser( auth()->user()->group) )
if($channel === 'discord')
if((new DiscordUser)->isUser(auth()->user()->group))
return false;

if( $channel === 'slack')
if( (new SlackUser())->isSlackUser( auth()->user()->group) )
if($channel === 'slack')
if((new SlackUser())->isSlackUser(auth()->user()->group))
return false;
}
}

return true;
}
}
3 changes: 0 additions & 3 deletions src/Http/Controllers/SeatNotificationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

namespace Herpaderpaldent\Seat\SeatNotifications\Http\Controllers;

use Herpaderpaldent\Seat\SeatNotifications\Http\Controllers\Discord\DiscordNotificationChannelController;
use Herpaderpaldent\Seat\SeatNotifications\Http\Controllers\Discord\DiscordServerController;
use Herpaderpaldent\Seat\SeatNotifications\Http\Controllers\Slack\SlackNotificationChannelController;
use Illuminate\Support\Collection;
use Seat\Web\Http\Controllers\Controller;
use Yajra\DataTables\DataTables;
Expand Down

0 comments on commit aaf4885

Please sign in to comment.