DummyReader::getWeek()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace WITR\TopTwenty;
4
5
use stdClass;
6
7
class DummyReader implements Reader {
8
9
	public function get()
10
	{
11
		return $this->getAmount(20);
12
	}
13
14
	public function getWeek()
15
	{
16
		return $this->getAmount(50);
17
	}
18
19
	private function getAmount($amount)
20
	{
21
		$songs = [];
22
		for ($i = 0; $i < $amount; $i++)
23
		{
24
			$song = new stdClass();
25
			$song->artist = 'Rage Against The Machine';
26
			$song->title = 'Bombtrack';
27
			$song->count = $amount - $i;
28
			$song->name = 'Feature';
29
			$songs[] = $song;
30
		}
31
32
		return $songs;	
33
	}
34
}