@@ -8,7 +8,7 @@ |
||
8 | 8 | */ |
9 | 9 | class CDIFactoryDocumentation extends CDIFactoryDefault |
10 | 10 | { |
11 | - /** |
|
11 | + /** |
|
12 | 12 | * Construct. |
13 | 13 | * |
14 | 14 | */ |
@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | parent::__construct(); |
18 | 18 | |
19 | - $this->set('documentation', function () { |
|
19 | + $this->set('documentation', function() { |
|
20 | 20 | $fc = new \Anax\Content\CFileContent(); |
21 | 21 | $fc->setBasePath(ANAX_INSTALL_PATH . 'docs/documentation'); |
22 | 22 | return $fc; |
@@ -10,9 +10,9 @@ discard block |
||
10 | 10 | * @param string $class The fully-qualified class name. |
11 | 11 | * @return void |
12 | 12 | */ |
13 | -spl_autoload_register(function ($class) { |
|
13 | +spl_autoload_register(function($class) { |
|
14 | 14 | $path = ANAX_SOURCE_PATH . "/{$class}/{$class}.php"; |
15 | - if(is_file($path)) { |
|
15 | + if (is_file($path)) { |
|
16 | 16 | require($path); |
17 | 17 | } |
18 | 18 | }); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * @param string $class The fully-qualified class name. |
31 | 31 | * @return void |
32 | 32 | */ |
33 | -spl_autoload_register(function ($className) { |
|
33 | +spl_autoload_register(function($className) { |
|
34 | 34 | |
35 | 35 | $path = ANAX_SOURCE_PATH . DIRECTORY_SEPARATOR; |
36 | 36 | $className = ltrim($className, '\\'); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; |
46 | 46 | |
47 | - if(is_file($fileName)) { |
|
47 | + if (is_file($fileName)) { |
|
48 | 48 | require $fileName; |
49 | 49 | } |
50 | 50 | }); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @param string $class The fully-qualified class name. |
59 | 59 | * @return void |
60 | 60 | */ |
61 | -spl_autoload_register(function ($class) { |
|
61 | +spl_autoload_register(function($class) { |
|
62 | 62 | |
63 | 63 | // project-specific namespace prefix |
64 | 64 | $prefix = 'Anax\\'; |
@@ -10,9 +10,9 @@ |
||
10 | 10 | { |
11 | 11 | |
12 | 12 | /** |
13 | - * Properties |
|
14 | - * |
|
15 | - */ |
|
13 | + * Properties |
|
14 | + * |
|
15 | + */ |
|
16 | 16 | private $name; // A name for this route |
17 | 17 | private $rule; // The rule for this route |
18 | 18 | private $action; // The controller action to handle this route |
@@ -13,8 +13,8 @@ |
||
13 | 13 | * Properties |
14 | 14 | * |
15 | 15 | */ |
16 | - private $name; // A name for this route |
|
17 | - private $rule; // The rule for this route |
|
16 | + private $name; // A name for this route |
|
17 | + private $rule; // The rule for this route |
|
18 | 18 | private $action; // The controller action to handle this route |
19 | 19 | |
20 | 20 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'id' => null, |
29 | 29 | 'class' => null, |
30 | 30 | 'wrapper' => 'nav', |
31 | - 'create_url' => function ($url) { |
|
31 | + 'create_url' => function($url) { |
|
32 | 32 | return $url; |
33 | 33 | }, |
34 | 34 | ); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | // Create the ul li menu from the array, use an anonomous recursive function that returns an |
38 | 38 | // array of values. |
39 | - $createMenu = function ($items, $callback) use (&$createMenu, $menu) { |
|
39 | + $createMenu = function($items, $callback) use (&$createMenu, $menu) { |
|
40 | 40 | |
41 | 41 | $html = null; |
42 | 42 | $hasItemIsSelected = false; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | // Is there a class set for this item, then use it |
71 | - $class = isset($item['class']) && ! is_null($item['class']) |
|
71 | + $class = isset($item['class']) && !is_null($item['class']) |
|
72 | 72 | ? $item['class'] |
73 | 73 | : null; |
74 | 74 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | |
98 | 98 | // Set the id & class element, only if it exists in the menu-array |
99 | - $id = isset($menu['id']) ? " id='{$menu['id']}'" : null; |
|
99 | + $id = isset($menu['id']) ? " id='{$menu['id']}'" : null; |
|
100 | 100 | $class = isset($menu['class']) ? " class='{$menu['class']}'" : null; |
101 | 101 | $wrapper = $menu['wrapper']; |
102 | 102 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | - /** |
|
16 | + /** |
|
17 | 17 | * Display a page for a HTTP status code. |
18 | 18 | * |
19 | 19 | * @param string code status code to set the http header. |
@@ -11,9 +11,9 @@ |
||
11 | 11 | |
12 | 12 | |
13 | 13 | /** |
14 | - * Properties |
|
15 | - * |
|
16 | - */ |
|
14 | + * Properties |
|
15 | + * |
|
16 | + */ |
|
17 | 17 | private $headers; // Set all headers to send |
18 | 18 | |
19 | 19 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | |
18 | 18 | |
19 | - /** |
|
19 | + /** |
|
20 | 20 | * Set a message. |
21 | 21 | * |
22 | 22 | * @param string a message. |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | - /** |
|
33 | + /** |
|
34 | 34 | * Get the message. |
35 | 35 | * |
36 | 36 | * @return void |
@@ -88,7 +88,7 @@ |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | $param = is_int($key) ? null : $val; |
91 | - $test = $tests[$rule]; |
|
91 | + $test = $tests[$rule]; |
|
92 | 92 | |
93 | 93 | if (is_callable($test['test'])) { |
94 | 94 |
@@ -33,7 +33,9 @@ discard block |
||
33 | 33 | function mergesort(&$array, $cmp_function) |
34 | 34 | { |
35 | 35 | // Arrays of size < 2 require no action. |
36 | - if (count($array) < 2) return; |
|
36 | + if (count($array) < 2) { |
|
37 | + return; |
|
38 | + } |
|
37 | 39 | // Split the array in half |
38 | 40 | $halfway = count($array) / 2; |
39 | 41 | $array1 = array_slice($array, 0, $halfway); |
@@ -57,7 +59,11 @@ discard block |
||
57 | 59 | } |
58 | 60 | } |
59 | 61 | // Merge the remainder |
60 | - while ($ptr1 < count($array1)) $array[] = $array1[$ptr1++]; |
|
61 | - while ($ptr2 < count($array2)) $array[] = $array2[$ptr2++]; |
|
62 | + while ($ptr1 < count($array1)) { |
|
63 | + $array[] = $array1[$ptr1++]; |
|
64 | + } |
|
65 | + while ($ptr2 < count($array2)) { |
|
66 | + $array[] = $array2[$ptr2++]; |
|
67 | + } |
|
62 | 68 | return; |
63 | 69 | } |