Completed
Push — develop-3.0 ( 5ab583...f20237 )
by Mohamed
06:33
created

Fetcher   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAll() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Tinyissue package.
5
 *
6
 * (c) Mohamed Alsharaf <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tinyissue\Repository\Message;
13
14
use Illuminate\Database\Eloquent\Collection;
15
use Tinyissue\Model\Message;
16
use Tinyissue\Repository\Repository;
17
18
class Fetcher extends Repository
19
{
20
    /**
21
     * @var Message
22
     */
23
    protected $model;
24
25
    public function __construct(Message $model)
26
    {
27
        $this->model = $model;
28
    }
29
30
    /**
31
     * Get all messages.
32
     *
33
     * @return Collection
34
     */
35
    public function getAll()
36
    {
37
        return $this->model->orderBy('id', 'ASC')->get();
38
    }
39
}
40