Completed
Push — master ( c49cbc...039121 )
by Timur
02:32
created

WordPressApplication   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A type() 0 4 1
A usingDatabase() 0 9 1
1
<?php
2
3
namespace Laravel\Forge\Applications;
4
5
use Laravel\Forge\Contracts\ApplicationContract;
6
7
class WordPressApplication extends Application implements ApplicationContract
8
{
9
    /**
10
     * Application type.
11
     *
12
     * @return string
13
     */
14
    public function type()
15
    {
16
        return 'wordpress';
17
    }
18
19
    /**
20
     * Set application database and user.
21
     *
22
     * @param string $database
23
     * @param string $user
24
     *
25
     * @return static
26
     */
27
    public function usingDatabase(string $database, string $user)
28
    {
29
        $this->payload = [
30
            'database' => $database,
31
            'user' => $user,
32
        ];
33
34
        return $this;
35
    }
36
}
37