From 873616bafa05f3714dbc8b51f8c58ef0507643dd Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Fri, 25 Mar 2016 16:19:20 +0000
Subject: [PATCH] lint: Lint test fixes

---
 include/ajax.tickets.php      | 3 +--
 include/class.thread.php      | 2 +-
 scp/tickets.php               | 2 +-
 setup/inc/class.installer.php | 2 +-
 setup/test/tests/stubs.php    | 2 ++
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php
index 2ae54c819..74bbd13e5 100644
--- a/include/ajax.tickets.php
+++ b/include/ajax.tickets.php
@@ -737,8 +737,7 @@ class TicketsAjaxAPI extends AjaxController {
             if (!$thisstaff->hasPerm(Ticket::PERM_DELETE, false))
                 $errors['err'] = sprintf(
                         __('You do not have permission %s'),
-                        __('to delete tickets'))
-
+                        __('to delete tickets'));
 
             if ($_POST && !$errors) {
                 foreach ($_POST['tids'] as $tid) {
diff --git a/include/class.thread.php b/include/class.thread.php
index 90ae737c6..07073b11c 100644
--- a/include/class.thread.php
+++ b/include/class.thread.php
@@ -2176,7 +2176,7 @@ class ThreadEntryBody /* extends SplString */ {
 
     static function clean($text, $format=null) {
         global $cfg;
-        $format = $format ?: ($cfg->isHtmlThreadEnabled() ? 'html' : 'text');
+        $format = $format ?: ($cfg->isRichTextEnabled() ? 'html' : 'text');
         $body = static::fromFormattedText($text, $format);
         return $body->getClean();
     }
diff --git a/scp/tickets.php b/scp/tickets.php
index 030db306b..7e8f027dc 100644
--- a/scp/tickets.php
+++ b/scp/tickets.php
@@ -337,7 +337,7 @@ if($_POST && !$errors):
                         unset($_SESSION[':form-data']);
                     } elseif(!$errors['err']) {
                         $errors['err']=sprintf('%s %s',
-                            __('Unable to create the ticket.',
+                            __('Unable to create the ticket.'),
                             __('Correct any errors below and try again.'));
                     }
                 }
diff --git a/setup/inc/class.installer.php b/setup/inc/class.installer.php
index d922eab1b..b382aa0f6 100644
--- a/setup/inc/class.installer.php
+++ b/setup/inc/class.installer.php
@@ -64,7 +64,7 @@ class Installer extends SetupWizard {
         $vars = array_map('trim', $vars);
 
         if(!Validator::process($f,$vars,$this->errors) && !$this->errors['err'])
-            $errors['err'] = sprintf('%s — %s',
+            $this->errors['err'] = sprintf('%s — %s',
                 __('Missing or invalid data'),
                 __('Correct any errors below and try again'));
 
diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php
index 6bcbf3110..657e891bd 100644
--- a/setup/test/tests/stubs.php
+++ b/setup/test/tests/stubs.php
@@ -38,6 +38,7 @@ class ReflectionClass {
     function getMethods() {}
     function getConstants() {}
     function newInstanceArgs() {}
+    function newInstanceWithoutConstructor() {}
 }
 
 class DomNode {
@@ -140,6 +141,7 @@ class SqlExpression {
 }
 
 class SqlInterval {
+    static function SECOND() {}
     static function MINUTE() {}
     static function DAY() {}
 }
-- 
GitLab