Completed
Push — master ( 5ab18c...4e82e1 )
by claudio
08:39
created

NoAuthController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 3
c 1
b 1
f 0
lcom 0
cbo 1
dl 0
loc 29
ccs 0
cts 14
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A showImage() 0 12 2
1
<?php
2
3
namespace plunner\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
use plunner\Http\Requests;
7
8
class NoAuthController extends Controller
9
{
10
    public function __construct()
11
    {
12
    }
13
14
15
    //TODO remove this, it is just a tmp fix
16
    /**
17
     *
18
     * Store a newly created resource in storage.
19
     *
20
     * @param int $meetingId
21
     * @return static
22
     */
23
    public function showImage($meetingId)
24
    {
25
        $meeting = Group::findOrFail($meetingId);
26
        //$this->authorize($meeting);
27
        $ret = self::getImg($meeting);
0 ignored issues
show
Bug introduced by
The method getImg() does not seem to exist on object<plunner\Http\Controllers\NoAuthController>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
28
        $blank = storage_path('img/meetings.jpg');
29
        if ($ret === false)
30
            return (new Response(file_get_contents($blank), 200))
31
                ->header('Content-Type', 'image/jpeg');
32
        return (new Response($ret, 200))
33
            ->header('Content-Type', 'image/jpeg');
34
    }
35
36
}
37