DocumentationCheck::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
namespace SilverStripe\ModuleRatings\Check;
4
5
class DocumentationCheck extends AbstractFileCheck
6
{
7
    public function getKey()
8
    {
9
        return 'has_documentation';
10
    }
11
12
    public function getDescription()
13
    {
14
        return 'Has documentation';
15
    }
16
17
    public function run()
18
    {
19
        $files = $this->getFinder()
20
            ->directories()
21
            ->in($this->getSuite()->getModuleRoot())
22
            ->name('/^docs?$/');
23
24
        $this->setSuccessful(count($files) > 0);
25
    }
26
}
27