Passed
Push — master ( 6b8ca8...3384db )
by Paul
04:57
created

SiteReviews   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 25
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 5 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Modules\Html\Partials;
4
5
use GeminiLabs\SiteReviews\Database;
6
use GeminiLabs\SiteReviews\Modules\Html\Builder;
7
use GeminiLabs\SiteReviews\Modules\Rating;
8
use GeminiLabs\SiteReviews\Modules\Schema;
9
10
class SiteReviews
11
{
12
	/**
13
	 * @var array
14
	 */
15
	protected $args;
16
17
	/**
18
	 * @var float
19
	 */
20
	protected $rating;
21
22
	/**
23
	 * @var object
24
	 */
25
	protected $reviews;
26
27
	/**
28
	 * @return void|string
29
	 */
30
	public function build( $name, array $args = [] )
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

30
	public function build( /** @scrutinizer ignore-unused */ $name, array $args = [] )

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
	{
32
		$this->args = $args;
33
		$this->reviews = glsr( Database::class )->getReviews( $args );
34
		$this->rating = glsr( Rating::class )->getAverage( $this->reviews->results );
35
	}
36
}
37