Passed
Push — master ( 2fe5ea...055735 )
by Matthieu
02:04
created
src/IPv4/Address.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
      * @see https://en.wikipedia.org/wiki/Classful_network 
37 37
      */ 
38 38
     const CLASS_A = "A",
39
-          CLASS_B = "B",
40
-          CLASS_C = "C",
41
-          CLASS_D = "D",
42
-          CLASS_E = "E";
39
+            CLASS_B = "B",
40
+            CLASS_C = "C",
41
+            CLASS_D = "D",
42
+            CLASS_E = "E";
43 43
 
44 44
     /**
45 45
      * IPv4 addresses are stored as a 32 bits integer
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      * @param self $address
405 405
      * @return bool
406 406
      */
407
-     public function match(Address $address)
407
+        public function match(Address $address)
408 408
     {
409 409
         return $this->int() == $address->int();
410 410
     }
Please login to merge, or discard this patch.
src/IPv4/Range.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function offsetExists($offset)
150 150
     {
151
-         if (is_string($offset))
151
+            if (is_string($offset))
152 152
         {
153 153
             if (!preg_match('/^-?[0-9]+$/', $offset))
154 154
             {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             }           
157 157
             $offset = (int)$offset;
158 158
         }
159
-       if (!is_int($offset))
159
+        if (!is_int($offset))
160 160
         {
161 161
             throw new InvalidArgumentException(sprintf('Invalid key type (%s), only integers or strings representing integers can be used to acces address in a Range', gettype($offset)));
162 162
         }
Please login to merge, or discard this patch.
src/IPv4/Subnet.php 1 patch
Indentation   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@  discard block
 block discarded – undo
24 24
  *  * Countable : number of addresses
25 25
  *  * ArrayAccess : Address can be acceesed by offset (ex : $range[10])
26 26
  *  * IteratorAggregate :   range can be itrated (foreach)
27
-
28 27
  * @package IPTools
29 28
  */
30 29
 class Subnet extends Range
@@ -34,13 +33,13 @@  discard block
 block discarded – undo
34 33
      */
35 34
     protected $netmask;
36 35
 
37
-     /**
38
-     * Creates an IP Subnet from a an IP network addresses and a netamsk
39
-     *
40
-     * @param Address $baseAddress the first address of the range
41
-     * @param int $count the number  other bound
42
-     * @param bool $strict if true $network
43
-     */
36
+        /**
37
+         * Creates an IP Subnet from a an IP network addresses and a netamsk
38
+         *
39
+         * @param Address $baseAddress the first address of the range
40
+         * @param int $count the number  other bound
41
+         * @param bool $strict if true $network
42
+         */
44 43
     public function __construct(Address $network, Address $netmask, bool $strict=true)
45 44
     {
46 45
         $finalNetmask = clone($netmask);
@@ -61,7 +60,7 @@  discard block
 block discarded – undo
61 60
         $this->netmask = $finalNetmask;
62 61
     }
63 62
 
64
-   /**
63
+    /**
65 64
      * Construct an IPv4 Subnet from a CIDR notation (#.#.#.#/#)
66 65
      *
67 66
      * @param Address $network the network base address  of the subnet
@@ -168,7 +167,7 @@  discard block
 block discarded – undo
168 167
         return static::fromCidr(
169 168
             $this->getNetworkAddress()->shift($offset*count($this)),
170 169
             $this->getNetmaskAddress()->asCidr()
171
-         );
170
+            );
172 171
     }
173 172
 
174 173
     /*
Please login to merge, or discard this patch.