Completed
Push — master ( 369074...107854 )
by Neomerx
11:00
created
src/Validation/JsonApi/DataParser.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -242,12 +242,11 @@  discard block
 block discarded – undo
242 242
             $this->executeStarts($this->getSerializer()::readRuleStartIndexes($ruleIndexes));
243 243
             $ruleIndex = $this->getSerializer()::readRuleIndex($ruleIndexes);
244 244
             $isFoundInToOne === true ?
245
-                $this->validateAsToOneRelationship($ruleIndex, $name, $jsonData) :
246
-                $this->validateAsToManyRelationship($ruleIndex, $name, $jsonData);
245
+                $this->validateAsToOneRelationship($ruleIndex, $name, $jsonData) : $this->validateAsToManyRelationship($ruleIndex, $name, $jsonData);
247 246
             $this->executeEnds($this->getSerializer()::readRuleEndIndexes($ruleIndexes));
248 247
 
249 248
             if (count($this->getErrorAggregator()) > 0) {
250
-                $status  = JsonApiResponse::HTTP_CONFLICT;
249
+                $status = JsonApiResponse::HTTP_CONFLICT;
251 250
                 foreach ($this->getErrorAggregator()->get() as $error) {
252 251
                     $this->getJsonApiErrorCollection()->addValidationRelationshipError($error, $status);
253 252
                     $this->addErrorStatus($status);
@@ -362,7 +361,7 @@  discard block
 block discarded – undo
362 361
 
363 362
         if (count($this->getErrorAggregator()) > 0) {
364 363
             $title = $this->formatMessage(ErrorCodes::INVALID_VALUE);
365
-            $status  = JsonApiResponse::HTTP_CONFLICT;
364
+            $status = JsonApiResponse::HTTP_CONFLICT;
366 365
             foreach ($this->getErrorAggregator()->get() as $error) {
367 366
                 $details = $this->getMessage($error);
368 367
                 $this->getJsonApiErrorCollection()->addDataTypeError($title, $details, $status);
@@ -453,7 +452,7 @@  discard block
 block discarded – undo
453 452
         $this->executeEnds($this->getSerializer()::readRulesEndIndexes($this->getAttributeRules()));
454 453
 
455 454
         if (count($this->getErrorAggregator()) > 0) {
456
-            $status  = JsonApiResponse::HTTP_UNPROCESSABLE_ENTITY;
455
+            $status = JsonApiResponse::HTTP_UNPROCESSABLE_ENTITY;
457 456
             foreach ($this->getErrorAggregator()->get() as $error) {
458 457
                 $this->getJsonApiErrorCollection()->addValidationAttributeError($error, $status);
459 458
             }
@@ -520,7 +519,7 @@  discard block
 block discarded – undo
520 519
         ));
521 520
 
522 521
         if (count($this->getErrorAggregator()) > 0) {
523
-            $status  = JsonApiResponse::HTTP_CONFLICT;
522
+            $status = JsonApiResponse::HTTP_CONFLICT;
524 523
             foreach ($this->getErrorAggregator()->get() as $error) {
525 524
                 $this->getJsonApiErrorCollection()->addValidationRelationshipError($error, $status);
526 525
             }
Please login to merge, or discard this patch.