Completed
Push — master ( 439fa7...a65061 )
by Thierry
29s queued 12s
created
src/Utils/Pagination/Paginator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
     }
162 162
 
163 163
     /**
164
-     * @return string
164
+     * @return Request
165 165
      */
166 166
     public function getRequest()
167 167
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     protected function updateNumPages()
67 67
     {
68
-        $this->numPages = ($this->itemsPerPage == 0 ? 0 : (int) ceil($this->totalItems/$this->itemsPerPage));
68
+        $this->numPages = ($this->itemsPerPage == 0 ? 0 : (int)ceil($this->totalItems / $this->itemsPerPage));
69 69
     }
70 70
 
71 71
     /**
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
         else
274 274
         {
275 275
             // Determine the sliding range, centered around the current page.
276
-            $numAdjacents = (int) floor(($this->maxPagesToShow - 4) / 2);
276
+            $numAdjacents = (int)floor(($this->maxPagesToShow - 4) / 2);
277 277
 
278 278
             $slidingStart = 1;
279 279
             $slidingEndOffset = $numAdjacents + 3 - $this->currentPage;
Please login to merge, or discard this patch.
src/Utils/Translation/Translator.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
         }
122 122
         if(!array_key_exists($sLanguage, $this->aTranslations) || !array_key_exists($sText, $this->aTranslations[$sLanguage]))
123 123
         {
124
-           return $sText;
124
+            return $sText;
125 125
         }
126 126
         $message = $this->aTranslations[$sLanguage][$sText];
127 127
         foreach($aPlaceHolders as $name => $value)
Please login to merge, or discard this patch.
src/Request/Plugin/FileUpload.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@
 block discarded – undo
217 217
             $aFiles[$sVarName] = [];
218 218
             foreach($aUserFiles as $aUserFile)
219 219
             {
220
-                 $aFiles[$sVarName][] = $aUserFile->toTempData();
220
+                    $aFiles[$sVarName][] = $aUserFile->toTempData();
221 221
             }
222 222
         }
223 223
         // Save upload data in a temp file
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use Jaxon\Plugin\Request as RequestPlugin;
17 17
 use Jaxon\Request\Support\UploadedFile;
18 18
 use Jaxon\Response\UploadResponse;
19
-
20 19
 use Exception;
21 20
 use Closure;
22 21
 
Please login to merge, or discard this patch.
src/Request/Factory/Request.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      * @param integer       $nItemsPerPage          The number of items per page page
240 240
      * @param integer       $nItemsTotal            The total number of items
241 241
      *
242
-     * @return Paginator
242
+     * @return \Jaxon\Utils\Pagination\Paginator
243 243
      */
244 244
     public function pg($nCurrentPage, $nItemsPerPage, $nItemsTotal)
245 245
     {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      * @param integer       $nItemsPerPage          The number of items per page page
255 255
      * @param integer       $nItemsTotal            The total number of items
256 256
      *
257
-     * @return Paginator
257
+     * @return \Jaxon\Utils\Pagination\Paginator
258 258
      */
259 259
     public function paginate($nCurrentPage, $nItemsPerPage, $nItemsTotal)
260 260
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 
21 21
 namespace Jaxon\Request\Factory;
22 22
 
23
-use JsonSerializable;
24 23
 use Jaxon\Request\Factory\Parameter;
25 24
 use Jaxon\Request\Factory\Contracts\Parameter as ParameterContract;
26 25
 use Jaxon\Response\Plugin\JQuery\Dom\Element as DomElement;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
      */
94 94
     private function setMessageArgs(array $aArgs)
95 95
     {
96
-        array_walk($aArgs, function (&$xParameter) {
96
+        array_walk($aArgs, function(&$xParameter) {
97 97
             $xParameter = Parameter::make($xParameter);
98 98
         });
99 99
         $this->aMessageArgs = $aArgs;
Please login to merge, or discard this patch.
src/Request/Factory/RequestFactory.php 2 patches
Doc Comments   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      *
54 54
      * @param string|null       $sClass              The callable class
55 55
      *
56
-     * @return Factory
56
+     * @return RequestFactory
57 57
      */
58 58
     public function setClassName($sClass)
59 59
     {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      *
81 81
      * @param CallableObject    $xCallable              The callable object
82 82
      *
83
-     * @return Factory
83
+     * @return RequestFactory
84 84
      */
85 85
     public function setCallable(CallableObject $xCallable)
86 86
     {
@@ -93,7 +93,6 @@  discard block
 block discarded – undo
93 93
      * Return the javascript call to a Jaxon function or object method
94 94
      *
95 95
      * @param string            $sFunction          The function or method (without class) name
96
-     * @param ...               $xParams            The parameters of the function or method
97 96
      *
98 97
      * @return Request
99 98
      */
@@ -122,7 +121,6 @@  discard block
 block discarded – undo
122 121
      * Return the javascript call to a generic function
123 122
      *
124 123
      * @param string            $sFunction          The function or method (with class) name
125
-     * @param ...               $xParams            The parameters of the function or method
126 124
      *
127 125
      * @return Request
128 126
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 
18 18
 use Jaxon\Request\Support\CallableObject;
19 19
 use Jaxon\Request\Support\CallableRepository;
20
-use Jaxon\Utils\Pagination\Paginator;
21 20
 
22 21
 // Extends Parameter for compatibility with older versions (see function rq())
23 22
 class RequestFactory
Please login to merge, or discard this patch.
src/Request/Handler/Argument.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
      *
153 153
      * @param string        $sArg                The Jaxon request argument
154 154
      *
155
-     * @return mixed
155
+     * @return string|null
156 156
      */
157 157
     private function __argumentDecode(&$sArg)
158 158
     {
Please login to merge, or discard this patch.
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -131,19 +131,19 @@
 block discarded – undo
131 131
         $sValue = substr($sValue, 1);
132 132
         switch ($cType)
133 133
         {
134
-            case 'S':
135
-                $value = ($sValue === false ? '' : $sValue);
136
-                break;
137
-            case 'B':
138
-                $value = $this->__convertStringToBool($sValue);
139
-                break;
140
-            case 'N':
141
-                $value = ($sValue == floor($sValue) ? (int)$sValue : (float)$sValue);
142
-                break;
143
-            case '*':
144
-            default:
145
-                $value = null;
146
-                break;
134
+        case 'S':
135
+            $value = ($sValue === false ? '' : $sValue);
136
+            break;
137
+        case 'B':
138
+            $value = $this->__convertStringToBool($sValue);
139
+            break;
140
+        case 'N':
141
+            $value = ($sValue == floor($sValue) ? (int)$sValue : (float)$sValue);
142
+            break;
143
+        case '*':
144
+        default:
145
+            $value = null;
146
+            break;
147 147
         }
148 148
         return $value;
149 149
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
     {
134 134
         $cType = substr($sValue, 0, 1);
135 135
         $sValue = substr($sValue, 1);
136
-        switch ($cType)
136
+        switch($cType)
137 137
         {
138 138
             case 'S':
139 139
                 $value = ($sValue === false ? '' : $sValue);
Please login to merge, or discard this patch.
src/Request/Plugin/CallableFunction.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
      * @param string        $sCallableFunction  The name of the function being registered
91 91
      * @param array|string  $aOptions       The associated options
92 92
      *
93
-     * @return \Jaxon\Request\Request
93
+     * @return boolean
94 94
      */
95 95
     public function register($sType, $sCallableFunction, $aOptions)
96 96
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
         }
128 128
 
129 129
         $this->aFunctions[$sFunctionName] = $aOptions;
130
-        jaxon()->di()->set($sFunctionName, function () use ($sFunctionName, $sCallableFunction) {
130
+        jaxon()->di()->set($sFunctionName, function() use ($sFunctionName, $sCallableFunction) {
131 131
             $xCallableFunction = new \Jaxon\Request\Support\CallableFunction($sCallableFunction);
132 132
 
133 133
             $aOptions = $this->aFunctions[$sFunctionName];
Please login to merge, or discard this patch.
src/CallableClass.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
         return jaxon()->instance($name);
95 95
     }
96 96
 
97
-   /**
97
+    /**
98 98
      * Get the uploaded files
99 99
      *
100 100
      * @return array
Please login to merge, or discard this patch.
src/Request/Target.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,11 +100,11 @@
 block discarded – undo
100 100
         return new Target(self::TYPE_CLASS, '', $sClassName, $sMethodName);
101 101
     }
102 102
 
103
-     /**
104
-     * Check if the target type is Function.
105
-     *
106
-     * @return bool
107
-     */
103
+        /**
104
+         * Check if the target type is Function.
105
+         *
106
+         * @return bool
107
+         */
108 108
     public function isFunction()
109 109
     {
110 110
         return $this->sType == self::TYPE_FUNCTION;
Please login to merge, or discard this patch.