@@ -94,15 +94,15 @@ |
||
| 94 | 94 | |
| 95 | 95 | if ($seoMetadata->getMetaMedia()) { |
| 96 | 96 | $metaImage = $seoMetadata->getMetaMedia()->getImage(); |
| 97 | - $response['_links']['meta_media_url'] = [ 'href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 97 | + $response['_links']['meta_media_url'] = ['href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 98 | 98 | } |
| 99 | 99 | if ($seoMetadata->getOgMedia()) { |
| 100 | 100 | $metaImage = $seoMetadata->getOgMedia()->getImage(); |
| 101 | - $response['_links']['og_media_url'] = [ 'href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 101 | + $response['_links']['og_media_url'] = ['href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 102 | 102 | } |
| 103 | 103 | if ($seoMetadata->getTwitterMedia()) { |
| 104 | 104 | $metaImage = $seoMetadata->getTwitterMedia()->getImage(); |
| 105 | - $response['_links']['twitter_media_url'] = [ 'href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 105 | + $response['_links']['twitter_media_url'] = ['href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | return new SingleResourceResponse($response, new ResponseContext(201)); |
@@ -94,15 +94,15 @@ |
||
| 94 | 94 | |
| 95 | 95 | if ($seoMetadata->getMetaMedia()) { |
| 96 | 96 | $metaImage = $seoMetadata->getMetaMedia()->getImage(); |
| 97 | - $response['_links']['meta_media_url'] = [ 'href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 97 | + $response['_links']['meta_media_url'] = ['href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 98 | 98 | } |
| 99 | 99 | if ($seoMetadata->getOgMedia()) { |
| 100 | 100 | $metaImage = $seoMetadata->getOgMedia()->getImage(); |
| 101 | - $response['_links']['og_media_url'] = [ 'href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 101 | + $response['_links']['og_media_url'] = ['href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 102 | 102 | } |
| 103 | 103 | if ($seoMetadata->getTwitterMedia()) { |
| 104 | 104 | $metaImage = $seoMetadata->getTwitterMedia()->getImage(); |
| 105 | - $response['_links']['twitter_media_url'] = [ 'href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 105 | + $response['_links']['twitter_media_url'] = ['href' => $this->mediaManager->getMediaPublicUrl($metaImage)]; |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | return new SingleResourceResponse($response, new ResponseContext(200)); |
@@ -5,13 +5,13 @@ |
||
| 5 | 5 | class SwpLogger |
| 6 | 6 | { |
| 7 | 7 | |
| 8 | - public static function log(string $message,bool $echo = false, string $fileName = 'swp.log') |
|
| 8 | + public static function log(string $message, bool $echo = false, string $fileName = 'swp.log') |
|
| 9 | 9 | { |
| 10 | 10 | $trace = debug_backtrace()[1]; |
| 11 | - $message = '[' . date('Y-m-d H:i:s') . '][' . $trace['class'] . '::' . $trace['function'] . '] ' . $message . PHP_EOL; |
|
| 11 | + $message = '['.date('Y-m-d H:i:s').']['.$trace['class'].'::'.$trace['function'].'] '.$message.PHP_EOL; |
|
| 12 | 12 | |
| 13 | 13 | if (!empty($fileName)) { |
| 14 | - file_put_contents('/tmp/' . $fileName, $message, FILE_APPEND); |
|
| 14 | + file_put_contents('/tmp/'.$fileName, $message, FILE_APPEND); |
|
| 15 | 15 | } |
| 16 | 16 | if ($echo) { |
| 17 | 17 | echo $message; |