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

WebpackPageControllerExtension::WebpackDevServer()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 4
nc 3
nop 0
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