Code Duplication    Length = 24-25 lines in 2 locations

Sources/SearchAPI-Custom.php 1 location

@@ 69-93 (lines=25) @@
66
	/**
67
	 * {@inheritDoc}
68
	 */
69
	public function supportsMethod($methodName, $query_params = null)
70
	{
71
		$return = false;
72
		switch ($methodName)
73
		{
74
			case 'isValid':
75
			case 'searchSort':
76
			case 'prepareIndexes':
77
			case 'indexedWordQuery':
78
			case 'postCreated':
79
			case 'postModified':
80
				$return = true;
81
			break;
82
83
			// All other methods, too bad dunno you.
84
			default:
85
				$return = false;
86
		}
87
88
		// Maybe parent got support
89
		if (!$return)
90
			$return = parent::supportsMethod($methodName, $query_params);
91
92
		return $return;
93
	}
94
95
	/**
96
	 * {@inheritDoc}

Sources/SearchAPI-Fulltext.php 1 location

@@ 59-82 (lines=24) @@
56
	/**
57
	 * {@inheritDoc}
58
	 */
59
	public function supportsMethod($methodName, $query_params = null)
60
	{
61
		$return = false;
62
		switch ($methodName)
63
		{
64
			case 'searchSort':
65
			case 'prepareIndexes':
66
			case 'indexedWordQuery':
67
			case 'postRemoved':
68
				$return = true;
69
			break;
70
71
			// All other methods, too bad dunno you.
72
			default:
73
				$return = false;
74
			break;
75
		}
76
77
		// Maybe parent got support
78
		if (!$return)
79
			$return = parent::supportsMethod($methodName, $query_params);
80
81
		return $return;
82
	}
83
84
	/**
85
	 * fulltext_search::_getMinWordLength()