@@ -17,12 +17,12 @@ |
||
17 | 17 | { |
18 | 18 | $order = $this->parseOrder(); |
19 | 19 | |
20 | - $query = 'DELETE FROM '.$this->getManager()->protect($this->getTable()); |
|
20 | + $query = 'DELETE FROM ' . $this->getManager()->protect($this->getTable()); |
|
21 | 21 | |
22 | 22 | $query .= $this->assembleWhere(); |
23 | 23 | |
24 | 24 | if (!empty($order)) { |
25 | - $query .= ' ORDER BY '.$order; |
|
25 | + $query .= ' ORDER BY ' . $order; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $query .= $this->assembleLimit(); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function assemble() |
16 | 16 | { |
17 | - $query = "REPLACE INTO ".$this->protect($this->getTable()).$this->parseCols().$this->parseValues(); |
|
17 | + $query = "REPLACE INTO " . $this->protect($this->getTable()) . $this->parseCols() . $this->parseValues(); |
|
18 | 18 | |
19 | 19 | return $query; |
20 | 20 | } |
@@ -103,7 +103,7 @@ |
||
103 | 103 | public function checkValid() |
104 | 104 | { |
105 | 105 | if (!$this->isValid()) { |
106 | - trigger_error("Invalid result for query [".$this->getQuery()->getString()."]", E_USER_WARNING); |
|
106 | + trigger_error("Invalid result for query [" . $this->getQuery()->getString() . "]", E_USER_WARNING); |
|
107 | 107 | |
108 | 108 | return false; |
109 | 109 | } |
@@ -5,31 +5,31 @@ |
||
5 | 5 | interface AdapterInterface |
6 | 6 | { |
7 | 7 | |
8 | - function execute($sql); |
|
8 | + function execute($sql); |
|
9 | 9 | |
10 | - function lastInsertID(); |
|
10 | + function lastInsertID(); |
|
11 | 11 | |
12 | - function affectedRows(); |
|
12 | + function affectedRows(); |
|
13 | 13 | |
14 | - function numRows($result); |
|
14 | + function numRows($result); |
|
15 | 15 | |
16 | - function fetchArray($result); |
|
16 | + function fetchArray($result); |
|
17 | 17 | |
18 | - function fetchAssoc($result); |
|
18 | + function fetchAssoc($result); |
|
19 | 19 | |
20 | - function fetchObject($result); |
|
20 | + function fetchObject($result); |
|
21 | 21 | |
22 | - function result($result, $row, $field); |
|
22 | + function result($result, $row, $field); |
|
23 | 23 | |
24 | - function freeResults($result); |
|
24 | + function freeResults($result); |
|
25 | 25 | |
26 | - function describeTable($table); |
|
26 | + function describeTable($table); |
|
27 | 27 | |
28 | 28 | function quote($value); |
29 | 29 | |
30 | - function cleanData($data); |
|
30 | + function cleanData($data); |
|
31 | 31 | |
32 | - function error(); |
|
32 | + function error(); |
|
33 | 33 | |
34 | - function disconnect(); |
|
34 | + function disconnect(); |
|
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -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 |