@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $result = $this->getDb()->prepare(str_format("SELECT id, value AS name FROM {0} WHERE id = ?", $this->getTableName())); |
| 56 | 56 | $result->execute(array($id)); |
| 57 | 57 | if ($post = $result->fetchObject()) { |
| 58 | - return new CustomColumn ($id, $post->name, $this); |
|
| 58 | + return new CustomColumn($id, $post->name, $this); |
|
| 59 | 59 | } |
| 60 | 60 | return NULL; |
| 61 | 61 | } |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | $entryArray = array(); |
| 70 | 70 | while ($post = $result->fetchObject()) { |
| 71 | 71 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
| 72 | - $entryPLinkArray = array(new LinkNavigation ($this->getUri($post->id))); |
|
| 72 | + $entryPLinkArray = array(new LinkNavigation($this->getUri($post->id))); |
|
| 73 | 73 | |
| 74 | - $entry = new Entry ($post->name, $this->getEntryId($post->id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
|
| 74 | + $entry = new Entry($post->name, $this->getEntryId($post->id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
|
| 75 | 75 | |
| 76 | 76 | array_push($entryArray, $entry); |
| 77 | 77 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | if ($post = $result->fetchObject()) { |
| 58 | 58 | return new CustomColumn ($id, $post->name, $this); |
| 59 | 59 | } |
| 60 | - return NULL; |
|
| 60 | + return null; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | protected function getAllCustomValuesFromDatabase() |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | if ($post = $result->fetchObject()) { |
| 93 | 93 | return new CustomColumn($post->id, $post->name, $this); |
| 94 | 94 | } |
| 95 | - return new CustomColumn(NULL, localize("customcolumn.enum.unknown"), $this); |
|
| 95 | + return new CustomColumn(null, localize("customcolumn.enum.unknown"), $this); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | public function isSearchable() |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | while ($post = $result->fetchObject()) |
| 71 | 71 | { |
| 72 | 72 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
| 73 | - $entryPLinkArray = array(new LinkNavigation ($this->getUri($post->id))); |
|
| 73 | + $entryPLinkArray = array(new LinkNavigation($this->getUri($post->id))); |
|
| 74 | 74 | |
| 75 | 75 | $entry = new Entry($post->name, $this->getEntryId($post->id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
| 76 | 76 | |
@@ -67,8 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | $result = $this->getDb()->query($query); |
| 69 | 69 | $entryArray = array(); |
| 70 | - while ($post = $result->fetchObject()) |
|
| 71 | - { |
|
| 70 | + while ($post = $result->fetchObject()) { |
|
| 72 | 71 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
| 73 | 72 | $entryPLinkArray = array(new LinkNavigation ($this->getUri($post->id))); |
| 74 | 73 | |
@@ -82,7 +81,9 @@ discard block |
||
| 82 | 81 | public function getDescription() |
| 83 | 82 | { |
| 84 | 83 | $desc = $this->getDatabaseDescription(); |
| 85 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 84 | + if ($desc === NULL || empty($desc)) { |
|
| 85 | + $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 86 | + } |
|
| 86 | 87 | return $desc; |
| 87 | 88 | } |
| 88 | 89 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | if ($post = $result->fetchObject()) { |
| 58 | 58 | return new CustomColumn($id, $post->name, $this); |
| 59 | 59 | } |
| 60 | - return NULL; |
|
| 60 | + return null; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | protected function getAllCustomValuesFromDatabase() |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | public function getDescription() |
| 83 | 83 | { |
| 84 | 84 | $desc = $this->getDatabaseDescription(); |
| 85 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 85 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 86 | 86 | return $desc; |
| 87 | 87 | } |
| 88 | 88 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if ($post = $result->fetchObject()) { |
| 96 | 96 | return new CustomColumn($post->id, $post->name, $this); |
| 97 | 97 | } |
| 98 | - return new CustomColumn(NULL, "", $this); |
|
| 98 | + return new CustomColumn(null, "", $this); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | public function isSearchable() |
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | // PHP pre 5.6 does not support const arrays |
| 12 | 12 | private $BOOLEAN_NAMES = array( |
| 13 | 13 | -1 => "customcolumn.boolean.unknown", // localize("customcolumn.boolean.unknown") |
| 14 | - 00 => "customcolumn.boolean.no", // localize("customcolumn.boolean.no") |
|
| 15 | - +1 => "customcolumn.boolean.yes", // localize("customcolumn.boolean.yes") |
|
| 14 | + 00 => "customcolumn.boolean.no", // localize("customcolumn.boolean.no") |
|
| 15 | + +1 => "customcolumn.boolean.yes", // localize("customcolumn.boolean.yes") |
|
| 16 | 16 | ); |
| 17 | 17 | |
| 18 | 18 | protected function __construct($pcustomId) |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $entryArray = array(); |
| 61 | 61 | while ($post = $result->fetchObject()) { |
| 62 | 62 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
| 63 | - $entryPLinkArray = array(new LinkNavigation ($this->getUri($post->id))); |
|
| 63 | + $entryPLinkArray = array(new LinkNavigation($this->getUri($post->id))); |
|
| 64 | 64 | |
| 65 | 65 | $entry = new Entry(localize($this->BOOLEAN_NAMES[$post->id]), $this->getEntryId($post->id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
| 66 | 66 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $query = str_format(Book::SQL_BOOKS_BY_CUSTOM_BOOL_TRUE, "{0}", "{1}", $this->getTableName()); |
| 43 | 43 | return array($query, array()); |
| 44 | 44 | } else { |
| 45 | - return NULL; |
|
| 45 | + return null; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $id = $date->format("Y-m-d"); |
| 50 | 50 | |
| 51 | 51 | $entryPContent = str_format(localize("bookword", $post->count), $post->count); |
| 52 | - $entryPLinkArray = array(new LinkNavigation ($this->getUri($id))); |
|
| 52 | + $entryPLinkArray = array(new LinkNavigation($this->getUri($id))); |
|
| 53 | 53 | |
| 54 | 54 | $entry = new Entry($date->format(localize("customcolumn.date.format")), $this->getEntryId($id), $entryPContent, $this->datatype, $entryPLinkArray, "", $post->count); |
| 55 | 55 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | public function getDescription() |
| 63 | 63 | { |
| 64 | 64 | $desc = $this->getDatabaseDescription(); |
| 65 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 65 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 66 | 66 | return $desc; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | return new CustomColumn($date->format("Y-m-d"), $date->format(localize("customcolumn.date.format")), $this); |
| 79 | 79 | } |
| 80 | - return new CustomColumn(NULL, localize("customcolumn.date.unknown"), $this); |
|
| 80 | + return new CustomColumn(null, localize("customcolumn.date.unknown"), $this); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | public function isSearchable() |
@@ -55,7 +55,9 @@ |
||
| 55 | 55 | public function getDescription() |
| 56 | 56 | { |
| 57 | 57 | $desc = $this->getDatabaseDescription(); |
| 58 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 58 | + if ($desc === NULL || empty($desc)) { |
|
| 59 | + $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 60 | + } |
|
| 59 | 61 | return $desc; |
| 60 | 62 | } |
| 61 | 63 | |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | public function getCustom($id) |
| 59 | 59 | { |
| 60 | - return new CustomColumn ($id, str_format(localize("customcolumn.stars", $id / 2), $id / 2), $this); |
|
| 60 | + return new CustomColumn($id, str_format(localize("customcolumn.stars", $id / 2), $id / 2), $this); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | protected function getAllCustomValuesFromDatabase() |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | if ($post = $result->fetchObject()) { |
| 101 | 101 | return new CustomColumn($post->value, str_format(localize("customcolumn.stars", $post->value / 2), $post->value / 2), $this); |
| 102 | 102 | } |
| 103 | - return new CustomColumn(NULL, localize("customcolumn.rating.unknown"), $this); |
|
| 103 | + return new CustomColumn(null, localize("customcolumn.rating.unknown"), $this); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | public function isSearchable() |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function getDescription() |
| 56 | 56 | { |
| 57 | 57 | $desc = $this->getDatabaseDescription(); |
| 58 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 58 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 59 | 59 | return $desc; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if ($post = $result->fetchObject()) { |
| 69 | 69 | return new CustomColumn($post->value, $post->value, $this); |
| 70 | 70 | } |
| 71 | - return new CustomColumn(NULL, localize("customcolumn.float.unknown"), $this); |
|
| 71 | + return new CustomColumn(null, localize("customcolumn.float.unknown"), $this); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | public function isSearchable() |
@@ -55,7 +55,9 @@ |
||
| 55 | 55 | public function getDescription() |
| 56 | 56 | { |
| 57 | 57 | $desc = $this->getDatabaseDescription(); |
| 58 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 58 | + if ($desc === NULL || empty($desc)) { |
|
| 59 | + $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 60 | + } |
|
| 59 | 61 | return $desc; |
| 60 | 62 | } |
| 61 | 63 | |
@@ -41,13 +41,13 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | protected function getAllCustomValuesFromDatabase() |
| 43 | 43 | { |
| 44 | - return NULL; |
|
| 44 | + return null; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public function getDescription() |
| 48 | 48 | { |
| 49 | 49 | $desc = $this->getDatabaseDescription(); |
| 50 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 50 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 51 | 51 | return $desc; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if ($post = $result->fetchObject()) { |
| 61 | 61 | return new CustomColumn($post->id, $post->value, $this); |
| 62 | 62 | } |
| 63 | - return new CustomColumn(NULL, localize("customcolumn.float.unknown"), $this); |
|
| 63 | + return new CustomColumn(null, localize("customcolumn.float.unknown"), $this); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public function isSearchable() |
@@ -55,7 +55,9 @@ |
||
| 55 | 55 | public function getDescription() |
| 56 | 56 | { |
| 57 | 57 | $desc = $this->getDatabaseDescription(); |
| 58 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 58 | + if ($desc === NULL || empty($desc)) { |
|
| 59 | + $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 60 | + } |
|
| 59 | 61 | return $desc; |
| 60 | 62 | } |
| 61 | 63 | |
@@ -55,7 +55,9 @@ |
||
| 55 | 55 | public function getDescription() |
| 56 | 56 | { |
| 57 | 57 | $desc = $this->getDatabaseDescription(); |
| 58 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 58 | + if ($desc === NULL || empty($desc)) { |
|
| 59 | + $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 60 | + } |
|
| 59 | 61 | return $desc; |
| 60 | 62 | } |
| 61 | 63 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function getDescription() |
| 56 | 56 | { |
| 57 | 57 | $desc = $this->getDatabaseDescription(); |
| 58 | - if ($desc === NULL || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 58 | + if ($desc === null || empty($desc)) $desc = str_format(localize("customcolumn.description"), $this->getTitle()); |
|
| 59 | 59 | return $desc; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if ($post = $result->fetchObject()) { |
| 69 | 69 | return new CustomColumn($post->value, $post->value, $this); |
| 70 | 70 | } |
| 71 | - return new CustomColumn(NULL, localize("customcolumn.int.unknown"), $this); |
|
| 71 | + return new CustomColumn(null, localize("customcolumn.int.unknown"), $this); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | public function isSearchable() |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | if ($post = $result->fetchObject()) { |
| 58 | 58 | return new CustomColumn($id, $post->name, $this); |
| 59 | 59 | } |
| 60 | - return NULL; |
|
| 60 | + return null; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | protected function getAllCustomValuesFromDatabase() |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | if ($post = $result->fetchObject()) { |
| 93 | 93 | return new CustomColumn($post->id, $post->name . " [" . $post->extra . "]", $this); |
| 94 | 94 | } |
| 95 | - return new CustomColumn(NULL, "", $this); |
|
| 95 | + return new CustomColumn(null, "", $this); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | public function isSearchable() |