@@ -21,9 +21,9 @@ discard block |
||
| 21 | 21 | // NB. |
| 22 | 22 | // if the dataobject has the versioned extension then the cache should be invalidated onAfterPublish |
| 23 | 23 | // hasStages function is part of the Versioned class so safe to check here |
| 24 | - if (! $owner->hasExtension(Versioned::class)) { |
|
| 24 | + if (!$owner->hasExtension(Versioned::class)) { |
|
| 25 | 25 | $this->doUpdateCache(); |
| 26 | - } elseif (! $owner->hasStages()) { |
|
| 26 | + } elseif (!$owner->hasStages()) { |
|
| 27 | 27 | $this->doUpdateCache(); |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -95,6 +95,6 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | $excludedClasses = (array) Config::inst()->get(self::class, 'excluded_classes_for_caching'); |
| 97 | 97 | |
| 98 | - return ! in_array($className, $excludedClasses, true); |
|
| 98 | + return !in_array($className, $excludedClasses, true); |
|
| 99 | 99 | } |
| 100 | 100 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | if ($owner->hasMethod('canCachePage')) { |
| 51 | 51 | // if it can cache the page, then it the cache string will remain empty. |
| 52 | 52 | $canCache = $owner->canCachePage(); |
| 53 | - self::$_can_cache_content_string .= $canCache ? '' : $this->getRandomKey(); |
|
| 53 | + self::$_can_cache_content_string .= $canCache ? '' : $this->getRandomKey(); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | //action |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | if ($requestVars) { |
| 77 | 77 | $canCache = false; |
| 78 | 78 | foreach ($requestVars as $key => $item) { |
| 79 | - if (! $item) { |
|
| 79 | + if (!$item) { |
|
| 80 | 80 | $item = ''; |
| 81 | 81 | } |
| 82 | 82 | self::$_can_cache_content_string .= serialize($key . '_' . serialize($item)); |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | } |
| 138 | 138 | if ($obj->RecordCacheUpdates) { |
| 139 | 139 | $recordId = Injector::inst() |
| 140 | - ->create(ObjectsUpdated::class, ['ClassNameLastEdited' => $className]) |
|
| 140 | + ->create(ObjectsUpdated::class, [ 'ClassNameLastEdited' => $className ]) |
|
| 141 | 141 | ->write(); |
| 142 | 142 | DB::query('DELETE FROM ObjectsUpdated WHERE ID < ' . (int) ($recordId - self::MAX_OBJECTS_UPDATED)); |
| 143 | 143 | } |
@@ -23,9 +23,9 @@ |
||
| 23 | 23 | ORDER BY "ClassNameLastEdited" ASC |
| 24 | 24 | '); |
| 25 | 25 | foreach ($query as $row) { |
| 26 | - $array[$row['ClassNameLastEdited']] = |
|
| 27 | - Injector::inst()->get($row['ClassNameLastEdited'])->i18n_singular_name() . |
|
| 28 | - ' (' . $row['Count'] . ')'; |
|
| 26 | + $array[ $row[ 'ClassNameLastEdited' ] ] = |
|
| 27 | + Injector::inst()->get($row[ 'ClassNameLastEdited' ])->i18n_singular_name() . |
|
| 28 | + ' (' . $row[ 'Count' ] . ')'; |
|
| 29 | 29 | } |
| 30 | 30 | return implode(', ', $array); |
| 31 | 31 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | ), |
| 37 | 37 | ] |
| 38 | 38 | ); |
| 39 | - if (! (bool) $owner->NeverCachePublicly) { |
|
| 39 | + if (!(bool) $owner->NeverCachePublicly) { |
|
| 40 | 40 | $fields->addFieldsToTab( |
| 41 | 41 | 'Root.Cache', |
| 42 | 42 | [ |