Passed
Push — master ( 859454...486cab )
by Smoren
01:57
created
src/QueryRelationManager.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,29 +58,29 @@  discard block
 block discarded – undo
58 58
         /** @var ActiveRecord $inst */
59 59
         $inst = new $parentClassName();
60 60
         $methodName = 'get'.ucfirst($relationName);
61
-        if(!method_exists($inst, $methodName)) {
61
+        if (!method_exists($inst, $methodName)) {
62 62
             throw new QueryRelationManagerException("method {$parentClassName}::{$methodName}() not exists");
63 63
         }
64 64
 
65 65
         /** @var ActiveQuery $activeQuery */
66 66
         $activeQuery = $inst->$methodName();
67
-        if(!($activeQuery instanceof ActiveQuery)) {
67
+        if (!($activeQuery instanceof ActiveQuery)) {
68 68
             throw new QueryRelationManagerException(
69 69
                 "method {$parentClassName}::{$methodName}() returned non-ActiveQuery instance"
70 70
             );
71 71
         }
72 72
 
73
-        if($activeQuery->via) {
73
+        if ($activeQuery->via) {
74 74
             throw new QueryRelationManagerException('cannot use relations with "via" section yet');
75 75
         }
76
-        if(!is_array($activeQuery->link) || !count($activeQuery->link)) {
76
+        if (!is_array($activeQuery->link) || !count($activeQuery->link)) {
77 77
             throw new QueryRelationManagerException('cannot use relations without "link" section');
78 78
         }
79 79
 
80 80
         /** @var string $className */
81 81
         $className = $activeQuery->modelClass;
82 82
 
83
-        if($activeQuery->multiple) {
83
+        if ($activeQuery->multiple) {
84 84
             return $this->withMultiple(
85 85
                 $relationName,
86 86
                 $className,
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
      */
124 124
     protected static function checkClassIsActiveRecord(string $className)
125 125
     {
126
-        if(!class_exists($className)) {
126
+        if (!class_exists($className)) {
127 127
             throw new QueryRelationManagerException(
128 128
                 "class '{$className}' does not exist"
129 129
             );
130 130
         }
131 131
 
132
-        if(!(new $className() instanceof ActiveRecord)) {
132
+        if (!(new $className() instanceof ActiveRecord)) {
133 133
             throw new QueryRelationManagerException(
134 134
                 "class {$className} is not an instance of ActiveRecord"
135 135
             );
Please login to merge, or discard this patch.