Completed
Push — master ( 48735e...1bc6cd )
by Mihail
02:17
created
src/Helper/HTML/Listing.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         // initialize new DOM model
32 32
         $dom = new Dom();
33 33
         // return DOM-HTML, build based on closures!
34
-        return $dom->{$elements['type']}(function () use ($dom, $elements) {
34
+        return $dom->{$elements['type']}(function() use ($dom, $elements) {
35 35
             // prepare output avg variable
36 36
             $itemHTML = null;
37 37
             // get active order level
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
             $item['menuProperty']['class'] = 'dropdown-menu';
72 72
         }
73 73
 
74
-        return $dom->li(function () use ($dom, $item) {
75
-            $dropdownLink = $dom->a(function () use ($dom, $item) {
76
-                return self::applyEscape($item['text'], $item['html'], $item['!secure']) . ' ' . $dom->span(function () {
74
+        return $dom->li(function() use ($dom, $item) {
75
+            $dropdownLink = $dom->a(function() use ($dom, $item) {
76
+                return self::applyEscape($item['text'], $item['html'], $item['!secure']).' '.$dom->span(function() {
77 77
                 }, ['class' => 'caret']);
78 78
             }, $item['dropdown']);
79 79
 
80
-            $dropdownElements = $dom->ul(function () use ($dom, $item) {
80
+            $dropdownElements = $dom->ul(function() use ($dom, $item) {
81 81
                 $resp = null;
82 82
                 foreach ($item['items'] as $obj) {
83 83
                     $resp .= self::buildLink($dom, $obj, false);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 return $resp;
86 86
             }, $item['menuProperty']);
87 87
 
88
-            return $dropdownLink . $dropdownElements;
88
+            return $dropdownLink.$dropdownElements;
89 89
         }, $item['property']);
90 90
     }
91 91
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     private static function buildText($dom, $item)
99 99
     {
100 100
         $text = self::applyEscape($item['text'], $item['html'], $item['!secure']);
101
-        return $dom->li(function () use ($text) {
101
+        return $dom->li(function() use ($text) {
102 102
             return $text;
103 103
         }, $item['property']);
104 104
     }
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
         $item['linkProperty']['href'] = self::convertLink($item['link']);
139 139
 
140 140
         // build output <li@params><a @params>@text</li>
141
-        return $dom->li(function () use ($dom, $text, $item) {
142
-            return $dom->a(function () use ($text) {
141
+        return $dom->li(function() use ($dom, $text, $item) {
142
+            return $dom->a(function() use ($text) {
143 143
                 return $text;
144 144
             }, $item['linkProperty']);
145 145
         }, $properties);
Please login to merge, or discard this patch.
src/Helper/HTML/Form/SelectField.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
         $options = $this->properties['options'];
37 37
         unset($this->properties['options']);
38 38
         if (!Any::isIterable($options)) {
39
-            throw new SyntaxException('Select field ' . self::nohtml($this->name) . ' have no iterable options');
39
+            throw new SyntaxException('Select field '.self::nohtml($this->name).' have no iterable options');
40 40
         }
41 41
         // value is not used there
42 42
         unset($this->properties['value']);
Please login to merge, or discard this patch.
src/Helper/HTML/Form/RadioField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         // get options from properties
41 41
         $options = $this->properties['options'];
42 42
         if (!Any::isIterable($options)) {
43
-            throw new SyntaxException('Radio field ' . self::nohtml($this->name) . ' have no iterable options');
43
+            throw new SyntaxException('Radio field '.self::nohtml($this->name).' have no iterable options');
44 44
         }
45 45
 
46 46
         unset($this->properties['options'], $this->properties['value']);
Please login to merge, or discard this patch.
src/Helper/HTML/Form/FieldSelector.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         // check if model has attribute
82 82
         if (!property_exists($this->model, $rootName)) {
83 83
             if (App::$Debug) {
84
-                App::$Debug->addMessage('Field "' . $name . '" (' . $field . ') is not defined in model: [' . get_class($this->model) . ']', 'error');
84
+                App::$Debug->addMessage('Field "'.$name.'" ('.$field.') is not defined in model: ['.get_class($this->model).']', 'error');
85 85
             }
86 86
 
87 87
             return null;
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
         // prepare default layer if not passed
91 91
         $layer = $this->findFieldLayer($field, $layer);
92 92
         // prepare html attributes, object value
93
-        $attr = $this->model->getFormName() . '-' . $rootName;
93
+        $attr = $this->model->getFormName().'-'.$rootName;
94 94
         $label = $this->model->getLabel($name);
95 95
         $value = $this->model->{$rootName};
96 96
         // check if dot-nested array used and update attr name
97 97
         if ($rootName !== $name) {
98 98
             $nesting = trim(strstr($name, '.'), '.');
99
-            $attr .= '-' . Str::replace('.', '-', $nesting);
99
+            $attr .= '-'.Str::replace('.', '-', $nesting);
100 100
             $value = Arr::getByPath($nesting, $value);
101 101
         }
102 102
 
Please login to merge, or discard this patch.
src/Helper/HTML/System/Dom.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
     {
94 94
         // looks like a single tag, <img src="" class="" />, <hr class="" />
95 95
         if (Arr::in($name, self::$singleTags)) {
96
-            return '<' . $name . self::applyProperties($properties) . ' />';
96
+            return '<'.$name.self::applyProperties($properties).' />';
97 97
         } elseif (Arr::in($name, self::$containerTags)) { // looks like a container tag, <div class=""></div>
98
-            return '<' . $name . self::applyProperties($properties) . '>' . $content . '</' . $name . '>';
98
+            return '<'.$name.self::applyProperties($properties).'>'.$content.'</'.$name.'>';
99 99
         }
100 100
 
101 101
         // empty response
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
             }
123 123
             // sounds like single standalone property, ex required, selected etc
124 124
             if ($value === null || $value === false) {
125
-                $build .= ' ' . htmlentities($property, ENT_QUOTES, "UTF-8");
125
+                $build .= ' '.htmlentities($property, ENT_QUOTES, "UTF-8");
126 126
             } else { // sounds like a classic key="value" property
127
-                $build .= ' ' . htmlentities($property, ENT_QUOTES, "UTF-8") . '="' . htmlentities($value, ENT_QUOTES, "UTF-8") . '"';
127
+                $build .= ' '.htmlentities($property, ENT_QUOTES, "UTF-8").'="'.htmlentities($value, ENT_QUOTES, "UTF-8").'"';
128 128
             }
129 129
         }
130 130
         return $build;
Please login to merge, or discard this patch.
src/Managers/CronManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             return false;
77 77
         }
78 78
 
79
-        $callback = (string)$class . '::' . (string)$method;
79
+        $callback = (string)$class.'::'.(string)$method;
80 80
 
81 81
         // add instance to cron task manager
82 82
         if (!isset($this->configs['instances'][$callback])) {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function remove($class, $method)
96 96
     {
97
-        $callback = $class . '::' . $method;
97
+        $callback = $class.'::'.$method;
98 98
         if (isset($this->configs['instances'][$callback])) {
99 99
             unset($this->configs['instances'][$callback], $this->configs['log'][$callback]);
100 100
             App::$Properties->writeConfig('Cron', $this->configs);
Please login to merge, or discard this patch.