Passed
Push — develop ( 86ca6f...0e6a78 )
by Mathias
22:00 queued 14:21
created
module/Core/src/View/Helper/SocialButtons.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function __invoke()
44 44
     {
45
-        $SocialNetworksEnabled=[];
45
+        $SocialNetworksEnabled = [];
46 46
         foreach ($this->config['hybridauth'] as $key => $val) {
47 47
             if ($val['enabled'] and in_array(strtolower($key), $this->options->getEnableLogins())) {
48 48
                 $SocialNetworksEnabled[strtolower($key)] = $key;
Please login to merge, or discard this patch.
module/Core/src/View/Helper/Rating.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@
 block discarded – undo
67 67
         
68 68
         $output = '<div class="br-widget br-readonly '
69 69
                 . ('compact' == $mode ? ' br-compact' : '')
70
-                . '" title="' . $this->getView()->translate(self::$ratingValueMap[$rating]) . '">';
71
-        for ($i=1; $i<6; $i++) {
70
+                . '" title="'.$this->getView()->translate(self::$ratingValueMap[$rating]).'">';
71
+        for ($i = 1; $i < 6; $i++) {
72 72
             $class = $i <= $rating ? 'br-selected' : '';
73 73
             $class .= $i == $rating ? ' br-current' : '';
74 74
             
75
-            $output .= '<a class="' . $class . '"></a>';
75
+            $output .= '<a class="'.$class.'"></a>';
76 76
         }
77 77
         $output .= '</div>';
78 78
         
Please login to merge, or discard this patch.
module/Core/src/View/Helper/Link.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                        : '';
59 59
         
60 60
         if (false !== strpos($urlOrEmail, '@')) {
61
-            $urlOrEmail = 'mailto:' . $urlOrEmail;
61
+            $urlOrEmail = 'mailto:'.$urlOrEmail;
62 62
         }
63 63
         
64 64
         return sprintf('<a %s href="%s">%s</a>', $attributesStr, $urlOrEmail, $label);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $attr       = array();
74 74
         
75 75
         foreach ($attributes as $name => $value) {
76
-            $attr[] = $escape($name) . '="' . $escapeAttr($value) . '"';
76
+            $attr[] = $escape($name).'="'.$escapeAttr($value).'"';
77 77
         }
78 78
         
79 79
         return implode(' ', $attr);
Please login to merge, or discard this patch.
module/Core/src/View/Helper/LanguageSwitcher.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 {
29 29
 
30 30
     /**
31
-    * @var string
32
-    */
31
+     * @var string
32
+     */
33 33
     protected $partial = 'partial/language-switcher';
34 34
 
35 35
     /**
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
     {
42 42
 
43 43
         $options = array_merge([
44
-                                   'partial' => $this->partial,
45
-                               ], $options);
44
+                                    'partial' => $this->partial,
45
+                                ], $options);
46 46
 
47 47
         $view = $this->view;
48 48
         $partial = $options['partial'];
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $partial = $options['partial'];
49 49
 
50 50
 
51
-        $variables=[];
51
+        $variables = [];
52 52
 
53 53
         return $view->partial($partial, $variables);
54 54
     }
Please login to merge, or discard this patch.
module/Core/src/View/Helper/Salutation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function __invoke($gender)
24 24
     {
25
-        $return="";
25
+        $return = "";
26 26
         switch ($gender) {
27 27
             case "male":
28 28
                 $return = "Mr.";
Please login to merge, or discard this patch.
module/Core/src/View/Helper/Period.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
         // calculate EndDate - StartDate = X Years.
26 26
         // eg. 4.2 Years
27 27
         
28
-        $days=0;
28
+        $days = 0;
29 29
         foreach ($array as $obj) {
30 30
             $date1 = new \DateTime($obj->getEndDate());
31 31
             $date2 = new \DateTime($obj->getStartDate());
32 32
             $interval = $date1->diff($date2);
33
-            $days+=abs($interval->format('%R%a'));
33
+            $days += abs($interval->format('%R%a'));
34 34
         }
35
-        return round($days/365, 1);
35
+        return round($days / 365, 1);
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
module/Core/src/View/Helper/AjaxUrl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function __construct($basePath = '')
51 51
     {
52
-        $this->basePath = rtrim($basePath, '/') . '/';
52
+        $this->basePath = rtrim($basePath, '/').'/';
53 53
     }
54 54
 
55 55
     /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function __invoke($name, array $params = [])
65 65
     {
66 66
         if (is_array($name)) {
67
-            if (!isset($name[ 'ajax' ])) {
67
+            if (!isset($name['ajax'])) {
68 68
                 throw new \InvalidArgumentException('Key "ajax" is required when passing array as first argument.');
69 69
             }
70 70
             $params = $name;
Please login to merge, or discard this patch.
module/Core/src/View/Helper/Snippet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $snippets = ArrayUtils::merge($this->fromConfig($name), $this->fromEvent($name, $values));
62 62
 
63
-        uasort($snippets, function ($a, $b) {
63
+        uasort($snippets, function($a, $b) {
64 64
             $prioA = is_array($a) && isset($a['priority']) ? $a['priority'] : 0;
65 65
             $prioB = is_array($b) && isset($b['priority']) ? $b['priority'] : 0;
66 66
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     private function fromEvent($name, $values)
90 90
     {
91
-        $event  = $this->events->getEvent($name, $this, $values);
91
+        $event = $this->events->getEvent($name, $this, $values);
92 92
         $results = $this->events->triggerEvent($event);
93 93
 
94 94
         $snippets = [];
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             $content = $item['content'];
138 138
 
139 139
             foreach ($values as $key => $val) {
140
-                $content = str_replace('%' . $key . '%', $val, $content);
140
+                $content = str_replace('%'.$key.'%', $val, $content);
141 141
             }
142 142
 
143 143
             return $content;
Please login to merge, or discard this patch.
module/Core/src/View/Helper/Alert.php 2 patches
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,6 @@  discard block
 block discarded – undo
52 52
  * @method warning()
53 53
  * @method success()
54 54
  * @method danger()
55
-
56 55
  *
57 56
 *@author Mathias Gelhausen <[email protected]>
58 57
  */
@@ -149,7 +148,7 @@  discard block
 block discarded – undo
149 148
         ) {
150 149
             $class .= ' alert-dismissable';
151 150
             $content = '<button type="button" class="close" data-dismiss="alert">&times;</button>'
152
-                     . '<span class="notification-content">' . $content . '</span>';
151
+                        . '<span class="notification-content">' . $content . '</span>';
153 152
         }
154 153
 
155 154
         $target = array_key_exists('target', $options)?' target="' . $options['target'] . '"':'';
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -142,18 +142,18 @@  discard block
 block discarded – undo
142 142
             return $this->start($type, $options);
143 143
         }
144 144
 
145
-        $id    = isset($options['id']) ? ' id="' . $options['id'] . '"' : '';
146
-        $class = isset($options['class']) ? ' ' . $options['class'] : '';
145
+        $id    = isset($options['id']) ? ' id="'.$options['id'].'"' : '';
146
+        $class = isset($options['class']) ? ' '.$options['class'] : '';
147 147
         if ((isset($options['dismissable']) && $options['dismissable'])
148 148
             || !isset($options['dismissable'])
149 149
         ) {
150 150
             $class .= ' alert-dismissable';
151 151
             $content = '<button type="button" class="close" data-dismiss="alert">&times;</button>'
152
-                     . '<span class="notification-content">' . $content . '</span>';
152
+                     . '<span class="notification-content">'.$content.'</span>';
153 153
         }
154 154
 
155
-        $target = array_key_exists('target', $options)?' target="' . $options['target'] . '"':'';
156
-        $markup = '<div ' . $id . ' class="alert alert-' . $type . $class . '" ' . $target . '>' . $content . '</div>' . PHP_EOL;
155
+        $target = array_key_exists('target', $options) ? ' target="'.$options['target'].'"' : '';
156
+        $markup = '<div '.$id.' class="alert alert-'.$type.$class.'" '.$target.'>'.$content.'</div>'.PHP_EOL;
157 157
         return $markup;
158 158
     }
159 159
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     public function __call($method, $args)
192 192
     {
193 193
         if (!in_array($method, array(self::TYPE_INFO, self::TYPE_DANGER, self::TYPE_SUCCESS, self::TYPE_WARNING))) {
194
-            throw new \BadMethodCallException('Unknown method: ' . $method);
194
+            throw new \BadMethodCallException('Unknown method: '.$method);
195 195
         }
196 196
 
197 197
         // We know that $method is one of the valid types, so we can safely use it as "type"-parameter for the
Please login to merge, or discard this patch.