| @@ -151,7 +151,7 @@ discard block | ||
| 151 | 151 |          if (!empty($this->encryption)) { | 
| 152 | 152 |              if ($this->comments) { | 
| 153 | 153 | $this->spacer() | 
| 154 | -                     ->comment('Our PGP key'); | |
| 154 | +                        ->comment('Our PGP key'); | |
| 155 | 155 | } | 
| 156 | 156 | |
| 157 | 157 |              $this->line('Encryption: ' . trim($this->encryption)); | 
| @@ -160,7 +160,7 @@ discard block | ||
| 160 | 160 |          if (!empty($this->disclosure)) { | 
| 161 | 161 |              if ($this->comments) { | 
| 162 | 162 | $this->spacer() | 
| 163 | -                     ->comment('Our disclosure policy'); | |
| 163 | +                        ->comment('Our disclosure policy'); | |
| 164 | 164 | } | 
| 165 | 165 | |
| 166 | 166 |              $this->line('Disclosure: ' . trim(ucfirst($this->disclosure))); | 
| @@ -169,7 +169,7 @@ discard block | ||
| 169 | 169 |          if (!empty($this->acknowledgement)) { | 
| 170 | 170 |              if ($this->comments) { | 
| 171 | 171 | $this->spacer() | 
| 172 | -                     ->comment('Our public acknowledgement'); | |
| 172 | +                        ->comment('Our public acknowledgement'); | |
| 173 | 173 | } | 
| 174 | 174 | |
| 175 | 175 |              $this->line('Acknowledgement: ' . trim($this->acknowledgement)); | 
| @@ -177,19 +177,19 @@ discard block | ||
| 177 | 177 | |
| 178 | 178 |          if ($this->debug && isset($time)) { | 
| 179 | 179 | $this->spacer() | 
| 180 | - ->comment() | |
| 181 | - ->comment( | |
| 182 | -                     'Generated by "' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt"' . | |
| 183 | -                     (defined('LARAVEL_SECURITY_TXT_VERSION') ? ' v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? ' v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : ''))) . | |
| 184 | -                     ' (https://github.com/austinheap/' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? '/releases/tag/v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? '/releases/tag/v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : ''))) . ')'); | |
| 180 | + ->comment() | |
| 181 | + ->comment( | |
| 182 | +                        'Generated by "' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt"' . | |
| 183 | +                        (defined('LARAVEL_SECURITY_TXT_VERSION') ? ' v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? ' v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : ''))) . | |
| 184 | +                        ' (https://github.com/austinheap/' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? '/releases/tag/v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? '/releases/tag/v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : ''))) . ')'); | |
| 185 | 185 |              if (defined('LARAVEL_SECURITY_TXT_VERSION') || defined('WORDPRESS_SECURITY_TXT_VERSION')) { | 
| 186 | 186 | $this->comment( | 
| 187 | 187 |                      'using "php-security-txt"' . (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : '') . | 
| 188 | 188 |                      ' (https://github.com/austinheap/php-security-txt' . (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : '') . ')'); | 
| 189 | 189 | } | 
| 190 | 190 |              $this->comment('in ' . round((microtime(true) - $time) * 1000, 6) . ' seconds on ' . date('c') . '.') | 
| 191 | - ->comment() | |
| 192 | - ->spacer(); | |
| 191 | + ->comment() | |
| 192 | + ->spacer(); | |
| 193 | 193 | } | 
| 194 | 194 | |
| 195 | 195 | $output = implode(PHP_EOL, $this->lines); | 
| @@ -52,10 +52,10 @@ discard block | ||
| 52 | 52 | $comment = trim($comment); | 
| 53 | 53 | |
| 54 | 54 |          if (!empty($comment)) { | 
| 55 | - $comment = ' ' . $comment; | |
| 55 | + $comment = ' '.$comment; | |
| 56 | 56 | } | 
| 57 | 57 | |
| 58 | -        return $this->line(trim('#' . $comment)); | |
| 58 | +        return $this->line(trim('#'.$comment)); | |
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | 61 | /** | 
| @@ -145,7 +145,7 @@ discard block | ||
| 145 | 145 | } | 
| 146 | 146 | |
| 147 | 147 |          foreach (array_keys($this->contacts) as $contact) { | 
| 148 | -            $this->line('Contact: ' . trim($contact)); | |
| 148 | +            $this->line('Contact: '.trim($contact)); | |
| 149 | 149 | } | 
| 150 | 150 | |
| 151 | 151 |          if (!empty($this->encryption)) { | 
| @@ -154,7 +154,7 @@ discard block | ||
| 154 | 154 |                       ->comment('Our PGP key'); | 
| 155 | 155 | } | 
| 156 | 156 | |
| 157 | -            $this->line('Encryption: ' . trim($this->encryption)); | |
| 157 | +            $this->line('Encryption: '.trim($this->encryption)); | |
| 158 | 158 | } | 
| 159 | 159 | |
| 160 | 160 |          if (!empty($this->disclosure)) { | 
| @@ -163,7 +163,7 @@ discard block | ||
| 163 | 163 |                       ->comment('Our disclosure policy'); | 
| 164 | 164 | } | 
| 165 | 165 | |
| 166 | -            $this->line('Disclosure: ' . trim(ucfirst($this->disclosure))); | |
| 166 | +            $this->line('Disclosure: '.trim(ucfirst($this->disclosure))); | |
| 167 | 167 | } | 
| 168 | 168 | |
| 169 | 169 |          if (!empty($this->acknowledgement)) { | 
| @@ -172,22 +172,22 @@ discard block | ||
| 172 | 172 |                       ->comment('Our public acknowledgement'); | 
| 173 | 173 | } | 
| 174 | 174 | |
| 175 | -            $this->line('Acknowledgement: ' . trim($this->acknowledgement)); | |
| 175 | +            $this->line('Acknowledgement: '.trim($this->acknowledgement)); | |
| 176 | 176 | } | 
| 177 | 177 | |
| 178 | 178 |          if ($this->debug && isset($time)) { | 
| 179 | 179 | $this->spacer() | 
| 180 | 180 | ->comment() | 
| 181 | 181 | ->comment( | 
| 182 | -                     'Generated by "' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt"' . | |
| 183 | -                     (defined('LARAVEL_SECURITY_TXT_VERSION') ? ' v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? ' v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : ''))) . | |
| 184 | -                     ' (https://github.com/austinheap/' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')) . '-security-txt' . (defined('LARAVEL_SECURITY_TXT_VERSION') ? '/releases/tag/v' . LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? '/releases/tag/v' . WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : ''))) . ')'); | |
| 182 | +                     'Generated by "'.(defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')).'-security-txt"'. | |
| 183 | +                     (defined('LARAVEL_SECURITY_TXT_VERSION') ? ' v'.LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? ' v'.WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? ' v'.PHP_SECURITY_TXT_VERSION : ''))). | |
| 184 | +                     ' (https://github.com/austinheap/'.(defined('LARAVEL_SECURITY_TXT_VERSION') ? 'laravel' : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? 'wordpress' : 'php')).'-security-txt'.(defined('LARAVEL_SECURITY_TXT_VERSION') ? '/releases/tag/v'.LARAVEL_SECURITY_TXT_VERSION : (defined('WORDPRESS_SECURITY_TXT_VERSION') ? '/releases/tag/v'.WORDPRESS_SECURITY_TXT_VERSION : (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v'.PHP_SECURITY_TXT_VERSION : ''))).')'); | |
| 185 | 185 |              if (defined('LARAVEL_SECURITY_TXT_VERSION') || defined('WORDPRESS_SECURITY_TXT_VERSION')) { | 
| 186 | 186 | $this->comment( | 
| 187 | -                    'using "php-security-txt"' . (defined('PHP_SECURITY_TXT_VERSION') ? ' v' . PHP_SECURITY_TXT_VERSION : '') . | |
| 188 | -                    ' (https://github.com/austinheap/php-security-txt' . (defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v' . PHP_SECURITY_TXT_VERSION : '') . ')'); | |
| 187 | +                    'using "php-security-txt"'.(defined('PHP_SECURITY_TXT_VERSION') ? ' v'.PHP_SECURITY_TXT_VERSION : ''). | |
| 188 | +                    ' (https://github.com/austinheap/php-security-txt'.(defined('PHP_SECURITY_TXT_VERSION') ? '/releases/tag/v'.PHP_SECURITY_TXT_VERSION : '').')'); | |
| 189 | 189 | } | 
| 190 | -            $this->comment('in ' . round((microtime(true) - $time) * 1000, 6) . ' seconds on ' . date('c') . '.') | |
| 190 | +            $this->comment('in '.round((microtime(true) - $time) * 1000, 6).' seconds on '.date('c').'.') | |
| 191 | 191 | ->comment() | 
| 192 | 192 | ->spacer(); | 
| 193 | 193 | } | 
| @@ -7,7 +7,7 @@ | ||
| 7 | 7 | * @version v0.4.0 | 
| 8 | 8 | */ | 
| 9 | 9 | |
| 10 | -declare(strict_types=1); | |
| 10 | +declare(strict_types = 1); | |
| 11 | 11 | |
| 12 | 12 | namespace AustinHeap\Security\Txt; | 
| 13 | 13 | |
| @@ -112,9 +112,9 @@ discard block | ||
| 112 | 112 | |
| 113 | 113 |          if (func_num_args() == 1) { | 
| 114 | 114 |              if (is_null($this->parent)) { | 
| 115 | -                throw new Exception('Cannot create ' . __CLASS__ . ' with explicitly null $parent class.'); | |
| 115 | +                throw new Exception('Cannot create '.__CLASS__.' with explicitly null $parent class.'); | |
| 116 | 116 |              } elseif (!$this->parent instanceof Reader && !$this->parent instanceof Writer) { | 
| 117 | -                throw new Exception('Cannot create ' . __CLASS__ . ' with $parent class: ' . get_class($this->parent)); | |
| 117 | +                throw new Exception('Cannot create '.__CLASS__.' with $parent class: '.get_class($this->parent)); | |
| 118 | 118 | } | 
| 119 | 119 | } | 
| 120 | 120 | |
| @@ -308,6 +308,6 @@ discard block | ||
| 308 | 308 | return null; | 
| 309 | 309 | } | 
| 310 | 310 | |
| 311 | -        throw new Exception('Function "' . $function . '" must be overridden by parent SecurityTxtInterface before being called.'); | |
| 311 | +        throw new Exception('Function "'.$function.'" must be overridden by parent SecurityTxtInterface before being called.'); | |
| 312 | 312 | } | 
| 313 | 313 | } |