Conditions | 6 |
Paths | 6 |
Total Lines | 32 |
Code Lines | 26 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public static function authorizeWrite($type) { |
||
12 | switch ($type) { |
||
13 | case "create_project": |
||
14 | if (Session::get('role')) |
||
15 | return "allowed"; |
||
16 | else |
||
17 | return "notAllowed"; |
||
18 | break; |
||
19 | case "create_task": |
||
20 | if (Session::get('role')) |
||
21 | { |
||
22 | /** |
||
23 | * Cross check |
||
24 | */ |
||
25 | $teamRepository = new DbTeamRepository(); |
||
26 | $teamId= \Input::get("teamId"); |
||
|
|||
27 | $id = $teamRepository->getTeamDecodedId($teamId); |
||
28 | $teamId=$id; |
||
29 | $projectId=\Input::get("projectId"); |
||
30 | $user_id = \DB::table('team_heads') |
||
31 | ->select('user_id') |
||
32 | ->where('team_heads.team_id', '=', $teamId) |
||
33 | ->where('team_heads.project_id', '=', $projectId) |
||
34 | ->first(); |
||
35 | if($user_id['user_id']==\Session::get('userId')) |
||
36 | return "allowed"; |
||
37 | else |
||
38 | return "notAllowed"; |
||
39 | } |
||
40 | else |
||
41 | return "notAllowed"; |
||
42 | break; |
||
43 | } |
||
50 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths