@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright Copyright (c) 2015 ublaboo <[email protected]> |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Ublaboo\Mailing\Exception; |
| 5 | 5 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright Copyright (c) 2015 ublaboo <[email protected]> |
@@ -37,11 +37,11 @@ discard block |
||
| 37 | 37 | public function log($type, Nette\Mail\Message $mail) |
| 38 | 38 | { |
| 39 | 39 | $timestamp = date('Y-m-d H:i:s'); |
| 40 | - $type .= '.' . time(); |
|
| 40 | + $type .= '.'.time(); |
|
| 41 | 41 | $file = $this->getLogFile($type, $timestamp); |
| 42 | 42 | |
| 43 | 43 | if (file_exists($file) && filesize($file)) { |
| 44 | - $file = str_replace(static::LOG_EXTENSION, '.' . uniqid() . static::LOG_EXTENSION, $file); |
|
| 44 | + $file = str_replace(static::LOG_EXTENSION, '.'.uniqid().static::LOG_EXTENSION, $file); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | file_put_contents($file, $mail->generateMessage()); |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | preg_match('/^((([0-9]{4})-[0-9]{2})-[0-9]{2}).*/', $timestamp, $fragments); |
| 60 | 60 | |
| 61 | - $year_dir = $this->log_directory . '/' . $fragments[3]; |
|
| 62 | - $month_dir = $year_dir . '/' . $fragments[2]; |
|
| 63 | - $day_dir = $month_dir . '/' . $fragments[1]; |
|
| 64 | - $file = $day_dir . '/' . $type . static::LOG_EXTENSION; |
|
| 61 | + $year_dir = $this->log_directory.'/'.$fragments[3]; |
|
| 62 | + $month_dir = $year_dir.'/'.$fragments[2]; |
|
| 63 | + $day_dir = $month_dir.'/'.$fragments[1]; |
|
| 64 | + $file = $day_dir.'/'.$type.static::LOG_EXTENSION; |
|
| 65 | 65 | |
| 66 | 66 | if (!file_exists($day_dir)) { |
| 67 | 67 | mkdir($day_dir, 0777, true); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright Copyright (c) 2015 ublaboo <[email protected]> |
@@ -174,11 +174,11 @@ discard block |
||
| 174 | 174 | /** |
| 175 | 175 | * Convert class name to underscore and set latte file extension |
| 176 | 176 | */ |
| 177 | - $this->underscore_name = lcfirst(preg_replace_callback('/(?<=.)([A-Z])/', function ($m) { |
|
| 178 | - return '_' . strtolower($m[1]); |
|
| 177 | + $this->underscore_name = lcfirst(preg_replace_callback('/(?<=.)([A-Z])/', function($m) { |
|
| 178 | + return '_'.strtolower($m[1]); |
|
| 179 | 179 | }, $class_name)); |
| 180 | 180 | |
| 181 | - $template_name = $this->underscore_name . '.latte'; |
|
| 181 | + $template_name = $this->underscore_name.'.latte'; |
|
| 182 | 182 | $this->log_type = $this->underscore_name; |
| 183 | 183 | |
| 184 | 184 | if ($this->template_file) { |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Ublaboo\Mailing\Exception; |
| 5 | 5 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright Copyright (c) 2015 ublaboo <[email protected]> |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright Copyright (c) 2015 ublaboo <[email protected]> |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @copyright Copyright (c) 2015 ublaboo <[email protected]> |