Completed
Push — master ( 3ad122...aab802 )
by Markus
04:20
created
lib/Base.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,15 +40,15 @@  discard block
 block discarded – undo
40 40
     public static function isMultipleDatabaseEnabled()
41 41
     {
42 42
         global $config;
43
-        return is_array ($config['calibre_directory']);
43
+        return is_array($config['calibre_directory']);
44 44
     }
45 45
 
46 46
     public static function useAbsolutePath()
47 47
     {
48 48
         global $config;
49 49
         $path = self::getDbDirectory();
50
-        return preg_match ('/^\//', $path) || // Linux /
51
-               preg_match ('/^\w\:/', $path); // Windows X:
50
+        return preg_match('/^\//', $path) || // Linux /
51
+               preg_match('/^\w\:/', $path); // Windows X:
52 52
     }
53 53
 
54 54
     public static function noDatabaseSelected()
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
     {
71 71
         global $config;
72 72
         if (self::isMultipleDatabaseEnabled()) {
73
-            return array_keys ($config['calibre_directory']);
73
+            return array_keys($config['calibre_directory']);
74 74
         } else {
75
-            return array ('');
75
+            return array('');
76 76
         }
77 77
     }
78 78
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
     public static function getDbFileName($database = NULL)
108 108
     {
109
-        return self::getDbDirectory($database) .'metadata.db';
109
+        return self::getDbDirectory($database) . 'metadata.db';
110 110
     }
111 111
 
112 112
     private static function error($database)
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
         throw new Exception('Database <' . $database . '> not found.');
118 118
     }
119 119
 
120
-    public static function getDb ($database = NULL)
120
+    public static function getDb($database = NULL)
121 121
     {
122
-        if (is_null (self::$db)) {
122
+        if (is_null(self::$db)) {
123 123
             try {
124
-                if (is_readable(self::getDbFileName ($database))) {
125
-                    self::$db = new PDO('sqlite:'. self::getDbFileName($database));
124
+                if (is_readable(self::getDbFileName($database))) {
125
+                    self::$db = new PDO('sqlite:' . self::getDbFileName($database));
126 126
                     if (useNormAndUp()) {
127 127
                         self::$db->sqliteCreateFunction('normAndUp', 'normAndUp', 1);
128 128
                     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         }
171 171
         $entry = new Entry(localize($table . '.title'), $id,
172 172
             str_format(localize($numberOfString, $count), $count), 'text',
173
-            array(new LinkNavigation('?page='.$pageId)), '', $count);
173
+            array(new LinkNavigation('?page=' . $pageId)), '', $count);
174 174
         return $entry;
175 175
     }
176 176
 
Please login to merge, or discard this patch.