@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | public function excludeTags(array $tagNames) : self |
| 61 | 61 | { |
| 62 | - foreach($tagNames as $tagName) |
|
| 62 | + foreach ($tagNames as $tagName) |
|
| 63 | 63 | { |
| 64 | 64 | $this->excludeTag((string)$tagName); |
| 65 | 65 | } |
@@ -52,12 +52,12 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $this->parts[] = $this->renderTag(array('command-name'), $this->command->getName()); |
| 54 | 54 | |
| 55 | - if($this->command->hasType()) |
|
| 55 | + if ($this->command->hasType()) |
|
| 56 | 56 | { |
| 57 | 57 | $this->parts[] = ' '.$this->renderTag(array('command-type'), $this->command->getType()); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - if($this->command->requiresParameters()) |
|
| 60 | + if ($this->command->requiresParameters()) |
|
| 61 | 61 | { |
| 62 | 62 | $this->parts[] = $this->renderTag(array('hyphen'), ':'); |
| 63 | 63 | $this->parts[] = '<wbr>'; |
@@ -68,14 +68,14 @@ discard block |
||
| 68 | 68 | { |
| 69 | 69 | $params = $command->getParams(); |
| 70 | 70 | |
| 71 | - if($params === null) |
|
| 71 | + if ($params === null) |
|
| 72 | 72 | { |
| 73 | 73 | return; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $tokens = $params->getInfo()->getTokens(); |
| 77 | 77 | |
| 78 | - if(!empty($tokens)) |
|
| 78 | + if (!empty($tokens)) |
|
| 79 | 79 | { |
| 80 | 80 | $this->parts[] = ' '; |
| 81 | 81 | $this->parts[] = '<span class="mailcode-params">'; |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - protected function appendParamToken(Mailcode_Parser_Statement_Tokenizer_Token $token, ?Mailcode_Parser_Statement_Tokenizer_Token $previous=null) : void |
|
| 94 | + protected function appendParamToken(Mailcode_Parser_Statement_Tokenizer_Token $token, ?Mailcode_Parser_Statement_Tokenizer_Token $previous = null) : void |
|
| 95 | 95 | { |
| 96 | - if($previous && $previous->hasSpacing()) { |
|
| 96 | + if ($previous && $previous->hasSpacing()) { |
|
| 97 | 97 | $this->parts[] = ' '; |
| 98 | 98 | } |
| 99 | 99 | |
@@ -102,14 +102,14 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | protected function appendLogicKeywords() : void |
| 104 | 104 | { |
| 105 | - if(!$this->command->supportsLogicKeywords()) |
|
| 105 | + if (!$this->command->supportsLogicKeywords()) |
|
| 106 | 106 | { |
| 107 | 107 | return; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | $keywords = $this->command->getLogicKeywords()->getKeywords(); |
| 111 | 111 | |
| 112 | - foreach($keywords as $keyword) |
|
| 112 | + foreach ($keywords as $keyword) |
|
| 113 | 113 | { |
| 114 | 114 | $this->appendLogicKeyword($keyword); |
| 115 | 115 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | $type = $keyword->getType(); |
| 123 | 123 | |
| 124 | - if(!empty($type)) |
|
| 124 | + if (!empty($type)) |
|
| 125 | 125 | { |
| 126 | 126 | $this->parts[] = ' '.$this->renderTag(array('command-type'), $type); |
| 127 | 127 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | $parts = array(); |
| 142 | 142 | |
| 143 | - foreach($classes as $class) |
|
| 143 | + foreach ($classes as $class) |
|
| 144 | 144 | { |
| 145 | 145 | $parts[] = 'mailcode-'.$class; |
| 146 | 146 | } |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | use AppUtils\CSVHelper; |
| 16 | 16 | use AppUtils\FileHelper; |
| 17 | 17 | use libphonenumber\PhoneNumberFormat; |
| 18 | -use libphonenumber\PhoneNumberUtil;use Mailcode\Mailcode;use function AppLocalize\pts; |
|
| 18 | +use libphonenumber\PhoneNumberUtil; use Mailcode\Mailcode; use function AppLocalize\pts; |
|
| 19 | 19 | |
| 20 | 20 | require_once 'prepend.php'; |
| 21 | 21 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $meta = $phoneNumberUtil->getMetadataForRegion($code); |
| 91 | 91 | if (!$meta) { |
| 92 | - die('No metadata for ' . $code); |
|
| 92 | + die('No metadata for '.$code); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $exampleNumber = $phoneNumberUtil->getExampleNumber($code); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | use Mailcode\Mailcode_Exception; |
| 17 | 17 | use Mailcode\Mailcode_Translator_Exception; |
| 18 | 18 | use function \AppLocalize\pt; |
| 19 | -use function \AppLocalize\pts;use function AppLocalize\t; |
|
| 19 | +use function \AppLocalize\pts; use function AppLocalize\t; |
|
| 20 | 20 | |
| 21 | 21 | require_once 'prepend.php'; |
| 22 | 22 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $translated = ''; |
| 28 | 28 | $error = null; |
| 29 | 29 | |
| 30 | -if($request->getBool('highlight')) |
|
| 30 | +if ($request->getBool('highlight')) |
|
| 31 | 31 | { |
| 32 | 32 | $commandsText = $request->getParam('mailcode'); |
| 33 | 33 | |
@@ -42,13 +42,13 @@ discard block |
||
| 42 | 42 | $error = $e->getMessage(); |
| 43 | 43 | |
| 44 | 44 | $collection = $e->getCollection(); |
| 45 | - if($collection) |
|
| 45 | + if ($collection) |
|
| 46 | 46 | { |
| 47 | 47 | $first = $collection->getFirstError(); |
| 48 | 48 | $error = $first->getMessage(); |
| 49 | 49 | $matched = $first->getMatchedText(); |
| 50 | - if(!empty($matched)) { |
|
| 51 | - $error .= '<br>'. t('In command:').' <code>'.$matched.'</code>'; |
|
| 50 | + if (!empty($matched)) { |
|
| 51 | + $error .= '<br>'.t('In command:').' <code>'.$matched.'</code>'; |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | <p></p><br> |
| 93 | 93 | <h2><?php pt('Highlighted commands') ?></h2> |
| 94 | 94 | <?php |
| 95 | - if(empty($commandsText)) |
|
| 95 | + if (empty($commandsText)) |
|
| 96 | 96 | { |
| 97 | 97 | ?> |
| 98 | 98 | <div class="alert alert-info"> |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | </div> |
| 101 | 101 | <?php |
| 102 | 102 | } |
| 103 | - else if($error) |
|
| 103 | + else if ($error) |
|
| 104 | 104 | { |
| 105 | 105 | ?> |
| 106 | 106 | <div class="alert alert-danger"> |