Passed
Push — master ( e32a81...12baf4 )
by Antonio Carlos
02:26
created
src/Checkers/Base.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $dir = dirname($fileName);
57 57
 
58
-        if (! file_exists($dir)) {
58
+        if (!file_exists($dir)) {
59 59
             mkdir($dir, 0775, true);
60 60
         }
61 61
     }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function load()
144 144
     {
145
-        if (! file_exists($file = $this->getFileName())) {
145
+        if (!file_exists($file = $this->getFileName())) {
146 146
             return collect();
147 147
         }
148 148
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $data = $this->database->toArray();
161 161
         }
162 162
 
163
-        if (! is_array($data)) {
163
+        if (!is_array($data)) {
164 164
             $data = $data->toArray();
165 165
         }
166 166
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * Create base directory for files.
35 35
      *
36
-     * @param $fileName
36
+     * @param string $fileName
37 37
      */
38 38
     protected function makeDir($fileName)
39 39
     {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     /**
70 70
      * Make a result from an exception.
71 71
      *
72
-     * @param $exception
72
+     * @param \Exception $exception
73 73
      * @return Result
74 74
      */
75 75
     protected function makeResultFromException($exception)
Please login to merge, or discard this patch.
src/Checkers/DirectoryAndFilePresence.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
         $messages = [];
56 56
 
57 57
         $result = collect($this->getFiles())
58
-            ->map(function ($files, $type) use (&$messages) {
58
+            ->map(function($files, $type) use (&$messages) {
59 59
                 $isGood = true;
60 60
 
61 61
                 $files = collect($files);
62 62
 
63 63
                 foreach ($files as $file) {
64
-                    if (! is_null($file)) {
64
+                    if (!is_null($file)) {
65 65
                         foreach ($this->getCheckers($type) as $checker) {
66 66
                             if (is_string($message = $checker($file))) {
67 67
                                 $messages[] = $message;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
                 return $isGood;
75 75
             })
76
-            ->filter(function ($value) {
76
+            ->filter(function($value) {
77 77
                 return $value === false;
78 78
             });
79 79
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function buildFileExistsChecker()
99 99
     {
100
-        return function ($file) {
100
+        return function($file) {
101 101
             return $this->fileExists($file);
102 102
         };
103 103
     }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function buildFileDoesNotExistsChecker()
111 111
     {
112
-        return function ($file) {
112
+        return function($file) {
113 113
             return $this->fileDoesNotExists($file);
114 114
         };
115 115
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function buildIsDirectoryChecker()
123 123
     {
124
-        return function ($file) {
124
+        return function($file) {
125 125
             return $this->isDirectory($file);
126 126
         };
127 127
     }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function fileDoesNotExists($file)
178 178
     {
179
-        if (! file_exists($file)) {
179
+        if (!file_exists($file)) {
180 180
             return true;
181 181
         }
182 182
 
Please login to merge, or discard this patch.
src/Checkers/Expression.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@
 block discarded – undo
35 35
         return preg_match("|{$this->target->shouldReturn}|", $expressionResult);
36 36
     }
37 37
 
38
+    /**
39
+     * @return string
40
+     */
38 41
     public function executeExpression($expression)
39 42
     {
40 43
         return eval("return {$expression} ;");
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         }
30 30
 
31 31
         if ($this->target->shouldReturn === false) {
32
-            return ! $expressionResult;
32
+            return !$expressionResult;
33 33
         }
34 34
 
35 35
         return preg_match("|{$this->target->shouldReturn}|", $expressionResult);
Please login to merge, or discard this patch.
src/Support/Target.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,6 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     /**
39 39
      * @param \Exception|\Throwable
40
+     * @param \Throwable $exception
40 41
      */
41 42
     protected function exceptionResult($exception)
42 43
     {
@@ -49,7 +50,7 @@  discard block
 block discarded – undo
49 50
     /**
50 51
      * Target factory.
51 52
      *
52
-     * @param $resource
53
+     * @param Resource $resource
53 54
      * @param $data
54 55
      * @return Target
55 56
      */
@@ -172,7 +173,7 @@  discard block
 block discarded – undo
172 173
     /**
173 174
      * Get result error message.
174 175
      *
175
-     * @return mixed
176
+     * @return null|string
176 177
      */
177 178
     public function getErrorMessage()
178 179
     {
Please login to merge, or discard this patch.
src/database/migrations/2018_09_09_000001_create_table_health_checks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('health_checks', function (Blueprint $table) {
15
+        Schema::create('health_checks', function(Blueprint $table) {
16 16
             $table->increments('id');
17 17
 
18 18
             $table->string('resource_name');
Please login to merge, or discard this patch.
src/Checkers/Mail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     private function sendMail()
71 71
     {
72
-        IlluminateMail::send($this->target->view, [], function ($message) {
72
+        IlluminateMail::send($this->target->view, [], function($message) {
73 73
             $fromAddress = array_get($this->target->config, 'from.address');
74 74
 
75 75
             $message->returnPath($fromAddress);
Please login to merge, or discard this patch.
src/Support/Traits/ImportProperties.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
      */
12 12
     public function importProperties($data)
13 13
     {
14
-        $data->each(function ($value, $key) {
14
+        $data->each(function($value, $key) {
15 15
             $key = camel_case($key);
16 16
 
17
-            if (! property_exists($this, $key)) {
17
+            if (!property_exists($this, $key)) {
18 18
                 $this->$key = $value;
19 19
             }
20 20
         });
Please login to merge, or discard this patch.
src/Checkers/ServerLoad.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             $current['load_5'] > $this->target->maxLoad['load_5'] ||
21 21
             $current['load_15'] > $this->target->maxLoad['load_15'];
22 22
 
23
-        return $this->makeResult(! $inTrouble, $this->makeMessage($current));
23
+        return $this->makeResult(!$inTrouble, $this->makeMessage($current));
24 24
     }
25 25
 
26 26
     protected function makeMessage($current, $saved = null)
Please login to merge, or discard this patch.
src/Checkers/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
     protected function findFirstModel()
35 35
     {
36
-        collect($this->target->models)->each(function ($model) {
36
+        collect($this->target->models)->each(function($model) {
37 37
             instantiate($model)->first();
38 38
         });
39 39
 
Please login to merge, or discard this patch.