Passed
Push — develop ( 61c665...16c70c )
by Jens
04:31 queued 01:43
created
cloudcontrol/library/storage/Document.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             }
48 48
         } elseif ($name === 'content') {
49 49
             if ($this->dbHandle === null) {
50
-                throw new \Exception('Document doesnt have a dbHandle handle. (path: ' . $this->path . ')');
50
+                throw new \Exception('Document doesnt have a dbHandle handle. (path: '.$this->path.')');
51 51
             } else {
52 52
                 if ($this->content === null) {
53 53
                     $this->getContent();
@@ -76,19 +76,19 @@  discard block
 block discarded – undo
76 76
      */
77 77
     protected function getContent()
78 78
     {
79
-        $folderPathWithWildcard = $this->path . '%';
79
+        $folderPathWithWildcard = $this->path.'%';
80 80
         $sql = '    SELECT *
81 81
                       FROM documents
82
-                     WHERE `path` LIKE ' . $this->dbHandle->quote($folderPathWithWildcard) . '
83
-                       AND substr(`path`, ' . (strlen($this->path) + 2) . ') NOT LIKE "%/%"
84
-                       AND substr(`path`, ' . (strlen($this->path) + 1) . ', 1) = "/"
85
-                       AND path != ' . $this->dbHandle->quote($this->path) . '
82
+                     WHERE `path` LIKE ' . $this->dbHandle->quote($folderPathWithWildcard).'
83
+                       AND substr(`path`, ' . (strlen($this->path) + 2).') NOT LIKE "%/%"
84
+                       AND substr(`path`, ' . (strlen($this->path) + 1).', 1) = "/"
85
+                       AND path != ' . $this->dbHandle->quote($this->path).'
86 86
                     ';
87 87
         $stmt = $this->dbHandle->query($sql);
88 88
         if ($stmt === false) {
89 89
             $errorInfo = $this->dbHandle->errorInfo();
90 90
             $errorMsg = $errorInfo[2];
91
-            throw new \Exception('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
91
+            throw new \Exception('SQLite Exception: '.$errorMsg.' in SQL: <br /><pre>'.$sql.'</pre>');
92 92
         }
93 93
         $contents = $stmt->fetchAll(\PDO::FETCH_CLASS, '\library\storage\Document');
94 94
         foreach ($contents as $key => $document) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function __toString()
107 107
 	{
108
-		return 'Document:' . $this->title;
108
+		return 'Document:'.$this->title;
109 109
 	}
110 110
 
111 111
 
Please login to merge, or discard this patch.