@@ -130,7 +130,7 @@ |
||
130 | 130 | * @param string $platform |
131 | 131 | * @param string $setting |
132 | 132 | * |
133 | - * @return BaseAdapter |
|
133 | + * @return \Sly\NotificationPusher\Adapter\AdapterInterface |
|
134 | 134 | */ |
135 | 135 | public function getAdapter($platform, $setting) |
136 | 136 | { |
@@ -58,10 +58,10 @@ |
||
58 | 58 | $count = 0; |
59 | 59 | |
60 | 60 | # Check to see if the user has permission for each app |
61 | - foreach($appRecords as $appRecord) |
|
61 | + foreach ($appRecords as $appRecord) |
|
62 | 62 | { |
63 | 63 | $permission = $user->can($appRecord->name); |
64 | - if($permission != 1) |
|
64 | + if ($permission != 1) |
|
65 | 65 | { |
66 | 66 | // Remove the app that the user does not have permissions for. |
67 | 67 | unset($appRecords[$count]); |
@@ -103,7 +103,7 @@ |
||
103 | 103 | $apps_labels = array(); |
104 | 104 | |
105 | 105 | # create an array with label configurations |
106 | - foreach($apps as $app) |
|
106 | + foreach ($apps as $app) |
|
107 | 107 | { |
108 | 108 | $apps_labels[trim($app)] = array('label' => $app); |
109 | 109 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | { |
79 | 79 | $user = craft()->userSession->getUser(); |
80 | 80 | |
81 | - if($user->can('admin')) |
|
81 | + if ($user->can('admin')) |
|
82 | 82 | { |
83 | 83 | $sources = array( |
84 | 84 | '*' => array( |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | // get list of app ids that the user has access to |
93 | 93 | $myIds = array(); |
94 | 94 | |
95 | - foreach(craft()->pushNotifications_apps->getAllApps() as $app) |
|
95 | + foreach (craft()->pushNotifications_apps->getAllApps() as $app) |
|
96 | 96 | { |
97 | 97 | $myIds[] = $app->id; |
98 | 98 | } |
@@ -85,8 +85,7 @@ |
||
85 | 85 | 'label' => Craft::t('All notifications'), |
86 | 86 | ), |
87 | 87 | ); |
88 | - } |
|
89 | - else { |
|
88 | + } else { |
|
90 | 89 | // only display the notifications for the apps that the user has access to |
91 | 90 | |
92 | 91 | // get list of app ids that the user has access to |