Skip to content

Commit

Permalink
fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Jan 17, 2021
1 parent 3e259b1 commit a7a7a36
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/core/src/Entity/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ public function __construct()
$this->updatedAt = null !== $this->updatedAt ? $this->updatedAt : new \DateTime();
$this->createdAt = null !== $this->createdAt ? $this->createdAt : new \DateTime();
}

}
2 changes: 1 addition & 1 deletion packages/core/tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

(new Dotenv())->loadEnv(__DIR__.'/.env');

if (!file_exists($monoRepoBase.'/packages/skeleton/media')) {
if (! file_exists($monoRepoBase.'/packages/skeleton/media')) {
$fs = new Filesystem();
$fs->mirror($monoRepoBase.'/packages/skeleton/media~', $monoRepoBase.'/packages/skeleton/media');
}
Expand Down
3 changes: 2 additions & 1 deletion packages/flat/src/Importer/ImageImporterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ private function importImageMediaData(MediaInterface $media, string $filePath):

$setter = 'set'.ucfirst($key);
if (method_exists($media, $setter)) {
if (in_array($key, ['createdAt', 'updatedAt']))
if (\in_array($key, ['createdAt', 'updatedAt'])) {
$value = new DateTime($value);
}

$media->$setter($value);

Expand Down
3 changes: 2 additions & 1 deletion packages/flat/src/Importer/PageImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ private function editPage(string $slug, array $data, string $content, DateTime $
}
$setter = 'set'.ucfirst($camelKey);
if (method_exists($page, $setter)) {
if (in_array($camelKey, ['createdAt', 'updatedAt']))
if (\in_array($camelKey, ['createdAt', 'updatedAt'])) {
$value = new DateTime($value);
}

$page->$setter($value);

Expand Down

0 comments on commit a7a7a36

Please sign in to comment.