Skip to content
Permalink
Browse files

Return type of Cake\Shell\Shell::abort() is void so it should never b…

…e used
  • Loading branch information...
ondrejmirtes committed Jan 8, 2017
1 parent bf4c393 commit 6386fcaac0427b133d08b80187438a4c5b4654e6
Showing with 5 additions and 2 deletions.
  1. +3 −0 phpstan.neon
  2. +2 −2 src/Shell/I18nShell.php
@@ -12,6 +12,9 @@ parameters:
- '#Access to undefined constant Memcached::DYNAMIC_CLIENT_MODE#'
- '#Access to undefined constant PDO::SQLSRV_ATTR_ENCODING#'
- '#Access to undefined constant PDO::SQLSRV_ENCODING_BINARY#'
earlyTerminatingMethodCalls:
Cake\Shell\Shell:
- abort

services:
-
@@ -79,15 +79,15 @@ public function main()
* Inits PO file from POT file.
*
* @param string|null $language Language code to use.
* @return int|null
* @return void
*/
public function init($language = null)
{
if (!$language) {
$language = $this->in('Please specify language code, e.g. `en`, `eng`, `en_US` etc.');
}
if (strlen($language) < 2) {
return $this->abort('Invalid language code. Valid is `en`, `eng`, `en_US` etc.');
$this->abort('Invalid language code. Valid is `en`, `eng`, `en_US` etc.');
}
$this->_paths = [APP];

0 comments on commit 6386fca

Please sign in to comment.
You can’t perform that action at this time.