Publication   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getIsVisible() 0 8 3
1
<?php
2
3
namespace Fenrizbes\PublicationsBundle\Model;
4
5
use Fenrizbes\PublicationsBundle\Model\om\BasePublication;
6
7
class Publication extends BasePublication
8
{
9
  
10
    /**
11
     * Проверяем видимость новости для посетителей
12
     * @return bool
13
     * @throws \PropelException
14
     */
15
    public function getIsVisible()
16
    {
17
        if ($this->getIsPublished() && $this->getCreatedAt() <= new \DateTime('now')) {
18
            return true;
19
        }
20
21
        return false;
22
    }  
23
  
24
}
25