Completed
Push — master ( 2f0908...f2618c )
by Nicolaas
01:24
created

WebpackPageControllerExtension   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A WebpackDevServer() 0 7 3
1
<?php
2
3
4
class WebpackPageControllerExtension extends extension
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
5
{
6
7
    public function WebpackDevServer()
8
    {
9
        if (Director::isDev()) {
10
            $socket = @fsockopen('localhost', 3000, $errno, $errstr, 1);
11
            return !$socket ? false : true;
12
        }
13
    }
14
}
15