diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php b/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php index e7b197c67092..39119ec68f49 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php @@ -51,10 +51,9 @@ protected function compileElsecannot($expression) /** * Compile the end-can statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndcan($expression) + protected function compileEndcan() { return ''; } @@ -62,10 +61,9 @@ protected function compileEndcan($expression) /** * Compile the end-cannot statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndcannot($expression) + protected function compileEndcannot() { return ''; } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php b/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php index cc26f5eced1d..af0eee7b6cb4 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php @@ -18,10 +18,9 @@ protected function compileComponent($expression) /** * Compile the end-component statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndComponent($expression) + protected function compileEndComponent() { return 'renderComponent(); ?>'; } @@ -40,10 +39,9 @@ protected function compileSlot($expression) /** * Compile the end-slot statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndSlot($expression) + protected function compileEndSlot() { return 'endSlot(); ?>'; } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php b/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php index d83e68478d04..d01db1c9e366 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php @@ -34,7 +34,7 @@ protected function compileIf($expression) */ protected function compileUnless($expression) { - return ""; + return ""; } /** @@ -51,10 +51,9 @@ protected function compileElseif($expression) /** * Compile the else statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileElse($expression) + protected function compileElse() { return ''; } @@ -62,10 +61,9 @@ protected function compileElse($expression) /** * Compile the end-if statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndif($expression) + protected function compileEndif() { return ''; } @@ -73,10 +71,9 @@ protected function compileEndif($expression) /** * Compile the end-unless statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndunless($expression) + protected function compileEndunless() { return ''; } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php b/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php index 4c83f1d87eff..a7b48871db7b 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php @@ -46,7 +46,7 @@ protected function compileRawEchos($value) $callback = function ($matches) { $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; - return $matches[1] ? substr($matches[0], 1) : 'compileEchoDefaults($matches[2]).'; ?>'.$whitespace; + return $matches[1] ? substr($matches[0], 1) : "compileEchoDefaults($matches[2])}; ?>{$whitespace}"; }; return preg_replace_callback($pattern, $callback, $value); @@ -67,7 +67,7 @@ protected function compileRegularEchos($value) $wrapped = sprintf($this->echoFormat, $this->compileEchoDefaults($matches[2])); - return $matches[1] ? substr($matches[0], 1) : ''.$whitespace; + return $matches[1] ? substr($matches[0], 1) : "{$whitespace}"; }; return preg_replace_callback($pattern, $callback, $value); @@ -86,7 +86,7 @@ protected function compileEscapedEchos($value) $callback = function ($matches) { $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; - return $matches[1] ? $matches[0] : 'compileEchoDefaults($matches[2]).'); ?>'.$whitespace; + return $matches[1] ? $matches[0] : "compileEchoDefaults($matches[2])}); ?>{$whitespace}"; }; return preg_replace_callback($pattern, $callback, $value); diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php b/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php index e2ac126c31d9..1dbd9ec21670 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php @@ -25,7 +25,7 @@ protected function compileInclude($expression) { $expression = $this->stripParentheses($expression); - return "make($expression, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; + return "make({$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; } /** @@ -38,6 +38,6 @@ protected function compileIncludeIf($expression) { $expression = $this->stripParentheses($expression); - return "exists($expression)) echo \$__env->make($expression, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; + return "exists({$expression})) echo \$__env->make({$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; } } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php b/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php index b67f1c894eb4..c295bcd448c5 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php @@ -14,6 +14,10 @@ protected function compileInject($expression) { $segments = explode(',', preg_replace("/[\(\)\\\"\']/", '', $expression)); - return '"; + $variable = trim($segments[0]); + + $service = trim($segments[1]); + + return ""; } } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php b/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php index 2ffcf676b8c2..b1ec55e1cf52 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php @@ -23,7 +23,7 @@ protected function compileExtends($expression) { $expression = $this->stripParentheses($expression); - $echo = "make($expression, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; + $echo = "make({$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; $this->footer[] = $echo; @@ -67,10 +67,9 @@ protected function compileYield($expression) /** * Compile the show statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileShow($expression) + protected function compileShow() { return 'yieldSection(); ?>'; } @@ -78,10 +77,9 @@ protected function compileShow($expression) /** * Compile the append statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileAppend($expression) + protected function compileAppend() { return 'appendSection(); ?>'; } @@ -89,10 +87,9 @@ protected function compileAppend($expression) /** * Compile the overwrite statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileOverwrite($expression) + protected function compileOverwrite() { return 'stopSection(true); ?>'; } @@ -100,10 +97,9 @@ protected function compileOverwrite($expression) /** * Compile the stop statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileStop($expression) + protected function compileStop() { return 'stopSection(); ?>'; } @@ -111,10 +107,9 @@ protected function compileStop($expression) /** * Compile the end-section statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndsection($expression) + protected function compileEndsection() { return 'stopSection(); ?>'; } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php b/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php index bf27df1e7888..ddc28aa4d3b4 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php @@ -37,10 +37,9 @@ protected function compileForelse($expression) /** * Compile the for-else-empty statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEmpty($expression) + protected function compileEmpty() { $empty = '$__empty_'.$this->forElseCounter--; @@ -50,10 +49,9 @@ protected function compileEmpty($expression) /** * Compile the end-for-else statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndforelse($expression) + protected function compileEndforelse() { return ''; } @@ -115,10 +113,9 @@ protected function compileContinue($expression) /** * Compile the end-for statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndfor($expression) + protected function compileEndfor() { return ''; } @@ -126,10 +123,9 @@ protected function compileEndfor($expression) /** * Compile the end-for-each statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndforeach($expression) + protected function compileEndforeach() { return 'popLoop(); $loop = $__env->getLastLoop(); ?>'; } @@ -148,10 +144,9 @@ protected function compileWhile($expression) /** * Compile the end-while statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndwhile($expression) + protected function compileEndwhile() { return ''; } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php b/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php index 8bcc707ae4f6..b49a386e3010 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php @@ -18,10 +18,9 @@ protected function compilePhp($expression) /** * Compile end-php statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndphp($expression) + protected function compileEndphp() { return ' ?>'; } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php b/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php index 9ea76b719fb3..b2b736b63f98 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php @@ -29,10 +29,9 @@ protected function compilePush($expression) /** * Compile the end-push statements into valid PHP. * - * @param string $expression * @return string */ - protected function compileEndpush($expression) + protected function compileEndpush() { return 'stopPush(); ?>'; } diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php b/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php index 8ffd80364e43..0ecdbfcbe5ff 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php @@ -17,7 +17,7 @@ protected function compileLang($expression) } elseif ($expression[1] === '[') { return "startTranslation{$expression}; ?>"; } else { - return "get$expression; ?>"; + return "get{$expression}; ?>"; } } @@ -39,6 +39,6 @@ protected function compileEndlang() */ protected function compileChoice($expression) { - return "choice$expression; ?>"; + return "choice{$expression}; ?>"; } }