protected function getSource($expr)
	{
		$php = 'switch(' . $expr . '){';
		foreach ($this->getValuesPerCodeBranch() as $branchCode => $values)
		{
			foreach ($values as $value)
			{
				$php .= 'case' . var_export((string) $value, true) . ':';
			}
			$php .= $branchCode . 'break;';
		}
		if ($this->defaultCode > '')
		{
			$php .= 'default:' . $this->defaultCode;
		}
		$php = preg_replace('(break;$)', '', $php) . '}';

		return $php;
	}
protected function getSource($expr)
	{
		$php = 'switch(' . $expr . '){';
		foreach ($this->getValuesPerCodeBranch() as $branchCode => $values)
		{
			foreach ($values as $value)
			{
				$php .= 'case' . var_export((string) $value, true) . ':';
			}
			$php .= $branchCode . 'break;';
		}
		if ($this->defaultCode > '')
		{
			$php .= 'default:' . $this->defaultCode;
		}
		$php = preg_replace('(break;$)', '', $php) . '}';

		return $php;
	}
protected function getSource ( $ expr ) { $ php = 'switch(' . $ expr . '){' ; foreach ( $ this -> getValuesPerCodeBranch ( ) as $ branchCode => $ values ) { foreach ( $ values as $ value ) { $ php .= 'case' . var_export ( ( string ) $ value , true ) . ':' ; } $ php .= $ branchCode . 'break;' ; } if ( $ this -> defaultCode > '' ) { $ php .= 'default:' . $ this -> defaultCode ; } $ php = preg_replace ( '(break;$)' , '' , $ php ) . '}' ; return $ php ; }
Return the source code for this switch statement

@param  string $expr Expression used for the switch clause
@return string       PHP code
Return the source code for this switch statement