Completed
Push — 2.0.0 ( 6a6555...ed66fb )
by John
04:22
created
Alpha/Util/Config/ConfigProvider.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
     /**
116 116
      * Get config value.
117 117
      *
118
-     * @param $key string
118
+     * @param string $key string
119 119
      *
120 120
      * @return string
121 121
      *
Please login to merge, or discard this patch.
Alpha/Util/Email/EmailProviderFactory.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,11 +63,11 @@
 block discarded – undo
63 63
      * A static method that attempts to return a EmailProviderInterface instance
64 64
      * based on the name of the provider class supplied.
65 65
      *
66
-     * @param $providerName The class name of the provider class (fully qualified).
66
+     * @param string $providerName The class name of the provider class (fully qualified).
67 67
      *
68 68
      * @throws Alpha\Exception\IllegalArguementException
69 69
      *
70
-     * @return Alpha\Util\Http\Email\EmailProviderInterface
70
+     * @return EmailProviderInterface|null
71 71
      *
72 72
      * @since 2.0
73 73
      */
Please login to merge, or discard this patch.
Alpha/Util/Extension/TCPDF.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
      * @param string $file    Name of the file containing the image.
69 69
      * @param float  $x       Abscissa of the upper-left corner.
70 70
      * @param float  $y       Ordinate of the upper-left corner.
71
-     * @param float  $w       Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
72
-     * @param float  $h       Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
71
+     * @param integer  $w       Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
72
+     * @param integer  $h       Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
73 73
      * @param string $type    Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.
74 74
      * @param mixed  $link    URL or identifier returned by AddLink().
75 75
      * @param string $align   Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul>
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param string $palign  Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>
79 79
      * @param bool   $ismask  true if this image is a mask, false otherwise
80 80
      * @param mixed  $imgmask image object returned by this function or false
81
-     * @param mixed  $border  Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
81
+     * @param integer  $border  Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
82 82
      *
83 83
      * @since 1.0
84 84
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,9 +94,9 @@
 block discarded – undo
94 94
 
95 95
         try {
96 96
             if (mb_strpos($file, '/tk/') !== false) {
97
-                $start = mb_strpos($file, '/tk/') + 3;
97
+                $start = mb_strpos($file, '/tk/')+3;
98 98
                 $end = mb_strlen($file);
99
-                $tk = mb_substr($file, $start + 1, $end - ($start + 1));
99
+                $tk = mb_substr($file, $start+1, $end-($start+1));
100 100
                 $decoded = FrontController::getDecodeQueryParams($tk);
101 101
 
102 102
                 parent::Image($decoded['source'], $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border);
Please login to merge, or discard this patch.
Alpha/Util/Extension/TCPDFFacade.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
     /**
110 110
      * The constructor.
111 111
      *
112
-     * @param Alpha\Model\ActiveRecord $BO the business object that stores the content will be rendered to Markdown
112
+     * @param \Alpha\Model\Article $BO the business object that stores the content will be rendered to Markdown
113 113
      *
114 114
      * @since 1.0
115 115
      *
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -238,14 +238,14 @@  discard block
 block discarded – undo
238 238
         self::$logger->debug('<<__construct()');
239 239
     }
240 240
 
241
-     /**
242
-      * Facade method which will invoke our custom markdown class rather than the standard one.
243
-      *
244
-      * @since 1.0
245
-      */
246
-     private function markdown($text, $attachURL = '')
247
-     {
248
-         $config = ConfigProvider::getInstance();
241
+        /**
242
+         * Facade method which will invoke our custom markdown class rather than the standard one.
243
+         *
244
+         * @since 1.0
245
+         */
246
+        private function markdown($text, $attachURL = '')
247
+        {
248
+            $config = ConfigProvider::getInstance();
249 249
 
250 250
         /*
251 251
          * Initialize the parser and return the result of its transform method.
@@ -253,9 +253,9 @@  discard block
 block discarded – undo
253 253
          */
254 254
         static $parser;
255 255
 
256
-         if (!isset($parser)) {
257
-             $parser = new \Alpha\Util\Extension\Markdown();
258
-         }
256
+            if (!isset($parser)) {
257
+                $parser = new \Alpha\Util\Extension\Markdown();
258
+            }
259 259
 
260 260
         /*
261 261
          * Replace all instances of $sysURL in the text with the app.url setting from config
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 
266 266
         // transform text using parser.
267 267
         return $parser->transform($text);
268
-     }
268
+        }
269 269
 
270 270
     /**
271 271
      * Fetter for the content.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         foreach ($attachments[0] as $attachmentURL) {
157 157
             $start = mb_strpos($attachmentURL, '/');
158 158
             $end = mb_strrpos($attachmentURL, '"');
159
-            $fileName = mb_substr($attachmentURL, $start + 1, $end - ($start + 1));
159
+            $fileName = mb_substr($attachmentURL, $start+1, $end-($start+1));
160 160
 
161 161
             if (method_exists($this->BO, 'getAttachmentSecureURL')) {
162 162
                 $this->content = str_replace($attachmentURL, 'href='.$this->BO->getAttachmentSecureURL($fileName), $this->content);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         foreach ($attachments[0] as $attachmentURL) {
171 171
             $start = mb_strpos($attachmentURL, '/');
172 172
             $end = mb_strrpos($attachmentURL, '" alt');
173
-            $fileName = mb_substr($attachmentURL, $start + 1, $end - ($start + 1));
173
+            $fileName = mb_substr($attachmentURL, $start+1, $end-($start+1));
174 174
 
175 175
             if ($config->get('cms.images.widget')) {
176 176
                 // get the details of the source image
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                     $type = 'png';
186 186
                 }
187 187
 
188
-                $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean) $config->get('cms.images.widget.secure'));
188
+                $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean)$config->get('cms.images.widget.secure'));
189 189
                 $this->content = str_replace($attachmentURL, $img->renderHTMLLink(), $this->content);
190 190
             } else {
191 191
                 // render a normal image link to the ViewAttachment controller
Please login to merge, or discard this patch.
Alpha/Util/File/FileUtils.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
      * @param string $sourceDir    The path to the source directory.
542 542
      * @param string $fileList     The HTML list of files generated (pass by reference).
543 543
      * @param int    $fileCount    The current file count (used in recursive calls).
544
-     * @param array  $excludeFiles An array of file names to exclude from the list rendered.
544
+     * @param string[]  $excludeFiles An array of file names to exclude from the list rendered.
545 545
      *
546 546
      * @return int The current filecount for the directory.
547 547
      *
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
      * Recursively deletes the contents of the directory indicated (the directory itself is not deleted).
579 579
      *
580 580
      * @param string $sourceDir    The path to the source directory.
581
-     * @param array  $excludeFiles An array of file names to exclude from the deletion.
581
+     * @param string[]  $excludeFiles An array of file names to exclude from the deletion.
582 582
      *
583 583
      * @throws Alpha\Exception\AlphaException
584 584
      *
Please login to merge, or discard this patch.
Alpha/Util/Graph/GraphNode.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     /**
285 285
      * Get the node offset.
286 286
      *
287
-     * @return string
287
+     * @return integer
288 288
      *
289 289
      * @since 1.0
290 290
      */
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
     /**
461 461
      * Calculates and returns the midpoint X coordinate of the children of this node.
462 462
      *
463
-     * @return int
463
+     * @return double
464 464
      *
465 465
      * @since 1.0
466 466
      */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -467,9 +467,9 @@  discard block
 block discarded – undo
467 467
     public function getChildrenCenter()
468 468
     {
469 469
         $node = $this->getChildAt(0);
470
-        $node1 = $this->getChildAt(count($this->children) - 1);
470
+        $node1 = $this->getChildAt(count($this->children)-1);
471 471
 
472
-        return $node->getOffset() + (($node1->getOffset() - $node->getOffset()) + $node1->getWidth()) / 2;
472
+        return $node->getOffset()+(($node1->getOffset()-$node->getOffset())+$node1->getWidth())/2;
473 473
     }
474 474
 
475 475
     /**
@@ -529,14 +529,14 @@  discard block
 block discarded – undo
529 529
         $yc = 0;
530 530
         $xd = 0;
531 531
         $yd = 0;
532
-        $xa = $this->x + ($this->width / 2);
533
-        $ya = $this->y + $this->height;
532
+        $xa = $this->x+($this->width/2);
533
+        $ya = $this->y+$this->height;
534 534
 
535 535
         foreach ($this->children as $child) {
536
-            $xd = $xc = $child->getX() + ($child->getWidth() / 2);
536
+            $xd = $xc = $child->getX()+($child->getWidth()/2);
537 537
             $yd = $child->getY();
538 538
             $xb = $xa;
539
-            $yb = $yc = $ya + ($yd - $ya) / 2;
539
+            $yb = $yc = $ya+($yd-$ya)/2;
540 540
             $this->links[$child->id]['xa'] = $xa;
541 541
             $this->links[$child->id]['ya'] = $ya;
542 542
             $this->links[$child->id]['xb'] = $xb;
Please login to merge, or discard this patch.
Alpha/Util/Http/Request.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -389,9 +389,9 @@
 block discarded – undo
389 389
      * Get the param matching the key provided.
390 390
      *
391 391
      * @param string $key     The key to search for
392
-     * @param mixed  $default If key is not found, return this instead
392
+     * @param string|false  $default If key is not found, return this instead
393 393
      *
394
-     * @return mixed
394
+     * @return string
395 395
      *
396 396
      * @since 2.0
397 397
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
             $URI = mb_substr($this->URI, 0, mb_strpos($this->URI, '?'));
629 629
 
630 630
             // let's take this opportunity to pass query string params to $this->params
631
-            $queryString = mb_substr($this->URI, (mb_strpos($this->URI, '?') + 1));
631
+            $queryString = mb_substr($this->URI, (mb_strpos($this->URI, '?')+1));
632 632
             $this->queryString = $queryString;
633 633
             parse_str($queryString, $this->params);
634 634
         } else {
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
             $name = $paramNames[$i];
643 643
 
644 644
             if (!isset($this->params[trim($name, '{}')])) {
645
-                if (isset($paramValues[$i]) && substr($name, 0, 1) == '{' && substr($name, strlen($name) - 1, 1) == '}') {
645
+                if (isset($paramValues[$i]) && substr($name, 0, 1) == '{' && substr($name, strlen($name)-1, 1) == '}') {
646 646
                     $this->params[trim($name, '{}')] = $paramValues[$i];
647 647
                 }
648 648
                 if (!isset($paramValues[$i]) && isset($defaultParams[trim($name, '{}')])) {
Please login to merge, or discard this patch.
Alpha/Util/Http/Response.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
     /**
178 178
      * Get the response body.
179 179
      *
180
-     * @return string|null
180
+     * @return string
181 181
      *
182 182
      * @since 2.0
183 183
      */
Please login to merge, or discard this patch.
Alpha/Util/Http/Session/SessionProviderFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      *
68 68
      * @throws Alpha\Exception\IllegalArguementException
69 69
      *
70
-     * @return Alpha\Util\Http\Session\SessionProviderInterface
70
+     * @return SessionProviderInterface|null
71 71
      *
72 72
      * @since 2.0
73 73
      */
Please login to merge, or discard this patch.