From 7c42d8110af5d0861da26700893978cc333c949e Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 25 Oct 2013 20:01:02 +0000 Subject: [PATCH] Fix last of lint issues leading up to packaging --- include/class.faq.php | 2 +- setup/test/tests/class.php_analyze.php | 2 +- setup/test/tests/test.undefinedmethods.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class.faq.php b/include/class.faq.php index 4445a7cf7..70a7e2540 100644 --- a/include/class.faq.php +++ b/include/class.faq.php @@ -112,7 +112,7 @@ class FAQ { function setKeywords($words) { $this->ht['keywords'] = $words; } function setNotes($text) { $this->ht['notes'] = $text; } - /* For ->attach() and ->detach(), use $this->attachments() */ + /* For ->attach() and ->detach(), use $this->attachments() (nolint) */ function attach($file) { return $this->_attachments->add($file); } function detach($file) { return $this->_attachments->remove($file); } diff --git a/setup/test/tests/class.php_analyze.php b/setup/test/tests/class.php_analyze.php index f06684664..9690c980a 100644 --- a/setup/test/tests/class.php_analyze.php +++ b/setup/test/tests/class.php_analyze.php @@ -195,7 +195,7 @@ class SourceAnalyzer extends Test { break; case T_STATIC: $c = current($this->tokens); - // static::func() or static::$var + // (nolint) static::func() or static::$var if ($c[0] == T_PAAMAYIM_NEKUDOTAYIM) break; case T_GLOBAL: diff --git a/setup/test/tests/test.undefinedmethods.php b/setup/test/tests/test.undefinedmethods.php index 4d22d1aaf..2e06a452b 100644 --- a/setup/test/tests/test.undefinedmethods.php +++ b/setup/test/tests/test.undefinedmethods.php @@ -32,7 +32,7 @@ function find_function_calls($scripts) { $lineno=0; foreach ($lines as $line) { $lineno++; $matches=array(); - preg_match_all('/(?:-[>]|::)([a-zA-Z0-9_]+)\(.*/', $line, $matches, + preg_match_all('/^.*\w+(?:-[>]|::)([a-zA-Z0-9_]+)\(.*/', $line, $matches, PREG_SET_ORDER); foreach ($matches as $m) if (strpos($m[0], 'nolint') === false) -- GitLab