Completed
Push — master ( 9fad7c...f2bd1d )
by Sergi Tur
13:32 queued 11s
created

UseComposer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A findComposer() 0 8 2
1
<?php
2
3
namespace Acacha\AdminLTETemplateLaravel\Console\Traits;
4
5
/**
6
 * Trait UseComposer.
7
 *
8
 * @package Acacha\AdminLTETemplateLaravel\Console\Traits
9
 */
10
trait UseComposer
11
{
12
    /**
13
     * Get the composer command for the environment.
14
     *
15
     * @return string
16
     */
17
    protected function findComposer()
18
    {
19
        if (file_exists(getcwd().'/composer.phar')) {
20
            return '"'.PHP_BINARY.'" composer.phar"';
21
        }
22
23
        return 'composer';
24
    }
25
}
26