Passed
Push — master ( 33405b...4f3302 )
by Matthieu
01:55
created
src/IPv4/Subnet.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function __construct(Address $network, Address $netmask)
47 47
     {
48
-        if (!($netmask instanceof Netmask))
48
+        if(!($netmask instanceof Netmask))
49 49
         {
50 50
             /**
51 51
              * @todo implement
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
             throw new InvalidArgumentException("Not implemented");
54 54
         }
55 55
         // Verify parameters validity
56
-        if( ($network->int() & $netmask->int()) != $network->int())
56
+        if(($network->int() & $netmask->int())!=$network->int())
57 57
         {
58 58
             throw new RangeException(sprintf("Invalid network adress %s, this address is not usable with the netmask %s", (string)$network, (string)$netmask));
59 59
         }
60 60
 
61 61
 
62 62
 
63
-        parent::__construct($network, $network->shift(count($netmask)-1));
63
+        parent::__construct($network, $network->shift(count($netmask) - 1));
64 64
         $this->netmask = $netmask;
65 65
     }
66 66
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     public static function fromString(string $subnet)
122 122
     {
123 123
         @list($address, $netmask, $trash) = explode('/', $subnet);
124
-        if (!is_null($trash) || is_null($netmask))
124
+        if(!is_null($trash) || is_null($netmask))
125 125
         {
126 126
             throw new InvalidArgumentException(sprintf("%s cannot be converted to subnet. Valid formats are : x.x.x.x/cidr or x.x.x.x/y.y.y.y", $subnet));
127 127
         }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     public function shift(int $offset)
177 177
     {
178 178
         return static::fromCidr(
179
-            $this->getNetworkAddress()->shift($offset*count($this)),
179
+            $this->getNetworkAddress()->shift($offset * count($this)),
180 180
             $this->getNetmaskAddress()->asCidr()
181 181
          );
182 182
     }
Please login to merge, or discard this patch.