Completed
Push — master ( 0645aa...8fad21 )
by David
02:04
created
Subscriber/Frontend/PostDispatch.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             '_' . strtolower($args->getSubject()->Request()->getControllerName()) .
67 67
             '_' . strtolower($args->getSubject()->Request()->getActionName());
68 68
 
69
-        if($module == 'frontend_checkout_ajaxcart'){
69
+        if ($module == 'frontend_checkout_ajaxcart') {
70 70
             $module = 'frontend_checkout_' . strtolower($args->getSubject()->Request()->getParam('action'));
71 71
         }
72 72
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $propertyRepo = $this->container->get('models')->getRepository('WbmTagManager\Models\Property');
79 79
         $dataLayer = $propertyRepo->getChildrenList(0, $module, true);
80 80
 
81
-        if(!empty($dataLayer)) {
81
+        if (!empty($dataLayer)) {
82 82
             $this->viewVariables = $args->getSubject()->View()->getAssign();
83 83
 
84 84
             $dataLayer = $this->fillValues($dataLayer);
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
         $dataLayer = str_replace($search, $replace, $dataLayer);
102 102
 
103 103
         preg_match('/({"startArrayOf":".*?"},)/i', $dataLayer, $matches);
104
-        foreach($matches as $match){
104
+        foreach ($matches as $match) {
105 105
             $foreachObj = json_decode(rtrim($match, ','));
106
-            if($foreachObj->startArrayOf){
106
+            if ($foreachObj->startArrayOf) {
107 107
                 $arguments = explode(' as ', $foreachObj->startArrayOf);
108 108
                 $dataLayer = str_replace(
109 109
                     $match,
Please login to merge, or discard this patch.
Controllers/Backend/WbmTagManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
             $modules = $qb->getQuery()->getArrayResult();
38 38
 
39
-            foreach($modules as &$module){
39
+            foreach ($modules as &$module) {
40 40
                 $module['name'] = $this->container->get('snippets')
41 41
                     ->getNamespace("backend/plugins/wbm/tagmanager")
42 42
                     ->get($module['module']);
Please login to merge, or discard this patch.
Models/Repository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             ->setParameter(':moduleName', $module);
36 36
 
37 37
 
38
-        if($dataLayer){
38
+        if ($dataLayer) {
39 39
             $qb->select(
40 40
                 array(
41 41
                     'property.name',
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 unset($property['id']);
54 54
 
55 55
                 if (!empty($subProperties)) {
56
-                    if(empty($value)) {
56
+                    if (empty($value)) {
57 57
                         $property = $subProperties;
58 58
                     } else {
59 59
                         $property = array(
Please login to merge, or discard this patch.
Subscriber/Frontend/FilterRender.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,25 +58,25 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $source = $args->getReturn();
60 60
 
61
-        if(strpos($source, '<html') === false && !$this->container->get('front')->Request()->isXmlHttpRequest()) {
61
+        if (strpos($source, '<html') === false && !$this->container->get('front')->Request()->isXmlHttpRequest()) {
62 62
             return $source;
63 63
         }
64 64
 
65 65
         $containerId = $this->container->get('config')->getByNamespace('WbmTagManager', 'wbmTagManagerContainer');
66 66
         $prettyPrint = $this->container->get('config')->getByNamespace('WbmTagManager', 'wbmTagManagerJsonPrettyPrint');
67 67
 
68
-        if(
68
+        if (
69 69
             !empty($containerId) &&
70 70
             strtolower($this->container->get('front')->Request()->getModuleName()) != 'backend'
71 71
         ) {
72
-            if(!$this->container->get('front')->Request()->isXmlHttpRequest()) {
72
+            if (!$this->container->get('front')->Request()->isXmlHttpRequest()) {
73 73
                 $headTag = file_get_contents($this->container->getParameter('wbm_tag_manager.plugin_dir') . '/Resources/tags/head.html');
74 74
                 $bodyTag = file_get_contents($this->container->getParameter('wbm_tag_manager.plugin_dir') . '/Resources/tags/body.html');
75 75
 
76 76
                 $headTag = sprintf($headTag, $containerId);
77 77
                 $bodyTag = sprintf($bodyTag, $containerId);
78 78
 
79
-                if($dataLayer = $this->container->get('wbm_tag_manager.variables')->getVariables()) {
79
+                if ($dataLayer = $this->container->get('wbm_tag_manager.variables')->getVariables()) {
80 80
                     array_walk_recursive($dataLayer, array($this, 'castArrayValues'));
81 81
 
82 82
                     $headTag = "<script>window.dataLayer = window.dataLayer || []; window.dataLayer.push(" .
@@ -101,15 +101,15 @@  discard block
 block discarded – undo
101 101
                  */
102 102
                 $matches = preg_split('/(<body.*?>)/i', $source, 2, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
103 103
 
104
-                if(!empty($matches)) {
104
+                if (!empty($matches)) {
105 105
                     /* assemble the HTML output back with the iframe code in it */
106 106
                     $source = $matches[0] . $matches[1] . $bodyTag . $matches[2];
107 107
                 }
108
-            } else if($dataLayer = $this->container->get('wbm_tag_manager.variables')->getVariables()) {
108
+            } else if ($dataLayer = $this->container->get('wbm_tag_manager.variables')->getVariables()) {
109 109
                 array_walk_recursive($dataLayer, array($this, 'castArrayValues'));
110 110
 
111 111
                 $source = "<script>window.dataLayer.push(" .
112
-                    json_encode($dataLayer,($prettyPrint) ? JSON_PRETTY_PRINT : null) .
112
+                    json_encode($dataLayer, ($prettyPrint) ? JSON_PRETTY_PRINT : null) .
113 113
                     ");</script>" .
114 114
                     $source;
115 115
 
Please login to merge, or discard this patch.