| Conditions | 5 |
| Paths | 5 |
| Total Lines | 27 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function safeUp(): bool |
||
| 22 | { |
||
| 23 | $globalBundles = (new Query()) |
||
| 24 | ->from(['{{%seomatic_metabundles}}']) |
||
| 25 | ->where([ |
||
| 26 | 'sourceBundleType' => MetaBundles::GLOBAL_META_BUNDLE, |
||
| 27 | ]) |
||
| 28 | ->all(); |
||
| 29 | foreach ($globalBundles as $globalBundle) { |
||
| 30 | $metaContainers = Json::decodeIfJson($globalBundle['metaContainers']); |
||
| 31 | foreach ($metaContainers as $metaContainer) { |
||
| 32 | if ($metaContainer['class'] === MetaScriptContainer::class) { |
||
| 33 | $enabled = $metaContainer['data']['googleAnalytics']['include'] ?? null; |
||
| 34 | if ($enabled) { |
||
| 35 | Craft::$app->announcements->push( |
||
|
|
|||
| 36 | Translation::prep('seomatic', 'Google Universal Analytics deprecated', []), |
||
| 37 | Translation::prep('seomatic', 'Universal Analytics (which is used on this site via the SEOmatic plugin) is being [discontinued on July 1st, 2023]({url}). You should use Google gtag.js or Google Tag Manager instead and transition to a new GA4 property..', [ |
||
| 38 | 'url' => 'https://support.google.com/analytics/answer/11583528', |
||
| 39 | ]), |
||
| 40 | 'seomatic' |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | return true; |
||
| 48 | } |
||
| 59 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.