Completed
Push — master ( 9cf50b...2be9b1 )
by Adam
09:38 queued 07:25
created
src/Access/Curl.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
     /**
52 52
      * @param $option
53
-     * @param bool|true $value
53
+     * @param integer $value
54 54
      * @return $this
55 55
      */
56 56
     public function setOption($option, $value = true)
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php namespace BestServedCold\PhalueObjects\Access;
2 2
 
3
-use BestServedCold\PhalueObjects\Utility\Native\Constant;
3
+use BestServedCold\PhalueObjects\Utility\Native\Constant;
4 4
 use BestServedCold\PhalueObjects\ValueObject;
5 5
 
6 6
 final class Curl extends ValueObject
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     public $returnTransfer  = CURLOPT_RETURNTRANSFER;
14 14
     public $timeout         = CURLOPT_TIMEOUT;
15 15
 
16
-    private $options = [];
16
+    private $options = [ ];
17 17
 
18 18
     public function __construct($value)
19 19
     {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     private function init()
33 33
     {
34
-        if (! $this->value = curl_init($this->getValue())) {
34
+        if (!$this->value = curl_init($this->getValue())) {
35 35
             throw new \Exception;
36 36
         }
37 37
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function getOption($option)
47 47
     {
48
-        return isset($this->options[$option]) ? $this->options[$option] : null;
48
+        return isset($this->options[ $option ]) ? $this->options[ $option ] : null;
49 49
     }
50 50
 
51 51
     /**
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function setOption($option, $value = true)
57 57
     {
58 58
         if (curl_setopt($this->getValue(), $option, $value)) {
59
-            $this->options[Constant::init()->curl($option)] = $value;
59
+            $this->options[ Constant::init()->curl($option) ] = $value;
60 60
         }
61 61
 
62 62
         return $this;
Please login to merge, or discard this patch.
src/File.php 3 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php namespace BestServedCold\PhalueObjects;
2 2
 
3
-use BestServedCold\PhalueObjects\Format\Json;
4
-use BestServedCold\PhalueObjects\Format\Xml;
3
+use BestServedCold\PhalueObjects\Format\Json;
4
+use BestServedCold\PhalueObjects\Format\Xml;
5 5
 use BestServedCold\PhalueObjects\Format\Yaml;
6 6
 
7 7
 class File extends ValueObject
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function getContents()
32 32
     {
33
-        return ! $this->mustExist || $this->exists()
33
+        return !$this->mustExist || $this->exists()
34 34
             ? file_get_contents($this->getValue())
35 35
             : false;
36 36
     }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@
 block discarded – undo
10 10
     protected $timeout;
11 11
     protected $mustExist;
12 12
 
13
+    /**
14
+     * @param string $value
15
+     */
13 16
     public function __construct($value, $mustExist = true, $timeout = 10)
14 17
     {
15 18
         parent::__construct($value);
Please login to merge, or discard this patch.
src/File/Http.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php namespace BestServedCold\PhalueObjects\File;
2 2
 
3
+use BestServedCold\PhalueObjects\Access\Curl;
3 4
 use BestServedCold\PhalueObjects\File;
4
-use BestServedCold\PhalueObjects\Access\Curl;
5 5
 
6 6
 class Http extends File
7 7
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     public function exists()
9 9
     {
10
-        if (! $this->valid()) {
10
+        if (!$this->valid()) {
11 11
             throw new \Exception;
12 12
         }
13 13
 
Please login to merge, or discard this patch.
src/Utility/Native/Constant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function __call($category, array $key)
33 33
     {
34
-        $category = $this->definedConstants[$category];
34
+        $category = $this->definedConstants[ $category ];
35 35
         return empty($key) ? $category : array_search(reset($key), $category);
36 36
     }
37 37
 
Please login to merge, or discard this patch.
src/Colour/Hex.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
     {
9 9
         $hex = str_replace("#", "", $this->value);
10 10
 
11
-        if(strlen($hex) == 3) {
12
-            $r = hexdec($hex[0].$hex[0]);
13
-            $g = hexdec($hex[1].$hex[1]);
14
-            $b = hexdec($hex[2].$hex[2]);
11
+        if (strlen($hex) == 3) {
12
+            $r = hexdec($hex[ 0 ].$hex[ 0 ]);
13
+            $g = hexdec($hex[ 1 ].$hex[ 1 ]);
14
+            $b = hexdec($hex[ 2 ].$hex[ 2 ]);
15 15
         } else {
16
-            $r = hexdec($hex[0].$hex[1]);
17
-            $g = hexdec($hex[2].$hex[3]);
18
-            $b = hexdec($hex[4].$hex[5]);
16
+            $r = hexdec($hex[ 0 ].$hex[ 1 ]);
17
+            $g = hexdec($hex[ 2 ].$hex[ 3 ]);
18
+            $b = hexdec($hex[ 4 ].$hex[ 5 ]);
19 19
         }
20 20
 
21 21
         return new Rgb(array($r, $g, $b));
Please login to merge, or discard this patch.
src/Utility/Configuration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,6 +49,6 @@
 block discarded – undo
49 49
      */
50 50
     public static function getConfiguration()
51 51
     {
52
-        return self::$configuration = Yaml::fromString(__DIR__ . self::$file)->parse();
52
+        return self::$configuration = Yaml::fromString(__DIR__.self::$file)->parse();
53 53
     }
54 54
 }
Please login to merge, or discard this patch.
src/Utility/Language.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@
 block discarded – undo
44 44
      */
45 45
     public static function getFileString($identifier)
46 46
     {
47
-        return __DIR__ . self::$path . Configuration::get('language.locale') .
48
-            "/" . $identifier . '.yml';
47
+        return __DIR__.self::$path.Configuration::get('language.locale').
48
+            "/".$identifier.'.yml';
49 49
     }
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
src/Exception/InvalidTypeException.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@
 block discarded – undo
27 27
     public function __construct($value, array $allowedTypes)
28 28
     {
29 29
         $this->message =
30
-            '[PhalueObjects] Argument [' . $value . '] of type [' . gettype($value) .
31
-            '] is not a valid type.' . ' The allowed type(s) are [' .
32
-            $this->getAllowedTypes($allowedTypes) . ']';
30
+            '[PhalueObjects] Argument ['.$value.'] of type ['.gettype($value).
31
+            '] is not a valid type.'.' The allowed type(s) are ['.
32
+            $this->getAllowedTypes($allowedTypes).']';
33 33
     }
34 34
 
35 35
     /**
Please login to merge, or discard this patch.
src/Exception/InvalidRangeTypeException.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
     {
49 49
         $string = [ ];
50 50
         foreach ($allowedTypes as $type) {
51
-            $string[ ] = '(' . $type . ' >= ' . $this->minimum . ', ' . $type .
52
-                ' <= ' . $this->maximum . ')';
51
+            $string[ ] = '('.$type.' >= '.$this->minimum.', '.$type.
52
+                ' <= '.$this->maximum.')';
53 53
         }
54 54
 
55 55
         return $this->arrayToCommaString($string, new Integer(1));
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
 
30 30
     /**
31 31
      * @param string $value
32
-     * @param array $allowedTypes
33
-     * @param $minimum
34
-     * @param $maximum
32
+     * @param string[] $allowedTypes
33
+     * @param integer $minimum
34
+     * @param integer $maximum
35 35
      */
36 36
     public function __construct($value, $allowedTypes, $minimum, $maximum)
37 37
     {
Please login to merge, or discard this patch.