Completed
Pull Request — master (#2)
by
unknown
02:56
created
src/Modules/Acl/Repositories/UserRepository.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
 	 * 
152 152
 	 * @param  array   $credentials
153 153
 	 * @param  boolean $skipConfirmEmail
154
-	 * @return array
154
+	 * @return boolean
155 155
 	 */
156 156
 	public function register($credentials, $skipConfirmEmail = false)
157 157
 	{
Please login to merge, or discard this patch.
src/Modules/Core/AbstractRepositories/AbstractRepository.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 *
33 33
 	 * @param  array   $relations
34 34
 	 * @param  string  $sortBy
35
-	 * @param  boolean $desc
35
+	 * @param  integer $desc
36 36
 	 * @param  array   $columns
37 37
 	 * @return collection
38 38
 	 */
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * @param  integer $perPage
51 51
 	 * @param  array   $relations
52 52
 	 * @param  string  $sortBy
53
-	 * @param  boolean $desc
53
+	 * @param  integer $desc
54 54
 	 * @param  array   $columns
55 55
 	 * @return collection
56 56
 	 */
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	 * @param  integer $perPage
165 165
 	 * @param  array   $relations
166 166
 	 * @param  string  $sortBy
167
-	 * @param  boolean $desc
167
+	 * @param  integer $desc
168 168
 	 * @param  array   $columns
169 169
 	 * @return collection
170 170
 	 */
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 * @param  integer $perPage
183 183
 	 * @param  array   $relations
184 184
 	 * @param  string  $sortBy
185
-	 * @param  boolean $desc
185
+	 * @param  integer $desc
186 186
 	 * @param  array   $columns
187 187
 	 * @return collection
188 188
 	 */
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	 * Save the given model to the storage.
199 199
 	 * 
200 200
 	 * @param  array $data
201
-	 * @return mixed
201
+	 * @return boolean
202 202
 	 */
203 203
 	public function save(array $data)
204 204
 	{
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 	 * @param  array   $conditions array of conditions
532 532
 	 * @param  array   $relations
533 533
 	 * @param  string  $sortBy
534
-	 * @param  boolean $desc
534
+	 * @param  integer $desc
535 535
 	 * @param  array   $columns
536 536
 	 * @return collection
537 537
 	 */
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 	 * @param  array   $conditions array of conditions
564 564
 	 * @param  integer $perPage
565 565
 	 * @param  string  $sortBy
566
-	 * @param  boolean $desc
566
+	 * @param  integer $desc
567 567
 	 * @param  array   $columns
568 568
 	 * @return collection
569 569
 	 */
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -621,14 +621,12 @@  discard block
 block discarded – undo
621 621
 				$conditions       = $this->constructConditions($value, $model);
622 622
 				$conditionString .= str_replace('{op}', 'and', $conditions['conditionString']).' {op} ';
623 623
 				$conditionValues  = array_merge($conditionValues, $conditions['conditionValues']);
624
-			}
625
-			else if ($key == 'or')
624
+			} else if ($key == 'or')
626 625
 			{
627 626
 				$conditions       = $this->constructConditions($value, $model);
628 627
 				$conditionString .= str_replace('{op}', 'or', $conditions['conditionString']).' {op} ';
629 628
 				$conditionValues  = array_merge($conditionValues, $conditions['conditionValues']);
630
-			}
631
-			else
629
+			} else
632 630
 			{
633 631
 				if (is_array($value)) 
634 632
 				{
@@ -653,29 +651,24 @@  discard block
 block discarded – undo
653 651
 
654 652
 					$conditionString  .= $key.' <= ? {op} ';
655 653
 					$conditionValues[] = $value2;
656
-				}
657
-				elseif (strtolower($operator) == 'in') 
654
+				} elseif (strtolower($operator) == 'in') 
658 655
 				{
659 656
 					$conditionValues  = array_merge($conditionValues, $value);
660 657
 					$inBindingsString = rtrim(str_repeat('?,', count($value)), ',');
661 658
 					$conditionString .= $key.' in ('.rtrim($inBindingsString, ',').') {op} ';
662
-				}
663
-				elseif (strtolower($operator) == 'null') 
659
+				} elseif (strtolower($operator) == 'null') 
664 660
 				{
665 661
 					$conditionString .= $key.' is null {op} ';
666
-				}
667
-				elseif (strtolower($operator) == 'not null') 
662
+				} elseif (strtolower($operator) == 'not null') 
668 663
 				{
669 664
 					$conditionString .= $key.' is not null {op} ';
670
-				}
671
-				elseif (strtolower($operator) == 'has') 
665
+				} elseif (strtolower($operator) == 'has') 
672 666
 				{
673 667
 					$sql              = $model->withTrashed()->has($key)->toSql();
674 668
 					$conditions       = $this->constructConditions($value, $model->$key()->getRelated());
675 669
 					$conditionString .= rtrim(substr($sql, strpos($sql, 'exists')), ')').' and '.$conditions['conditionString'].') {op} ';
676 670
 					$conditionValues  = array_merge($conditionValues, $conditions['conditionValues']);
677
-				}
678
-				else
671
+				} else
679 672
 				{
680 673
 					$conditionString  .= $key.' '.$operator.' ? {op} ';
681 674
 					$conditionValues[] = $value;
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/GenerateDoc.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@
 block discarded – undo
217 217
 	/**
218 218
 	 * Get the given method body code.
219 219
 	 * 
220
-	 * @param  object $reflectionMethod
220
+	 * @param  \ReflectionMethod $reflectionMethod
221 221
 	 * @return string
222 222
 	 */
223 223
 	protected function getMethodBody($reflectionMethod)
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -174,14 +174,12 @@
 block discarded – undo
174 174
 					if (strpos($rule, 'unique'))
175 175
 					{
176 176
 						$rule = substr($rule, 0, strpos($rule, 'unique') + 6);
177
-					}
178
-					elseif (strpos($rule, 'exists'))
177
+					} elseif (strpos($rule, 'exists'))
179 178
 					{
180 179
 						$rule = substr($rule, 0, strpos($rule, 'exists') - 1);
181 180
 					}
182 181
 				}
183
-			}
184
-			else
182
+			} else
185 183
 			{
186 184
 				$route['body'] = 'conditions';
187 185
 			}
Please login to merge, or discard this patch.
src/Modules/Core/Http/Controllers/BaseApiController.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -227,10 +227,8 @@
 block discarded – undo
227 227
 			}
228 228
 
229 229
 			if ($isPasswordClient && (in_array($permission, $this->skipPermissionCheck) || \Core::users()->can($permission, $this->model)))
230
-			{}
231
-			elseif ( ! $isPasswordClient && $user->tokenCan($this->model.'-'.$permission)) 
232
-			{}
233
-			else
230
+			{} elseif ( ! $isPasswordClient && $user->tokenCan($this->model.'-'.$permission)) 
231
+			{} else
234 232
 			{
235 233
 
236 234
 				\ErrorHandler::noPermissions();
Please login to merge, or discard this patch.
src/Modules/Reporting/Repositories/ReportRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
39 39
 		if ( ! $report) 
40 40
 		{
41 41
 			\ErrorHandler::notFound('report');
42
-		}
43
-		else if ( ! $skipPermission && ! \Core::users()->can($report->view_name, 'reports'))
42
+		} else if ( ! $skipPermission && ! \Core::users()->can($report->view_name, 'reports'))
44 43
 		{
45 44
 			\ErrorHandler::noPermissions();
46 45
 		}
Please login to merge, or discard this patch.