@@ -55,6 +55,10 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | return ["year" => $year, "month"=>$month]; |
| 57 | 57 | } |
| 58 | + |
|
| 59 | + /** |
|
| 60 | + * @param CWeek|null $week |
|
| 61 | + */ |
|
| 58 | 62 | public function addWeek($week) |
| 59 | 63 | {
|
| 60 | 64 | $this->weeks[] = $week; |
@@ -135,6 +139,9 @@ discard block |
||
| 135 | 139 | } |
| 136 | 140 | |
| 137 | 141 | |
| 142 | + /** |
|
| 143 | + * @param string $firstDayOfMonth |
|
| 144 | + */ |
|
| 138 | 145 | private function getAmountOfEmptyDays($firstDayOfMonth){
|
| 139 | 146 | $number = 0; |
| 140 | 147 | if($firstDayOfMonth == 0){
|
@@ -17,11 +17,9 @@ discard block |
||
| 17 | 17 | public function getValues($year = null, $month = null){
|
| 18 | 18 | if($year && $month){
|
| 19 | 19 | $this->setYear($year)->setMonth($month); |
| 20 | - } |
|
| 21 | - else if(isset($_GET['year']) && isset($_GET['month'])){
|
|
| 20 | + } else if(isset($_GET['year']) && isset($_GET['month'])){
|
|
| 22 | 21 | $this->setYear($_GET['year'])->setMonth($_GET['month']); |
| 23 | - } |
|
| 24 | - else {
|
|
| 22 | + } else {
|
|
| 25 | 23 | $this->setYear(date('Y'))->setMonth(date('m'));
|
| 26 | 24 | } |
| 27 | 25 | } |
@@ -270,8 +268,7 @@ discard block |
||
| 270 | 268 | } else {
|
| 271 | 269 | if($count[$day->getDayOfMonthNumber()] == null){
|
| 272 | 270 | $id = 0; |
| 273 | - } |
|
| 274 | - else{
|
|
| 271 | + } else{
|
|
| 275 | 272 | $id = $day->getDayOfMonthNumber(); |
| 276 | 273 | } |
| 277 | 274 | |
@@ -64,8 +64,6 @@ |
||
| 64 | 64 | /** |
| 65 | 65 | * Execute the query built. |
| 66 | 66 | * |
| 67 | - * @param string $query custom query. |
|
| 68 | - * |
|
| 69 | 67 | * @return $this |
| 70 | 68 | */ |
| 71 | 69 | public function execute($params = []) |
@@ -73,6 +73,10 @@ |
||
| 73 | 73 | |
| 74 | 74 | return $eventsPerDayForMonth; |
| 75 | 75 | } |
| 76 | + |
|
| 77 | + /** |
|
| 78 | + * @param string $date |
|
| 79 | + */ |
|
| 76 | 80 | public function getEventCount($date){
|
| 77 | 81 | $this->db->select() |
| 78 | 82 | ->from($this->getSource()) |