| @@ -17,7 +17,6 @@ | ||
| 17 | 17 | use Cake\Filesystem\File; | 
| 18 | 18 | use Cake\Filesystem\Folder; | 
| 19 | 19 | use Cake\Utility\Hash; | 
| 20 | -use Cake\Utility\Inflector; | |
| 21 | 20 | use CMS\Core\Package\PackageFactory; | 
| 22 | 21 | use CMS\Core\Package\PluginPackage; | 
| 23 | 22 | use CMS\Core\StaticCacheTrait; | 
| @@ -178,7 +178,7 @@ | ||
| 178 | 178 | * | 
| 179 | 179 | * @param string $string Input string in UTF-8 | 
| 180 | 180 | * @param string $trimChars Characters to trim off | 
| 181 | - * @return trimmed string | |
| 181 | + * @return string string | |
| 182 | 182 | */ | 
| 183 | 183 | protected function _mbTrim($string, $trimChars = '\s') | 
| 184 | 184 |      { | 
| @@ -200,7 +200,7 @@ | ||
| 200 | 200 | /** | 
| 201 | 201 | * Generates a new connection to DB. | 
| 202 | 202 | * | 
| 203 | - * @return \Cake\Database\Connection|bool A connection object, or false on | |
| 203 | + * @return Connection A connection object, or false on | |
| 204 | 204 | * failure. On failure error messages are automatically set | 
| 205 | 205 | */ | 
| 206 | 206 | public function getConn() | 
| @@ -294,7 +294,7 @@ discard block | ||
| 294 | 294 | * Scopes the given query using the given operator token. | 
| 295 | 295 | * | 
| 296 | 296 | * @param \Cake\ORM\Query $query The query to scope | 
| 297 | - * @param \Search\Token $token Token describing an operator. e.g `-op_name:op_value` | |
| 297 | + * @param TokenInterface $token Token describing an operator. e.g `-op_name:op_value` | |
| 298 | 298 | * @return \Cake\ORM\Query Scoped query | 
| 299 | 299 | */ | 
| 300 | 300 | protected function _scopeOperator(Query $query, TokenInterface $token) | 
| @@ -306,7 +306,7 @@ discard block | ||
| 306 | 306 | * Scopes the given query using the given words token. | 
| 307 | 307 | * | 
| 308 | 308 | * @param \Cake\ORM\Query $query The query to scope | 
| 309 | - * @param \Search\TokenInterface $token Token describing a words sequence. e.g `this is a phrase` | |
| 309 | + * @param TokenInterface $token Token describing a words sequence. e.g `this is a phrase` | |
| 310 | 310 | * @return \Cake\ORM\Query Scoped query | 
| 311 | 311 | */ | 
| 312 | 312 | protected function _scopeWords(Query $query, TokenInterface $token) | 
| @@ -339,7 +339,7 @@ discard block | ||
| 339 | 339 | * Similar to "_scopeWords" but using MySQL's fulltext indexes. | 
| 340 | 340 | * | 
| 341 | 341 | * @param \Cake\ORM\Query $query The query to scope | 
| 342 | - * @param \Search\TokenInterface $token Token describing a words sequence. e.g `this is a phrase` | |
| 342 | + * @param TokenInterface $token Token describing a words sequence. e.g `this is a phrase` | |
| 343 | 343 | * @return \Cake\ORM\Query Scoped query | 
| 344 | 344 | */ | 
| 345 | 345 | protected function _scopeWordsInFulltext(Query $query, TokenInterface $token) | 
| @@ -369,7 +369,7 @@ discard block | ||
| 369 | 369 | /** | 
| 370 | 370 | * Whether FullText index is available or not. | 
| 371 | 371 | * | 
| 372 | - * @return bool True if enabled, false otherwise | |
| 372 | + * @return null|boolean True if enabled, false otherwise | |
| 373 | 373 | */ | 
| 374 | 374 | protected function _isFullTextEnabled() | 
| 375 | 375 |      { | 
| @@ -12,11 +12,7 @@ | ||
| 12 | 12 | namespace Search\Engine\Generic; | 
| 13 | 13 | |
| 14 | 14 | use Cake\Cache\Cache; | 
| 15 | -use Cake\Core\InstanceConfigTrait; | |
| 16 | 15 | use Cake\Datasource\EntityInterface; | 
| 17 | -use Cake\Error\FatalErrorException; | |
| 18 | -use Cake\Event\Event; | |
| 19 | -use Cake\Event\EventManager; | |
| 20 | 16 | use Cake\ORM\Query; | 
| 21 | 17 | use Cake\ORM\Table; | 
| 22 | 18 | use Cake\Utility\Hash; | 
| @@ -322,7 +322,7 @@ discard block | ||
| 322 | 322 | * operator. | 
| 323 | 323 | * | 
| 324 | 324 | * @param \Cake\ORM\Query $query The query to be scope | 
| 325 | - * @param \Search\TokenInterface $token Token describing an operator. e.g | |
| 325 | + * @param TokenInterface $token Token describing an operator. e.g | |
| 326 | 326 | * `-op_name:op_value` | 
| 327 | 327 | * @return \Cake\ORM\Query Scoped query | 
| 328 | 328 | */ | 
| @@ -363,7 +363,7 @@ discard block | ||
| 363 | 363 | * handling an operator named either `author-name` or `author_name`. | 
| 364 | 364 | * | 
| 365 | 365 | * @param \Cake\ORM\Query $query The query that is expected to be scoped | 
| 366 | - * @param \Search\TokenInterface $token Token describing an operator. e.g | |
| 366 | + * @param TokenInterface $token Token describing an operator. e.g | |
| 367 | 367 | * `-op_name:op_value` | 
| 368 | 368 | * @return mixed Scoped query object expected or null if event was not captured | 
| 369 | 369 | * by any listener | 
| @@ -82,7 +82,7 @@ | ||
| 82 | 82 | * | 
| 83 | 83 | * The above array is equivalent to: `PluginName/Admin/Users/index` | 
| 84 | 84 | * | 
| 85 | - * @param string|array $ref ACO path as described above | |
| 85 | + * @param string $ref ACO path as described above | |
| 86 | 86 | * @return \Cake\ORM\Query|bool False if not found or query result if found | 
| 87 | 87 | */ | 
| 88 | 88 | public function node($ref) | 
| @@ -373,7 +373,7 @@ | ||
| 373 | 373 | * | 
| 374 | 374 | * @param string $aco An ACO path to parse | 
| 375 | 375 | * @param bool $string Indicates if it should return a string format path (/Controller/action) | 
| 376 | - * @return bool|array|string An array as described above or false if an invalid $aco was given | |
| 376 | + * @return string An array as described above or false if an invalid $aco was given | |
| 377 | 377 | */ | 
| 378 | 378 | protected function _parseAco($aco, $string = true) | 
| 379 | 379 |      { | 
| @@ -12,7 +12,6 @@ | ||
| 12 | 12 | |
| 13 | 13 | use Cake\Cache\Cache; | 
| 14 | 14 | use Cake\I18n\I18n; | 
| 15 | -use Cake\Network\Session; | |
| 16 | 15 | use Cake\ORM\Entity; | 
| 17 | 16 | use Cake\ORM\TableRegistry; | 
| 18 | 17 | use Cake\Routing\Router; | 
| @@ -415,7 +415,7 @@ discard block | ||
| 415 | 415 | * Returns a list of all registered event listeners within the provided event | 
| 416 | 416 | * manager, or within the global manager if not provided. | 
| 417 | 417 | * | 
| 418 | - * @param \Cake\Event\EventManager\null $manager Event manager instance, or null | |
| 418 | + * @param EventManager $manager Event manager instance, or null | |
| 419 | 419 | * to use global manager instance. | 
| 420 | 420 | * @return array | 
| 421 | 421 | */ | 
| @@ -509,7 +509,7 @@ discard block | ||
| 509 | 509 | * | 
| 510 | 510 | * @param string $localeId Locale code. e.g. "en_NZ" (or "en-NZ") for | 
| 511 | 511 | * "English New Zealand" | 
| 512 | - * @return array Array with 2 indexes. 0 => language code, 1 => country code. | |
| 512 | + * @return string[] Array with 2 indexes. 0 => language code, 1 => country code. | |
| 513 | 513 | */ | 
| 514 | 514 | function localeSplit($localeId) | 
| 515 | 515 |      { | 
| @@ -631,7 +631,7 @@ discard block | ||
| 631 | 631 | * // out: aAABBBCCC | 
| 632 | 632 | * ``` | 
| 633 | 633 | * | 
| 634 | - * @param string|array $search The value being searched for | |
| 634 | + * @param string|null $search The value being searched for | |
| 635 | 635 | * @param string $replace The replacement value that replaces found search value | 
| 636 | 636 | * @param string $subject The string being searched and replaced on | 
| 637 | 637 | * @return string A string with the replaced value | 
| @@ -663,7 +663,7 @@ discard block | ||
| 663 | 663 | * // out: AAaBBBCCC | 
| 664 | 664 | * ``` | 
| 665 | 665 | * | 
| 666 | - * @param string|array $search The value being searched for | |
| 666 | + * @param string $search The value being searched for | |
| 667 | 667 | * @param string $replace The replacement value that replaces found search value | 
| 668 | 668 | * @param string $subject The string being searched and replaced on | 
| 669 | 669 | * @return string A string with the replaced value | 
| @@ -16,9 +16,7 @@ | ||
| 16 | 16 | use Cake\Error\Debugger; | 
| 17 | 17 | use Cake\Error\FatalErrorException; | 
| 18 | 18 | use Cake\Event\EventManager; | 
| 19 | -use Cake\Filesystem\File; | |
| 20 | 19 | use Cake\Filesystem\Folder; | 
| 21 | -use Cake\I18n\I18n; | |
| 22 | 20 | use Cake\ORM\Entity; | 
| 23 | 21 | use Cake\ORM\TableRegistry; | 
| 24 | 22 | use Cake\Routing\Router; |