@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param string $columnName |
86 | 86 | * @param string $value |
87 | 87 | */ |
88 | - public function __construct($tableName=null, $columnName=null, $value=null) { |
|
88 | + public function __construct($tableName = null, $columnName = null, $value = null) { |
|
89 | 89 | $this->tableName = $tableName; |
90 | 90 | $this->columnName = $columnName; |
91 | 91 | $this->value = $value; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | <div class="control-group"> |
30 | 30 | <label class="control-label">Store dates / timestamps in UTC:</label> |
31 | 31 | <div class="controls"> |
32 | - <input type="checkbox" name="storeInUtc" value="1" <?php echo $this->storeInUtc?'checked="checked"':"" ?>></input> |
|
32 | + <input type="checkbox" name="storeInUtc" value="1" <?php echo $this->storeInUtc ? 'checked="checked"' : "" ?>></input> |
|
33 | 33 | <span class="help-block">Select this option if you want timestamps to be stored in UTC. |
34 | 34 | If your application supports several time zones, you should select this option to store all dates in |
35 | 35 | the same time zone.</span> |
@@ -9,85 +9,85 @@ |
||
9 | 9 | */ |
10 | 10 | class MapIterator implements Iterator { |
11 | 11 | |
12 | - /** |
|
13 | - * @var Iterator |
|
14 | - */ |
|
15 | - protected $iterator; |
|
12 | + /** |
|
13 | + * @var Iterator |
|
14 | + */ |
|
15 | + protected $iterator; |
|
16 | 16 | |
17 | - /** |
|
18 | - * @var callable Modifies the current item in iterator |
|
19 | - */ |
|
20 | - protected $callable; |
|
17 | + /** |
|
18 | + * @var callable Modifies the current item in iterator |
|
19 | + */ |
|
20 | + protected $callable; |
|
21 | 21 | |
22 | - /** |
|
23 | - * @param $iterator Iterator|array |
|
24 | - * @param $callable callable This can have two parameters |
|
25 | - * @throws TDBMException |
|
26 | - */ |
|
27 | - public function __construct($iterator, callable $callable) { |
|
28 | - if (is_array($iterator)) { |
|
29 | - $this->iterator = new \ArrayIterator($iterator); |
|
30 | - } |
|
31 | - elseif (!($iterator instanceof Iterator)) |
|
32 | - { |
|
33 | - throw new TDBMException("\$iterator parameter must be an instance of Iterator"); |
|
34 | - } |
|
35 | - else |
|
36 | - { |
|
37 | - $this->iterator = $iterator; |
|
38 | - } |
|
22 | + /** |
|
23 | + * @param $iterator Iterator|array |
|
24 | + * @param $callable callable This can have two parameters |
|
25 | + * @throws TDBMException |
|
26 | + */ |
|
27 | + public function __construct($iterator, callable $callable) { |
|
28 | + if (is_array($iterator)) { |
|
29 | + $this->iterator = new \ArrayIterator($iterator); |
|
30 | + } |
|
31 | + elseif (!($iterator instanceof Iterator)) |
|
32 | + { |
|
33 | + throw new TDBMException("\$iterator parameter must be an instance of Iterator"); |
|
34 | + } |
|
35 | + else |
|
36 | + { |
|
37 | + $this->iterator = $iterator; |
|
38 | + } |
|
39 | 39 | |
40 | - if ($callable instanceof \Closure) { |
|
41 | - // make sure there's one argument |
|
42 | - $reflection = new \ReflectionObject($callable); |
|
43 | - if ($reflection->hasMethod('__invoke')) { |
|
44 | - $method = $reflection->getMethod('__invoke'); |
|
45 | - if ($method->getNumberOfParameters() !== 1) { |
|
46 | - throw new TDBMException("\$callable must accept one and only one parameter."); |
|
47 | - } |
|
48 | - } |
|
49 | - } |
|
40 | + if ($callable instanceof \Closure) { |
|
41 | + // make sure there's one argument |
|
42 | + $reflection = new \ReflectionObject($callable); |
|
43 | + if ($reflection->hasMethod('__invoke')) { |
|
44 | + $method = $reflection->getMethod('__invoke'); |
|
45 | + if ($method->getNumberOfParameters() !== 1) { |
|
46 | + throw new TDBMException("\$callable must accept one and only one parameter."); |
|
47 | + } |
|
48 | + } |
|
49 | + } |
|
50 | 50 | |
51 | - $this->callable = $callable; |
|
52 | - } |
|
51 | + $this->callable = $callable; |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * Alters the current item with $this->callable and returns a new item. |
|
56 | - * Be careful with your types as we can't do static type checking here! |
|
57 | - * @return mixed |
|
58 | - */ |
|
59 | - public function current() |
|
60 | - { |
|
61 | - $callable = $this->callable; |
|
62 | - return $callable($this->iterator->current()); |
|
63 | - } |
|
54 | + /** |
|
55 | + * Alters the current item with $this->callable and returns a new item. |
|
56 | + * Be careful with your types as we can't do static type checking here! |
|
57 | + * @return mixed |
|
58 | + */ |
|
59 | + public function current() |
|
60 | + { |
|
61 | + $callable = $this->callable; |
|
62 | + return $callable($this->iterator->current()); |
|
63 | + } |
|
64 | 64 | |
65 | - public function next() |
|
66 | - { |
|
67 | - $this->iterator->next(); |
|
68 | - } |
|
65 | + public function next() |
|
66 | + { |
|
67 | + $this->iterator->next(); |
|
68 | + } |
|
69 | 69 | |
70 | - public function key() |
|
71 | - { |
|
72 | - return $this->iterator->key(); |
|
73 | - } |
|
70 | + public function key() |
|
71 | + { |
|
72 | + return $this->iterator->key(); |
|
73 | + } |
|
74 | 74 | |
75 | - public function valid() |
|
76 | - { |
|
77 | - return $this->iterator->valid(); |
|
78 | - } |
|
75 | + public function valid() |
|
76 | + { |
|
77 | + return $this->iterator->valid(); |
|
78 | + } |
|
79 | 79 | |
80 | - public function rewind() |
|
81 | - { |
|
82 | - $this->iterator->rewind(); |
|
83 | - } |
|
80 | + public function rewind() |
|
81 | + { |
|
82 | + $this->iterator->rewind(); |
|
83 | + } |
|
84 | 84 | |
85 | - /** |
|
86 | - * Casts the iterator to a PHP array. |
|
87 | - * |
|
88 | - * @return array |
|
89 | - */ |
|
90 | - public function toArray() { |
|
91 | - return iterator_to_array($this); |
|
92 | - } |
|
85 | + /** |
|
86 | + * Casts the iterator to a PHP array. |
|
87 | + * |
|
88 | + * @return array |
|
89 | + */ |
|
90 | + public function toArray() { |
|
91 | + return iterator_to_array($this); |
|
92 | + } |
|
93 | 93 | } |
@@ -27,12 +27,10 @@ |
||
27 | 27 | public function __construct($iterator, callable $callable) { |
28 | 28 | if (is_array($iterator)) { |
29 | 29 | $this->iterator = new \ArrayIterator($iterator); |
30 | - } |
|
31 | - elseif (!($iterator instanceof Iterator)) |
|
30 | + } elseif (!($iterator instanceof Iterator)) |
|
32 | 31 | { |
33 | 32 | throw new TDBMException("\$iterator parameter must be an instance of Iterator"); |
34 | - } |
|
35 | - else |
|
33 | + } else |
|
36 | 34 | { |
37 | 35 | $this->iterator = $iterator; |
38 | 36 | } |