src/Shell/InflectShell.php
protected function _getMethod() {
		$validCharacters = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'q'];
		$validCommands = array_merge($validCharacters, $this->validCommands);

		$command = null;
		while (empty($command)) {
			$this->out('Please type the number or name of the inflection method you would like to use');
			$this->hr();
			$this->out('[1] Pluralize');
			$this->out('[2] Singularize');
			$this->out('[3] Camelize');
			$this->out('[4] Underscore');
			$this->out('[5] Humanize');
			$this->out('[6] Tableize');
			$this->out('[7] Classify');
			$this->out('[8] Variable');
			$this->out('[9] Dasherize');
			$this->out('[10] Slug');
			$this->out('[q] Quit');
			$temp = $this->in('What command would you like to perform?', null, 'q');
			if (in_array(strtolower($temp), $validCommands)) {
				$command = strtolower($temp);
			} else {
				$this->out('Try again.');
			}
		}

		switch ($command) {
			case '1':
			case 'pluralize':
				return 'pluralize';
			case '2':
			case 'singularize':
				return 'singularize';
			case '3':
			case 'camelize':
				return 'camelize';
			case '4':
			case 'underscore':
				return 'underscore';
			case '5':
			case 'humanize':
				return 'humanize';
			case '6':
			case 'tableize':
				return 'tableize';
			case '7':
			case 'classify':
				return 'classify';
			case '8':
			case 'variable':
				return 'variable';
			case '9':
			case 'dasherize':
				return 'dasherize';
			case '10':
			case 'slug':
				return 'slug';
			case 'q':
			case 'quit':
			default:
				$this->out('Exit');
				$this->_stop();
				return null;
		}
	}
protected function _getMethod() {
		$validCharacters = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'q'];
		$validCommands = array_merge($validCharacters, $this->validCommands);

		$command = null;
		while (empty($command)) {
			$this->out('Please type the number or name of the inflection method you would like to use');
			$this->hr();
			$this->out('[1] Pluralize');
			$this->out('[2] Singularize');
			$this->out('[3] Camelize');
			$this->out('[4] Underscore');
			$this->out('[5] Humanize');
			$this->out('[6] Tableize');
			$this->out('[7] Classify');
			$this->out('[8] Variable');
			$this->out('[9] Dasherize');
			$this->out('[10] Slug');
			$this->out('[q] Quit');
			$temp = $this->in('What command would you like to perform?', null, 'q');
			if (in_array(strtolower($temp), $validCommands)) {
				$command = strtolower($temp);
			} else {
				$this->out('Try again.');
			}
		}

		switch ($command) {
			case '1':
			case 'pluralize':
				return 'pluralize';
			case '2':
			case 'singularize':
				return 'singularize';
			case '3':
			case 'camelize':
				return 'camelize';
			case '4':
			case 'underscore':
				return 'underscore';
			case '5':
			case 'humanize':
				return 'humanize';
			case '6':
			case 'tableize':
				return 'tableize';
			case '7':
			case 'classify':
				return 'classify';
			case '8':
			case 'variable':
				return 'variable';
			case '9':
			case 'dasherize':
				return 'dasherize';
			case '10':
			case 'slug':
				return 'slug';
			case 'q':
			case 'quit':
			default:
				$this->out('Exit');
				$this->_stop();
				return null;
		}
	}
protected function _getMethod ( ) { $ validCharacters = [ '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '10' , 'q' ] ; $ validCommands = array_merge ( $ validCharacters , $ this -> validCommands ) ; $ command = null ; while ( empty ( $ command ) ) { $ this -> out ( 'Please type the number or name of the inflection method you would like to use' ) ; $ this -> hr ( ) ; $ this -> out ( '[1] Pluralize' ) ; $ this -> out ( '[2] Singularize' ) ; $ this -> out ( '[3] Camelize' ) ; $ this -> out ( '[4] Underscore' ) ; $ this -> out ( '[5] Humanize' ) ; $ this -> out ( '[6] Tableize' ) ; $ this -> out ( '[7] Classify' ) ; $ this -> out ( '[8] Variable' ) ; $ this -> out ( '[9] Dasherize' ) ; $ this -> out ( '[10] Slug' ) ; $ this -> out ( '[q] Quit' ) ; $ temp = $ this -> in ( 'What command would you like to perform?' , null , 'q' ) ; if ( in_array ( strtolower ( $ temp ) , $ validCommands ) ) { $ command = strtolower ( $ temp ) ; } else { $ this -> out ( 'Try again.' ) ; } } switch ( $ command ) { case '1' : case 'pluralize' : return 'pluralize' ; case '2' : case 'singularize' : return 'singularize' ; case '3' : case 'camelize' : return 'camelize' ; case '4' : case 'underscore' : return 'underscore' ; case '5' : case 'humanize' : return 'humanize' ; case '6' : case 'tableize' : return 'tableize' ; case '7' : case 'classify' : return 'classify' ; case '8' : case 'variable' : return 'variable' ; case '9' : case 'dasherize' : return 'dasherize' ; case '10' : case 'slug' : return 'slug' ; case 'q' : case 'quit' : default : $ this -> out ( 'Exit' ) ; $ this -> _stop ( ) ; return null ; } }
Requests a valid inflection method

@return string|null
Requests a valid inflection method