Completed
Branch 1.2 (459185)
by David
04:06
created
lib/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      *
90 90
      * @param string $sTemplate
91 91
      * @param boolean $return
92
-     * @return mixed
92
+     * @return null|string
93 93
      */
94 94
     public function display($sTemplate, $return = FALSE) {
95 95
         // Start benchmark
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php if (!defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 
3 5
 require "dwoo/dwooAutoload.php";
4 6
 
Please login to merge, or discard this patch.
lib/Dwoo/Adapters/ZendFramework/PluginProxy.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	/**
29 29
 	 * Dwoo_Adapters_ZendFramework_PluginProxy's constructor.
30 30
 	 *
31
-	 * @param Zend_View_Interface $view
31
+	 * @param Dwoo_Adapters_ZendFramework_View $view
32 32
 	 */
33 33
 	public function __construct(Zend_View_Interface $view) {
34 34
 		$this->view = $view;
Please login to merge, or discard this patch.
lib/Dwoo/Data.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,6 @@
 block discarded – undo
66 66
 	 * merges the given array(s) with the current data with array_merge
67 67
 	 *
68 68
 	 * @param array $data the array to merge
69
-	 * @param array $data2 $data3 ... other arrays to merge, optional, etc.
70 69
 	 */
71 70
 	public function mergeData(array $data)
72 71
 	{
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  discard block
 block discarded – undo
45 45
 		if ($name === null) {
46 46
 			$this->data = array();
47 47
 		} elseif (is_array($name)) {
48
-			foreach ($name as $index)
49
-				unset($this->data[$index]);
48
+			foreach ($name as $index) {
49
+							unset($this->data[$index]);
50
+			}
50 51
 		} else {
51 52
 			unset($this->data[$name]);
52 53
 		}
@@ -90,8 +91,9 @@  discard block
 block discarded – undo
90 91
 	{
91 92
 		if (is_array($name)) {
92 93
 			reset($name);
93
-			while (list($k,$v) = each($name))
94
-				$this->data[$k] = $v;
94
+			while (list($k,$v) = each($name)) {
95
+							$this->data[$k] = $v;
96
+			}
95 97
 		} else {
96 98
 			$this->data[$name] = $val;
97 99
 		}
Please login to merge, or discard this patch.
lib/Dwoo/ICompiler.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	/**
25 25
 	 * compiles the provided string down to php code
26 26
 	 *
27
-	 * @param string $templateStr the template to compile
27
+	 * @param string $template the template to compile
28 28
 	 * @return string a compiled php code string
29 29
 	 */
30 30
 	public function compile(Dwoo_Core $dwoo, Dwoo_ITemplate $template);
@@ -34,6 +34,7 @@  discard block
 block discarded – undo
34 34
 	 *
35 35
 	 * @see Dwoo_Core::addPlugin
36 36
 	 * @param array $customPlugins an array of custom plugins
37
+	 * @return void
37 38
 	 */
38 39
 	public function setCustomPlugins(array $customPlugins);
39 40
 
@@ -44,6 +45,7 @@  discard block
 block discarded – undo
44 45
 	 * set it on the Dwoo object as it will be passed onto the compiler automatically
45 46
 	 *
46 47
 	 * @param Dwoo_Security_Policy $policy the security policy object
48
+	 * @return void
47 49
 	 */
48 50
 	public function setSecurityPolicy(Dwoo_Security_Policy $policy = null);
49 51
 }
Please login to merge, or discard this patch.
lib/Dwoo/Loader.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -42,6 +42,9 @@
 block discarded – undo
42 42
 
43 43
 	protected $corePluginDir;
44 44
 
45
+	/**
46
+	 * @param string $cacheDir
47
+	 */
45 48
 	public function __construct($cacheDir)
46 49
 	{
47 50
 		$this->corePluginDir = DWOO_DIRECTORY . 'plugins';
Please login to merge, or discard this patch.
lib/Dwoo/Template/String.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
 	 *
279 279
 	 * @param Dwoo_Core $dwoo the dwoo instance that requests it
280 280
 	 * @param string $output the template output
281
-	 * @return mixed full path of the cached file or false upon failure
281
+	 * @return false|string full path of the cached file or false upon failure
282 282
 	 */
283 283
 	public function cache(Dwoo_Core $dwoo, $output)
284 284
 	{
Please login to merge, or discard this patch.
lib/plugins/builtin/blocks/dynamic.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -53,6 +53,10 @@
 block discarded – undo
53 53
 		return $output;
54 54
 	}
55 55
 
56
+	/**
57
+	 * @param string $dynamicId
58
+	 * @param string $compiledFile
59
+	 */
56 60
 	public static function unescape($output, $dynamicId, $compiledFile)
57 61
 	{
58 62
 		$output = preg_replace_callback('/<dwoo:dynamic_('.$dynamicId.')>(.+?)<\/dwoo:dynamic_'.$dynamicId.'>/s', array('self', 'unescapePhp'), $output, -1, $count);
Please login to merge, or discard this patch.
lib/Dwoo/Core.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1538,8 +1538,9 @@
 block discarded – undo
1538 1538
                 array_pop($this->scopeTree);
1539 1539
                 $this->scope =& $this->data;
1540 1540
                 $cnt = count($this->scopeTree);
1541
-                for ($i=0;$i<$cnt;$i++)
1542
-                    $this->scope =& $this->scope[$this->scopeTree[$i]];
1541
+                for ($i=0;$i<$cnt;$i++) {
1542
+                                    $this->scope =& $this->scope[$this->scopeTree[$i]];
1543
+                }
1543 1544
             } elseif ($bit === '__' || $bit === '_root') {
1544 1545
                 $this->scope =& $this->data;
1545 1546
                 $this->scopeTree = array();
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1484,7 +1484,7 @@
 block discarded – undo
1484 1484
      *
1485 1485
      * @param mixed $value the value to assign
1486 1486
      * @param string $scope the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property")
1487
-     * @return bool true if assigned correctly or false if a problem occured while parsing the var string
1487
+     * @return null|false true if assigned correctly or false if a problem occured while parsing the var string
1488 1488
      */
1489 1489
     public function assignInScope($value, $scope)
1490 1490
     {
Please login to merge, or discard this patch.
lib/Dwoo/Smarty/Adapter.php 1 patch
Braces   +18 added lines, -14 removed lines patch added patch discarded remove patch
@@ -297,9 +297,10 @@  discard block
 block discarded – undo
297 297
 
298 298
 	public function unregister_prefilter($callback)
299 299
 	{
300
-		foreach ($this->_filters['pre'] as $index => $processor)
301
-			if ($processor->callback === $callback) {
300
+		foreach ($this->_filters['pre'] as $index => $processor) {
301
+					if ($processor->callback === $callback) {
302 302
 				$this->compiler->removePostProcessor($processor);
303
+		}
303 304
 				unset($this->_filters['pre'][$index]);
304 305
 			}
305 306
 	}
@@ -314,9 +315,10 @@  discard block
 block discarded – undo
314 315
 
315 316
 	public function unregister_postfilter($callback)
316 317
 	{
317
-		foreach ($this->_filters['post'] as $index => $processor)
318
-			if ($processor->callback === $callback) {
318
+		foreach ($this->_filters['post'] as $index => $processor) {
319
+					if ($processor->callback === $callback) {
319 320
 				$this->compiler->removePostProcessor($processor);
321
+		}
320 322
 				unset($this->_filters['post'][$index]);
321 323
 			}
322 324
 	}
@@ -331,9 +333,10 @@  discard block
 block discarded – undo
331 333
 
332 334
 	public function unregister_outputfilter($callback)
333 335
 	{
334
-		foreach ($this->_filters['output'] as $index => $filter)
335
-			if ($filter->callback === $callback) {
336
+		foreach ($this->_filters['output'] as $index => $filter) {
337
+					if ($filter->callback === $callback) {
336 338
 				$this->removeOutputFilter($filter);
339
+		}
337 340
 				unset($this->_filters['output'][$index]);
338 341
 			}
339 342
 	}
@@ -419,10 +422,11 @@  discard block
 block discarded – undo
419 422
 		}
420 423
 
421 424
 		$data = $this->dataProvider->getData();
422
-   		if ($name === null)
423
-   			return $data;
424
-   		elseif (isset($data[$name]))
425
-   			return $data[$name];
425
+   		if ($name === null) {
426
+   		   			return $data;
427
+   		} elseif (isset($data[$name])) {
428
+   		   			return $data[$name];
429
+   		}
426 430
    		return null;
427 431
    	}
428 432
 
@@ -450,8 +454,9 @@  discard block
 block discarded – undo
450 454
 
451 455
 	protected function makeTemplate($file, $cacheId, $compileId)
452 456
 	{
453
-   		if ($compileId === null)
454
-   			$compileId = $this->compile_id;
457
+   		if ($compileId === null) {
458
+   		   			$compileId = $this->compile_id;
459
+   		}
455 460
 
456 461
 		$hash = bin2hex(md5($file.$cacheId.$compileId, true));
457 462
 		if (!isset(self::$tplCache[$hash])) {
@@ -511,8 +516,7 @@  discard block
 block discarded – undo
511 516
 {
512 517
 	interface Smarty {}
513 518
 	class Dwoo_Smarty_Adapter extends Dwoo_Smarty__Adapter implements Smarty {}
514
-}
515
-else
519
+} else
516 520
 {
517 521
 	class Dwoo_Smarty_Adapter extends Dwoo_Smarty__Adapter {}
518 522
 }
Please login to merge, or discard this patch.