Issues (256)

src/LearningLocker/Downloads/DownloadHandler.php (3 issues)

1
<?php
2
3
namespace Ijeffro\Laralocker\LearningLocker\Downloads;
4
5
use Ijeffro\Laralocker\LearningLocker\API\APIHandler;
6
7
class DownloadHandler extends APIHandler implements DownloadInterface {
8
9
    private $download = '/download';
10
    private $api = '/api';
11
    private $v1 = '/v1';
0 ignored issues
show
The private property $v1 is not used, and could be removed.
Loading history...
12
    private $v2 = '/v2';
13
14
    protected $headers = [
15
      'content-type' => 'application/json'
16
    ];
17
18
    /**
19
     * Learning Locker: Request Organisation Details
20
     *
21
     * @return  $response
0 ignored issues
show
Documentation Bug introduced by
The doc comment $response at position 0 could not be parsed: Unknown type name '$response' at position 0 in $response.
Loading history...
22
     */
23
    public function get() {
24
        try {
25
            $url = $this->url . $this->api . $this->v2 . $this->download;
26
            $response = $this->request($url);
27
            return $response;
28
        } catch (Exception $e) {
0 ignored issues
show
The type Ijeffro\Laralocker\Learn...ker\Downloads\Exception was not found. Did you mean Exception? If so, make sure to prefix the type with \.
Loading history...
29
            return $e;
30
        }
31
    }
32
33
}
34