Completed
Push — master ( 93d90c...c7d4c1 )
by Andreas
08:37
created
src/api/mgdobject.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function __get($field)
82 82
     {
83
-        if (   $field === 'metadata'
83
+        if ($field === 'metadata'
84 84
             && $this->metadata === null
85 85
             && $this instanceof metadata_interface) {
86 86
             $this->metadata = new metadata($this);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         foreach ($candidates as $candidate) {
103 103
             if ($this->$candidate !== null) {
104 104
                 //Proxies become stale if the object itself is detached, so we have to re-fetch
105
-                if (   $this->$candidate instanceof Proxy
105
+                if ($this->$candidate instanceof Proxy
106 106
                     && $this->$candidate->__isInitialized()) {
107 107
                     try {
108 108
                         $this->$candidate->get_by_id($this->$candidate->id);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         }
131 131
         // According to Doctrine documentation, proxies should be transparent, but in practice,
132 132
         // there will be problems if we don't force-load
133
-        if (   $entity instanceof Proxy
133
+        if ($entity instanceof Proxy
134 134
             && !$entity->__isInitialized()) {
135 135
             try {
136 136
                 $entity->__load();
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             exception::duplicate();
184 184
             return false;
185 185
         }
186
-        if (   !$this->is_unique()
186
+        if (!$this->is_unique()
187 187
             || !$this->check_parent()) {
188 188
             return false;
189 189
         }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             midgard_connection::get_instance()->set_error(MGD_ERR_INVALID_PROPERTY_VALUE);
240 240
             return false;
241 241
         }
242
-        if (   $check_dependencies
242
+        if ($check_dependencies
243 243
             && $this->has_dependents()) {
244 244
             exception::has_dependants();
245 245
             return false;
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     {
331 331
         $this->initialize();
332 332
 
333
-        if (   empty($this->cm->midgard['parentfield'])
333
+        if (empty($this->cm->midgard['parentfield'])
334 334
             || empty($this->cm->midgard['parent'])) {
335 335
             return true;
336 336
         }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         $this->initialize();
348 348
 
349 349
         foreach ($this->cm->fieldMappings as $name => $field) {
350
-            if (   $field['midgard:midgard_type'] == translator::TYPE_GUID
350
+            if ($field['midgard:midgard_type'] == translator::TYPE_GUID
351 351
                 && !empty($this->$name)
352 352
                 && !mgd_is_guid($this->$name)) {
353 353
                 exception::invalid_property_value("'" . $name . "' property's value is not a guid.");
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 
360 360
     private function check_upfield()
361 361
     {
362
-        if (   !empty($this->id)
362
+        if (!empty($this->id)
363 363
             && !empty($this->cm->midgard['upfield'])
364 364
             && $this->__get($this->cm->midgard['upfield']) === $this->id) {
365 365
             exception::tree_is_circular();
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
             $stat = ($results > 0);
396 396
         }
397 397
 
398
-        if (   !$stat
398
+        if (!$stat
399 399
             && !empty($this->cm->midgard['childtypes'])) {
400 400
             foreach ($this->cm->midgard['childtypes'] as $typename => $parentfield) {
401 401
                 $qb = connection::get_em()->createQueryBuilder();
@@ -754,7 +754,7 @@  discard block
 block discarded – undo
754 754
             exception::not_exists();
755 755
             return false;
756 756
         }
757
-        if (   $check_dependencies
757
+        if ($check_dependencies
758 758
             && $this->has_dependents()) {
759 759
             exception::has_dependants();
760 760
             return false;
Please login to merge, or discard this patch.