Completed
Pull Request — master (#5)
by Zach
01:57
created
src/Fractal.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 namespace NavJobs\Transmit;
4 4
 
5 5
 use League\Fractal\Manager;
6
-use League\Fractal\ParamBag;
7 6
 use League\Fractal\Pagination\PaginatorInterface;
7
+use League\Fractal\ParamBag;
8 8
 use League\Fractal\Serializer\SerializerAbstract;
9 9
 use NavJobs\Transmit\Exceptions\InvalidTransformation;
10 10
 use NavJobs\Transmit\Exceptions\NoTransformerSpecified;
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
     /**
165 165
      * Specify the includes.
166 166
      *
167
-     * @param array|string $includes Array or csv string of resources to include
167
+     * @param string $includes Array or csv string of resources to include
168 168
      *
169 169
      * @return $this
170 170
      */
Please login to merge, or discard this patch.
src/Controller.php 2 patches
Unused Use Statements   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,13 +2,12 @@
 block discarded – undo
2 2
 
3 3
 namespace NavJobs\Transmit;
4 4
 
5
-use Illuminate\Database\Eloquent\Builder;
5
+use Illuminate\Routing\Controller as BaseController;
6 6
 use Illuminate\Support\Facades\App;
7 7
 use Illuminate\Support\Facades\Input;
8
+use League\Fractal\Pagination\IlluminatePaginatorAdapter;
8 9
 use NavJobs\Transmit\Traits\ErrorResponsesTrait;
9 10
 use NavJobs\Transmit\Traits\QueryHelperTrait;
10
-use Illuminate\Routing\Controller as BaseController;
11
-use League\Fractal\Pagination\IlluminatePaginatorAdapter;
12 11
 
13 12
 abstract class Controller extends BaseController
14 13
 {
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * Sets the fractal transformer
31 31
      *
32
-     * @return mixed
32
+     * @return Controller
33 33
      */
34 34
     public function setTransformer($transformer) {
35 35
         $this->transformer = $transformer;
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     /**
40 40
      * Sets model builder
41 41
      *
42
-     * @return mixed
42
+     * @return Controller
43 43
      */
44 44
     public function setModel($model) {
45 45
         $this->model = $model;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     /**
50 50
      * Sets resource key for fractal
51 51
      *
52
-     * @return mixed
52
+     * @return Controller
53 53
      */
54 54
     public function setResourceKey($resourceKey) {
55 55
         $this->resourceKey = $resourceKey;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * Sets the current status code.
89 89
      *
90
-     * @param $statusCode
90
+     * @param integer $statusCode
91 91
      * @return $this
92 92
      */
93 93
     protected function setStatusCode($statusCode)
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * passed through fractal and optionally a transformer.
112 112
      *
113 113
      * @param $item
114
-     * @param null $callback
114
+     * @param \Closure $callback
115 115
      * @return \Illuminate\Http\JsonResponse
116 116
      */
117 117
     protected function respondWithItem($item, $callback = null)
Please login to merge, or discard this patch.
src/Templates/ResourceController.php 1 patch
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * Display a listing of the resource.
11 11
      *
12
-     * @return \Illuminate\Http\Response
12
+     * @return \Illuminate\Http\JsonResponse
13 13
      */
14 14
     public function index()
15 15
     {
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * Store a newly created resource in storage.
20 20
      *
21
-     * @param  \Illuminate\Http\Request  $request
22
-     * @return \Illuminate\Http\Response
21
+     * @return \Illuminate\Http\JsonResponse
23 22
      */
24 23
     public function store()
25 24
     {
@@ -30,7 +29,7 @@  discard block
 block discarded – undo
30 29
      * Display the specified resource.
31 30
      *
32 31
      * @param  int  $id
33
-     * @return \Illuminate\Http\Response
32
+     * @return \Illuminate\Http\JsonResponse
34 33
      */
35 34
     public function show($id)
36 35
     {
@@ -43,7 +42,7 @@  discard block
 block discarded – undo
43 42
      *
44 43
      * @param  \Illuminate\Http\Request  $request
45 44
      * @param  int  $id
46
-     * @return \Illuminate\Http\Response
45
+     * @return \Illuminate\Http\JsonResponse
47 46
      */
48 47
     public function update($id, Request $request)
49 48
     {
Please login to merge, or discard this patch.
src/Transmitters/Destroy.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace NavJobs\Transmit\Transmitters;
4 4
 
5
-use NavJobs\Transmit\Controller;
6
-
7 5
 trait Destroy
8 6
 {
9 7
     /**
Please login to merge, or discard this patch.
src/Transmitters/Index.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
     /**
10 10
      * Display the specified resource.
11 11
      *
12
-     * @param  int  $id
13 12
      * @return \Illuminate\Http\Response
14 13
      */
15 14
      public function index()
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace NavJobs\Transmit\Transmitters;
4 4
 
5
-use NavJobs\Transmit\Controller;
6
-
7 5
 trait Index
8 6
 {
9 7
     /**
Please login to merge, or discard this patch.
src/Transmitters/Show.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace NavJobs\Transmit\Transmitters;
4 4
 
5
-use NavJobs\Transmit\Controller;
6
-
7 5
 trait Show
8 6
 {
9 7
     /**
Please login to merge, or discard this patch.
src/Transmitters/Store.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
     /**
10 10
      * Store a newly created resource in storage.
11 11
      *
12
-     * @param  \Illuminate\Http\Request  $request
13 12
      * @return \Illuminate\Http\Response
14 13
      */
15 14
     public function store()
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace NavJobs\Transmit\Transmitters;
4 4
 
5
-use NavJobs\Transmit\Controller;
6
-
7 5
 trait Store
8 6
 {
9 7
     /**
Please login to merge, or discard this patch.
src/Transmitters/Update.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace NavJobs\Transmit\Transmitters;
4 4
 
5
-use NavJobs\Transmit\Controller;
6 5
 use Illuminate\Http\Request;
7 6
 
8 7
 trait Update
Please login to merge, or discard this patch.