@@ -40,7 +40,7 @@ |
||
40 | 40 | if ($result !== false) { |
41 | 41 | return $result; |
42 | 42 | } else { |
43 | - trigger_error($this->error()." [$sql]", E_USER_WARNING); |
|
43 | + trigger_error($this->error() . " [$sql]", E_USER_WARNING); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | return false; |
@@ -62,11 +62,17 @@ discard block |
||
62 | 62 | return $this->_profiler; |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param Profiler $profiler |
|
67 | + */ |
|
65 | 68 | public function setProfiler($profiler) |
66 | 69 | { |
67 | 70 | $this->_profiler = $profiler; |
68 | 71 | } |
69 | 72 | |
73 | + /** |
|
74 | + * @param string $sql |
|
75 | + */ |
|
70 | 76 | abstract public function query($sql); |
71 | 77 | |
72 | 78 | abstract public function error(); |
@@ -90,6 +96,9 @@ discard block |
||
90 | 96 | $newLink = false |
91 | 97 | ); |
92 | 98 | |
99 | + /** |
|
100 | + * @param string $table |
|
101 | + */ |
|
93 | 102 | abstract public function describeTable($table); |
94 | 103 | |
95 | 104 | abstract public function disconnect(); |
@@ -9,8 +9,8 @@ |
||
9 | 9 | |
10 | 10 | public function format(array $record) |
11 | 11 | { |
12 | - $title = $record['level_name'].' '.(string) $record['message']; |
|
13 | - $return = str_pad($title, 100, " "); |
|
12 | + $title = $record['level_name'] . ' ' . (string) $record['message']; |
|
13 | + $return = str_pad($title, 100, " "); |
|
14 | 14 | $return .= parent::format($record); |
15 | 15 | return $return; |
16 | 16 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function setFindSource($value = true) |
37 | 37 | { |
38 | - $this->findSource = (bool)$value; |
|
38 | + $this->findSource = (bool) $value; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -33,11 +33,11 @@ |
||
33 | 33 | public function buildMailMessageRecipients(&$message) |
34 | 34 | { |
35 | 35 | foreach (['to', 'cc', 'bcc', 'replyTo'] as $type) { |
36 | - $method = 'get'.ucfirst($type).'s'; |
|
36 | + $method = 'get' . ucfirst($type) . 's'; |
|
37 | 37 | $recipients = method_exists($this, $method) ? $this->{$method}() : $this->{$type}; |
38 | 38 | if (is_array($recipients)) { |
39 | 39 | foreach ($recipients as $address => $name) { |
40 | - $message->{'add'.ucfirst($type)}($address, $name); |
|
40 | + $message->{'add' . ucfirst($type)}($address, $name); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | public function log() |
6 | 6 | { |
7 | - trigger_error($this->getMessage(), $this->getCode()); |
|
7 | + trigger_error($this->getMessage(), $this->getCode()); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | } |
11 | 11 | \ No newline at end of file |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function getViewPath($name) |
73 | 73 | { |
74 | - return $this->getModuleDirectory($name).DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR; |
|
74 | + return $this->getModuleDirectory($name) . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function getModuleDirectory($name) |
82 | 82 | { |
83 | - return $this->getModulesBaseDirectory().$name; |
|
83 | + return $this->getModulesBaseDirectory() . $name; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function setEnabled($enabled = false) |
43 | 43 | { |
44 | - $this->enabled = (boolean)$enabled; |
|
44 | + $this->enabled = (boolean) $enabled; |
|
45 | 45 | return $this; |
46 | 46 | } |
47 | 47 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | if (null === $minimumSeconds) { |
216 | 216 | $this->filterElapsedSecs = null; |
217 | 217 | } else { |
218 | - $this->filterElapsedSecs = (integer)$minimumSeconds; |
|
218 | + $this->filterElapsedSecs = (integer) $minimumSeconds; |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | return $this; |
@@ -74,6 +74,9 @@ discard block |
||
74 | 74 | return $this->enabled; |
75 | 75 | } |
76 | 76 | |
77 | + /** |
|
78 | + * @param boolean $name |
|
79 | + */ |
|
77 | 80 | public function newProfileID($name) |
78 | 81 | { |
79 | 82 | if ($name) { |
@@ -128,6 +131,9 @@ discard block |
||
128 | 131 | return; |
129 | 132 | } |
130 | 133 | |
134 | + /** |
|
135 | + * @param boolean $profileID |
|
136 | + */ |
|
131 | 137 | protected function endPreckeck($profileID) |
132 | 138 | { |
133 | 139 | if (!$this->checkEnabled()) { |
@@ -230,7 +236,7 @@ discard block |
||
230 | 236 | } |
231 | 237 | |
232 | 238 | /** |
233 | - * @param $name |
|
239 | + * @param string $name |
|
234 | 240 | * @return AbstractAdapter |
235 | 241 | */ |
236 | 242 | public function newWriter($name) |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | public function getDescriptorSpec() |
33 | 33 | { |
34 | 34 | return array( |
35 | - 0 => array("pipe", "r"), // stdin |
|
36 | - 1 => array("pipe", "w"), // stdout -> we use this |
|
35 | + 0 => array("pipe", "r"), // stdin |
|
36 | + 1 => array("pipe", "w"), // stdout -> we use this |
|
37 | 37 | 2 => array("pipe", "w") // stderr |
38 | 38 | ); |
39 | 39 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | break; |
61 | 61 | } |
62 | 62 | if ($this->isVerbose()) { |
63 | - echo $returnLine."\n"; |
|
63 | + echo $returnLine . "\n"; |
|
64 | 64 | } |
65 | 65 | ob_flush(); |
66 | 66 | flush(); |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | |
27 | 27 | public function initHTML() |
28 | 28 | { |
29 | - require(dirname(__FILE__).'/Layout/header.html'); |
|
29 | + require(dirname(__FILE__) . '/Layout/header.html'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public function printHeader() |
33 | 33 | { |
34 | 34 | echo ' |
35 | 35 | Checking the environment ... |
36 | -Running as <b>'.$this->getRunUser().'</b>. |
|
36 | +Running as <b>'.$this->getRunUser() . '</b>. |
|
37 | 37 | '; |
38 | 38 | } |
39 | 39 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | public function checkRequiredBinary($binary) |
58 | 58 | { |
59 | - $shellCommand = $this->getCommand('which').' '.$binary; |
|
59 | + $shellCommand = $this->getCommand('which') . ' ' . $binary; |
|
60 | 60 | $process = $this->runProcess($shellCommand, false); |
61 | 61 | $path = $process->getReturn(); |
62 | 62 | $this->checkRequiredBinaryPath($path, $shellCommand, $binary); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | <div class="error"> |
106 | 106 | Error encountered! |
107 | 107 | Stopping the script to prevent possible data loss. |
108 | -ERROR CODE ['.$process->getExitCode().'] |
|
108 | +ERROR CODE ['.$process->getExitCode() . '] |
|
109 | 109 | </div> |
110 | 110 | '; |
111 | 111 | } |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | [%s] |
119 | 119 | </div>', $binary, $shellCommand)); |
120 | 120 | } else { |
121 | - $version = explode("\n", shell_exec($binary.' --version')); |
|
122 | - printf('<b>%s</b> : %s'."\n", $path, $version[0]); |
|
121 | + $version = explode("\n", shell_exec($binary . ' --version')); |
|
122 | + printf('<b>%s</b> : %s' . "\n", $path, $version[0]); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | { |
139 | 139 | echo ' |
140 | 140 | Environment OK. |
141 | -Deploying ['.__DIR__.'] |
|
142 | -Run Commands on ['.getcwd()."]\n"; |
|
141 | +Deploying ['.__DIR__ . '] |
|
142 | +Run Commands on ['.getcwd() . "]\n"; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | public function runCommands() |
@@ -155,13 +155,13 @@ discard block |
||
155 | 155 | $this->printCommand($command); |
156 | 156 | echo '<div class="output">'; |
157 | 157 | $process = $this->runProcess($command); |
158 | - echo 'Exit Code ['.$process->getExitCode().']'."\n"; |
|
158 | + echo 'Exit Code [' . $process->getExitCode() . ']' . "\n"; |
|
159 | 159 | echo '</div>'; |
160 | 160 | } |
161 | 161 | |
162 | 162 | public function printCommand($command) |
163 | 163 | { |
164 | - echo '<span class="prompt">$</span> <span class="command">'.$command.'</span>'; |
|
164 | + echo '<span class="prompt">$</span> <span class="command">' . $command . '</span>'; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | public function postDispatch() |