@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | private function convertDates($value) { |
82 | 82 | if ($value instanceof \DateTimeInterface) { |
83 | - if ($value->format('H:i:s') == '00:00:00') $value = $value->format('Y-m-d'); |
|
83 | + if ($value->format('H:i:s') == '00:00:00') $value = $value->format('Y-m-d'); |
|
84 | 84 | else $value = $value->format('Y-m-d H:i:s'); |
85 | 85 | } |
86 | 86 | return $value; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | return; |
97 | 97 | |
98 | 98 | $runAgain = false; |
99 | - $columns = $this->pdo->query('SELECT * FROM '. $this->quote($table) . ' PROCEDURE ANALYSE(1,1)')->fetchAll(\PDO::FETCH_OBJ); |
|
99 | + $columns = $this->pdo->query('SELECT * FROM ' . $this->quote($table) . ' PROCEDURE ANALYSE(1,1)')->fetchAll(\PDO::FETCH_OBJ); |
|
100 | 100 | foreach ($columns as $column) { |
101 | 101 | $parts = explode('.', $column->Field_name); |
102 | 102 | $name = $this->quote(end($parts)); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | - $this->pdo->query('ALTER TABLE ' . $this->quote($table) . ' MODIFY '. $name . ' ' . $type); |
|
133 | + $this->pdo->query('ALTER TABLE ' . $this->quote($table) . ' MODIFY ' . $name . ' ' . $type); |
|
134 | 134 | } |
135 | 135 | } |
136 | 136 | //Sometimes a second pass is needed, if a column has gone from varchar -> int(11) a better int type may be needed |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | //bit hacky, breaking encapsulation, but simplest way to work out the info for the other side of the many:many relationship. |
38 | 38 | private function getOtherFieldNameInfo() { |
39 | 39 | if ($this->otherInfo == null) { |
40 | - $propertyReader = function($name) {return $this->$name; }; |
|
40 | + $propertyReader = function($name) {return $this->$name; }; |
|
41 | 41 | |
42 | 42 | $reader = $propertyReader->bindTo($this->intermediateMapper, $this->intermediateMapper); |
43 | 43 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $propertyReader = $propertyReader->bindTo($relation, $relation); |
46 | 46 | if ($propertyReader('parentField') != $this->parentField) { |
47 | 47 | $relation = $relation->getData($this->object); |
48 | - $this->otherInfo = [$propertyReader('localField'), $propertyReader('parentField'), $propertyReader('mapper')]; |
|
48 | + $this->otherInfo = [$propertyReader('localField'), $propertyReader('parentField'), $propertyReader('mapper')]; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | private function offsetSetAutotraverse($value, $relatedField, $valueField) { |
105 | 105 | $record = new \stdClass; |
106 | - $record->{$this->parentField} = $value->{$this->localField}; |
|
106 | + $record->{$this->parentField} = $value->{$this->localField}; |
|
107 | 107 | $record->$valueField = $this->object->{$relatedField}; |
108 | 108 | $this->intermediateMapper[] = $record; |
109 | 109 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | if (count($inSql) == 0) return ['args' => [], 'sql' => '']; |
25 | - else $sql = [$key . $notText . ' IN ( ' . implode(', ', $inSql) . ')']; |
|
25 | + else $sql = [$key . $notText . ' IN ( ' . implode(', ', $inSql) . ')']; |
|
26 | 26 | |
27 | 27 | return ['args' => $args, 'sql' => $sql]; |
28 | 28 | } |