Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getLanguages is not static #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update TextLanguageDetect.php
Is not necessary for getLanguages to be static. In PHP 5.6 throw an error like "$this is not accessible in static context", and in the example, TextLanguageDetect is always instantiated.
  • Loading branch information
isholgueras committed Mar 8, 2016
commit 675b1c43238d5ccaeedbd82073a9bbfe29b868b0
2 changes: 1 addition & 1 deletion lib/TextLanguageDetect/TextLanguageDetect.php
Original file line number Diff line number Diff line change
@@ -422,7 +422,7 @@ public function languageExists($lang)
* @return array the names of the languages known to this object<<<<<<<
* @throws TextLanguageDetectException
*/
public static function getLanguages()
public function getLanguages()
{
return $this->_convertToNameMode(
array_keys($this->_lang_db)