Completed
Pull Request — master (#63)
by Patrick
01:48
created
api/v1/class.ShiftAPI.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     protected function canUpdate($request, $entity)
42 42
     {
43 43
  	if($this->isVolunteerAdmin($request))
44
-        {
44
+ 	{
45 45
             return true;
46 46
         }
47 47
         return $this->isUserDepartmentLead($entity['departmentID'], $this->user);
Please login to merge, or discard this patch.
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -221,6 +221,11 @@
 block discarded – undo
221 221
         return $response->withJSON($res, 500);
222 222
     }
223 223
 
224
+    /**
225
+     * @param string $status
226
+     * @param Data\Filter $filter
227
+     * @param Data\DataTable $dataTable
228
+     */
224 229
     protected function doSignup($uid, $status, $entity, $filter, $dataTable)
225 230
     {
226 231
         if(isset($entity['earlyLate']) && $entity['earlyLate'] !== '-1')
Please login to merge, or discard this patch.
api/v1/class.ParticipantAPI.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     protected function canUpdate($request, $entity)
37 37
     {
38 38
  	if($this->isVolunteerAdmin($request))
39
-        {
39
+ 	{
40 40
             return true;
41 41
         }       
42 42
         //TODO give access to department lead
Please login to merge, or discard this patch.
api/v1/class.EventAPI.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     protected function canUpdate($request, $entity)
39 39
     {
40 40
  	if($this->isVolunteerAdmin($request))
41
-        {
41
+ 	{
42 42
             return true;
43 43
         }       
44 44
         return false;
Please login to merge, or discard this patch.
app/VolunteerAutoload.php 1 patch
Braces   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2
-function VolunteerAutoload($classname)
3
-{
2
+function VolunteerAutoload($classname)
3
+{
4 4
     $classname = str_replace('/', '\\', $classname);
5 5
     $classname = ltrim($classname, '\\');
6 6
     $filename  = '';
7 7
     $namespace = '';
8
-    if($lastNsPos = strrpos($classname, '\\'))
9
-    {
8
+    if($lastNsPos = strrpos($classname, '\\'))
9
+    {
10 10
         $namespace = substr($classname, 0, $lastNsPos);
11 11
         $classname = substr($classname, $lastNsPos + 1);
12 12
         $filename  = str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR;
13 13
     }
14 14
     $filename = __DIR__.DIRECTORY_SEPARATOR.$filename.'class.'.$classname.'.php';
15
-    if(is_readable($filename))
16
-    {
15
+    if(is_readable($filename))
16
+    {
17 17
         require $filename;
18 18
     }
19 19
 }
20 20
 
21
-if(version_compare(PHP_VERSION, '5.3.0', '>='))
22
-{
21
+if(version_compare(PHP_VERSION, '5.3.0', '>='))
22
+{
23 23
     spl_autoload_register('VolunteerAutoload', true, true);
24
-}
25
-else
26
-{
24
+}
25
+else
26
+{
27 27
     spl_autoload_register('VolunteerAutoload');
28 28
 }
29 29
 /* vim: set tabstop=4 shiftwidth=4 expandtab: */
Please login to merge, or discard this patch.
api/v1/class.Processor.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -12,6 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
     protected abstract function isVolunteerAdmin($request);
14 14
 
15
+    /**
16
+     * @param VolunteerProfile|null $user
17
+     */
15 18
     public function canUserDoRole($user, $role)
16 19
     {
17 20
         static $certs = null;
@@ -155,6 +158,9 @@  discard block
 block discarded – undo
155 158
         return !in_array($deptId, $privateDepts);
156 159
     }
157 160
 
161
+    /**
162
+     * @param VolunteerShift $shift
163
+     */
158 164
     protected function doShiftTimeChecks($shift, $entry)
159 165
     {
160 166
         $now = new DateTime();
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,10 +60,13 @@
 block discarded – undo
60 60
         static $uids = array();
61 61
         if(!isset($uids[$uid]))
62 62
         {
63
-            try {
63
+            try
64
+            {
64 65
                 $profile = new \VolunteerProfile($uid);
65 66
                 $uids[$uid] = $profile->getDisplayName();
66
-            } catch (Exception $e) {
67
+            }
68
+            catch (Exception $e)
69
+            {
67 70
                 $uids[$uid] = $uid;
68 71
             }
69 72
         }
Please login to merge, or discard this patch.
app/Emails/class.PendingRejectedEmail.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -3,6 +3,9 @@
 block discarded – undo
3 3
 
4 4
 class PendingRejectedEmail extends VolunteerEmail
5 5
 {
6
+    /**
7
+     * @param \VolunteerProfile $userProfile
8
+     */
6 9
     public function __construct($userProfile)
7 10
     {
8 11
         parent::__construct($userProfile);
Please login to merge, or discard this patch.
app/Schedules/class.SimplePDF.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
                     $shift = new \VolunteerShift(false, $shift);
73 73
                     $participant = $shift->participantObj;
74 74
                     if($participant !== false)
75
-                    { 
75
+                    {
76 76
                         $html .='<tr><td>'.$this->getRoleNameFromID($shift->roleID).'</td><td>'.$participant->getDisplayName('paperName').'</td><td>'.$participant->campName.'</td></tr>';
77 77
                     }
78 78
                     else
Please login to merge, or discard this patch.
app/class.VolunteerShift.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@
 block discarded – undo
177 177
         return $res;
178 178
     }
179 179
 
180
+    /**
181
+     * @param Data\DataTable $dataTable
182
+     */
180 183
     public function makeCopy($dataTable)
181 184
     {
182 185
         $tmp = $this->dbData;
Please login to merge, or discard this patch.
app/class.VolunteerEvent.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -6,6 +6,9 @@  discard block
 block discarded – undo
6 6
         parent::__construct($departmentID, $dbData, 'events', '_id');
7 7
     }
8 8
 
9
+    /**
10
+     * @param integer $eeListIndex
11
+     */
9 12
     public function hasVolOnEEList($uid, $eeListIndex)
10 13
     {
11 14
         if($eeListIndex === 1 || $eeListIndex === 0)
@@ -28,6 +31,9 @@  discard block
 block discarded – undo
28 31
         return false;
29 32
     }
30 33
 
34
+    /**
35
+     * @param integer $eeListIndex
36
+     */
31 37
     public function addToEEList($uid, $eeListIndex)
32 38
     {
33 39
         if(!isset($this->dbData['eeLists']))
Please login to merge, or discard this patch.