Completed
Pull Request — develop (#4)
by
unknown
06:14
created
services/PushNotifications_PushService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
services/PushNotifications_AppsService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,10 +58,10 @@
 block discarded – undo
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]);
Please login to merge, or discard this patch.
PushNotificationsPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
elementtypes/PushNotifications_NotificationElementType.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.