Completed
Pull Request — master (#26)
by Lars
10:03
created
src/Intraface/modules/cms/Controller/TemplateSections.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
     function map($name)
5 5
     {
6 6
         if (is_numeric($name)) {
7
-             return 'Intraface_modules_cms_Controller_TemplateSectionEdit';
7
+                return 'Intraface_modules_cms_Controller_TemplateSectionEdit';
8 8
         } elseif ($name == 'create') {
9 9
             return 'Intraface_modules_cms_Controller_TemplateSectionEdit';
10 10
         }
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/Elements.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             'translation' => $this->getKernel()->getTranslation('cms')
56 56
         );
57 57
 
58
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/section-html-edit');
58
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/section-html-edit');
59 59
         return $tpl->render($this, $data);
60 60
     }
61 61
 
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
                 $redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
73 73
                 $module_filemanager = $this->getKernel()->useModule('filemanager');
74 74
                 if ($element->get('type') == 'picture') {
75
-                    return new k_SeeOther($this->url($element->get('id') . '/filehandler/selectfile', array('images' => 1)));
75
+                    return new k_SeeOther($this->url($element->get('id').'/filehandler/selectfile', array('images' => 1)));
76 76
                 } elseif ($element->get('type') == 'gallery') {
77
-                    return new k_SeeOther($this->url($element->get('id') . '/filehandler/selectfile', array('images' => 1, 'multiple_choice' => 'true')));
77
+                    return new k_SeeOther($this->url($element->get('id').'/filehandler/selectfile', array('images' => 1, 'multiple_choice' => 'true')));
78 78
                 } elseif ($element->get('type') == 'filelist') {
79
-                    return new k_SeeOther($this->url($element->get('id') . '/filehandler/selectfile', array('images' => 0, 'multiple_choice' => 'true')));
79
+                    return new k_SeeOther($this->url($element->get('id').'/filehandler/selectfile', array('images' => 0, 'multiple_choice' => 'true')));
80 80
                 } else {
81 81
                     throw new Exception("Det er ikke en gyldig elementtype til at lave redirect fra");
82 82
                 }
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/Element.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         } elseif ($this->getElement()->get('type') == 'filelist') {
43 43
             return $append_file = new AppendFile($this->getKernel(), 'cms_element_filelist', $this->getElement()->get('id'));
44 44
         } elseif ($this->getElement()->get('type') == 'picture') {
45
-             return new AppendFile($this->getKernel(), 'cms_element_picture', $this->getElement()->get('id'));
45
+                return new AppendFile($this->getKernel(), 'cms_element_picture', $this->getElement()->get('id'));
46 46
         }
47 47
         throw new Exception('No valid fileappender present');
48 48
     }
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
                 if ($element->get('type') == 'picture') {
122 122
                     return new k_SeeOther($this->url('filehandler/selectfile', array('images' => 1)));
123 123
                 } elseif ($element->get('type') == 'gallery') {
124
-                     return new k_SeeOther($this->url('filehandler/selectfile', array('images' => 1, 'multiple_choice' => 1)));
124
+                        return new k_SeeOther($this->url('filehandler/selectfile', array('images' => 1, 'multiple_choice' => 1)));
125 125
                 } elseif ($element->get('type') == 'filelist') {
126
-                     return new k_SeeOther($this->url('filehandler/selectfile', array('images' => 0, 'multiple_choice' => 1)));
126
+                        return new k_SeeOther($this->url('filehandler/selectfile', array('images' => 0, 'multiple_choice' => 1)));
127 127
                 } else {
128 128
                     throw new Exception("Det er ikke en gyldig elementtype til at lave redirect fra");
129 129
                 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             'translation' => $this->getKernel()->getTranslation('cms')
102 102
         );
103 103
 
104
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/section-html-edit');
104
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/section-html-edit');
105 105
         return $tpl->render($this, $data);
106 106
 
107 107
     }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             } elseif (!empty($_POST['close'])) {
132 132
                 return new k_SeeOther($this->url('../../'));
133 133
             } else {
134
-                return new k_SeeOther($this->url('../../element/' . $element->get('id')));
134
+                return new k_SeeOther($this->url('../../element/'.$element->get('id')));
135 135
             }
136 136
         } else {
137 137
             $value = $_POST;
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/Sections.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             'kernel' => $this->getKernel(),
53 53
             'error' => $this->error
54 54
         );
55
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/page');
55
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/page');
56 56
         return $tpl->render($this, $data);
57 57
     }
58 58
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 }
98 98
                 */
99 99
                 if (!$section->save($value)) {
100
-                    $this->error[$section->get('id')] = $this->t('error in section') . ' ' . strtolower(implode($section->error->message, ', '));
100
+                    $this->error[$section->get('id')] = $this->t('error in section').' '.strtolower(implode($section->error->message, ', '));
101 101
                 }
102 102
             }
103 103
         }
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
 
120 120
                 return new k_SeeOther($url);
121 121
                 */
122
-                return new k_SeeOther($this->url($section_id . '/filehandler/selectfile'));
122
+                return new k_SeeOther($this->url($section_id.'/filehandler/selectfile'));
123 123
             } elseif ($this->body('edit_html')) {
124 124
                 $keys = array_keys($_POST['edit_html']);
125 125
                 return new k_SeeOther($this->url($keys[0]));
126 126
             } elseif ($this->body('close')) {
127 127
                 return new k_SeeOther($this->url('../../', array('type' => $this->context->getModel()->get('type'), 'id' => $this->context->getModel()->cmssite->get('id'))));
128 128
             } else {
129
-                return new k_SeeOther($this->url('../../' . $this->context->getModel()->get('id')));
129
+                return new k_SeeOther($this->url('../../'.$this->context->getModel()->get('id')));
130 130
             }
131 131
         } else {
132 132
             $cmspage = $section->cmspage;
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/Index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             'sites' => $sites
32 32
         );
33 33
 
34
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/index');
34
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/index');
35 35
         return $tpl->render($this, $data);
36 36
     }
37 37
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             'cms_module' => $cms_module
51 51
         );
52 52
 
53
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/site-edit');
53
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/site-edit');
54 54
         return $tpl->render($this, $data);
55 55
     }
56 56
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/Navigation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         $webshop_module = $this->getKernel()->module('cms');
16 16
 
17
-        $this->document->setTitle('Navigation for ' . $this->getSite()->get('name'));
17
+        $this->document->setTitle('Navigation for '.$this->getSite()->get('name'));
18 18
 
19 19
         $data['categories'] = $this->getNavigationGateway()->findBySite($this->getSite());
20 20
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/HTML/Parser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 $element['extra_style'] = ' style="'.$element['extra_style'].'"';
40 40
             }
41 41
 
42
-            $function =  'parse'.$element['type'] . 'Element';
42
+            $function = 'parse'.$element['type'].'Element';
43 43
             $output = $this->$function($element);
44 44
 
45 45
             $display .= '<div id="element-'.$element['id'].'"'.$element['extra_class'].$element['extra_style'].'>';
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
             } else {
58 58
                 $display .= '       <li><a href="'.$_SERVER['PHP_SELF'].'?action=move&amp;element_id='.$element['id'].'&amp;id='.$element['section_id'].'">'.$this->translation->get('move').'</a></li>';
59 59
             }
60
-            $display .= '       <li><a class="confirm" href="' . $_SERVER['PHP_SELF'] . '?delete='.$element['id'].'">'.$this->translation->get('delete').'</a></li>';
60
+            $display .= '       <li><a class="confirm" href="'.$_SERVER['PHP_SELF'].'?delete='.$element['id'].'">'.$this->translation->get('delete').'</a></li>';
61 61
             $display .= '   </ul>';
62
-            $display .= '<div>' .           $output . '</div>';
62
+            $display .= '<div>'.$output.'</div>';
63 63
             $display .= '</div>';
64 64
         }
65 65
         return $display;
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/ListGateway.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     function findByContactId($contact_id)
17 17
     {
18 18
         $db = new DB_Sql;
19
-        $db->query('SELECT * FROM newsletter_subscriber WHERE contact_id = ' . $contact_id);
19
+        $db->query('SELECT * FROM newsletter_subscriber WHERE contact_id = '.$contact_id);
20 20
         $lists = array();
21 21
         while ($db->nextRecord()) {
22 22
             $lists[$db->f('list_id')]['list'] = $this->findById($db->f('list_id'));
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -13,6 +13,9 @@
 block discarded – undo
13 13
         return new NewsletterList($this->kernel, $id);
14 14
     }
15 15
 
16
+    /**
17
+     * @param string $contact_id
18
+     */
16 19
     function findByContactId($contact_id)
17 20
     {
18 21
         $db = new DB_Sql;
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Observer/OptinMail.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $data = array(
72 72
             'subject' => 'Bekræft tilmelding',
73 73
             'body' =>
74
-                $this->list->get('subscribe_message') . "\n\n" .
74
+                $this->list->get('subscribe_message')."\n\n".
75 75
                 "\n\nMed venlig hilsen\n".$this->list->get('sender_name'),
76 76
             'contact_id' => $subscriber->get('contact_id'),
77 77
             'from_email' => $this->list->get('reply_email'),
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         if ($email->queue()) {
88 88
             $db = new DB_Sql;
89
-            $db->query("UPDATE newsletter_subscriber SET date_optin_email_sent = NOW() WHERE id = " . $subscriber->get('id'));
89
+            $db->query("UPDATE newsletter_subscriber SET date_optin_email_sent = NOW() WHERE id = ".$subscriber->get('id'));
90 90
             return true;
91 91
         }
92 92
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     /**
19 19
      * Constructor
20 20
      *
21
-     * @param object $list Newsletter list
21
+     * @param FakeNewsletterList $list Newsletter list
22 22
      *
23 23
      * @return void
24 24
      */
Please login to merge, or discard this patch.