Passed
Pull Request — master (#84)
by kenny
02:05
created
src/Validator/PhotoAttachmentsValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function checkHasRatio(string $ratio, bool $throwException = false)
16 16
     {
17 17
         foreach ($this->value as $item) {
18
-            if (! empty($item->offsetGet('ratio'))
18
+            if (!empty($item->offsetGet('ratio'))
19 19
                 && $item->offsetGet('ratio') === $ratio
20 20
             ) {
21 21
                 return $this;
Please login to merge, or discard this patch.
src/Validator/AbstractValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function __construct($value = null, $errorMessage = null)
25 25
     {
26
-        if (! empty($value)) {
26
+        if (!empty($value)) {
27 27
             $this->value = $value;
28 28
         }
29
-        if (! empty($value)) {
29
+        if (!empty($value)) {
30 30
             $this->errorMessage = $errorMessage;
31 31
         }
32 32
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function setErrorMessage($errorMessage = null): self
64 64
     {
65
-        if (! empty($errorMessage) && is_string($errorMessage)) {
65
+        if (!empty($errorMessage) && is_string($errorMessage)) {
66 66
             $this->errorMessage = $errorMessage;
67 67
             return $this;
68 68
         }
Please login to merge, or discard this patch.
src/Publisher.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 if ($field === Article::ATTACHMENT_FIELD_PHOTO) {
137 137
                     $this->validator->setValue($article->getAttachmentByField($field));
138 138
                     $this->validator->checkHasRatio(Photo::RATIO_VERTICAL);
139
-                    if (! $this->validator->validate()) {
139
+                    if (!$this->validator->validate()) {
140 140
                         return [
141 141
                             'error_message' => $this->validator->getErrorMessage(),
142 142
                         ];
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     {
204 204
         $articleOnRest = $this->getArticle($idArticle);
205 205
 
206
-        if (! empty($articleOnRest)) {
206
+        if (!empty($articleOnRest)) {
207 207
             $articleOnRest = json_decode($articleOnRest, true);
208 208
 
209 209
             if (isset($articleOnRest['data'])) {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
      */
509 509
     private function hasValidator(string $validatorType = ''): bool
510 510
     {
511
-        return ! empty($this->validator)
511
+        return !empty($this->validator)
512 512
             &&
513 513
             is_a($this->validator, $validatorType);
514 514
     }
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
     private function createValidator(string $validatorType = ''): void
521 521
     {
522 522
         if ($validatorType === self::PHOTO_ATTACHMENT_VALIDATOR) {
523
-            if (! $this->hasValidator($validatorType)) {
523
+            if (!$this->hasValidator($validatorType)) {
524 524
                 $this->validator = new PhotoAttachmentsValidator();
525 525
             }
526 526
         } else {
Please login to merge, or discard this patch.