-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rental.php
49 lines (38 loc) · 825 Bytes
/
Rental.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* Created by JetBrains PhpStorm.
* User: merklik
* Date: 4/27/13
* Time: 10:48 AM
* To change this template use File | Settings | File Templates.
*/
namespace Refactoring;
class Rental
{
private $_movie;
private $_daysRented;
function __construct($movie, $daysRented)
{
$this->_movie = $movie;
$this->_daysRented = $daysRented;
}
public function getDaysRented()
{
return $this->_daysRented;
}
public function getMovie()
{
return $this->_movie;
}
/**
* @return mixed
*/
public function getFrequentRenterPoints()
{
return $this->_movie->getFrequentRenterPoints($this->_daysRented);
}
public function getCharge()
{
return $this->_movie->getCharge($this->_daysRented);
}
}