diff --git a/src/Console/Commands/MakeNotionModel.php b/src/Console/Commands/MakeNotionModel.php index 9e98671..3fe31df 100644 --- a/src/Console/Commands/MakeNotionModel.php +++ b/src/Console/Commands/MakeNotionModel.php @@ -61,7 +61,6 @@ public function handle() $visibleArray .= " '$propName',\n"; $propertyTypeMape .= " '$propName' => '$notionPropType',\n"; $propertyTitleMap .= " '$propName' => '{$propertyInfo->getTitle()}',\n"; - } $contents = "internalQuery(); - return $pageCollection->pluck('props.' . $value, $key !== null ? 'props.' . $key : null); + return $pageCollection->pluck('props.'.$value, $key !== null ? 'props.'.$key : null); } private function queryToNotion(int $limit = 100): PageCollection @@ -82,7 +81,7 @@ private function internalQuery(int $limit = 100): Collection foreach ($queryResponse->asCollection() as $pageItem) { $instance = $this->modelClass::createInstance($this->modelClass::$databaseId); $instance->page = $pageItem; - + foreach ($pageItem->getProperties() as $propertyItem) { $propertyContent = $propertyItem->getContent(); if ($this->modelClass::$convertPropsToText || $this->localConvertPropsToText) { @@ -268,9 +267,9 @@ private function cacheKey(): string { $postCacheKey = ''; if ($this->nextCursor !== null) { - $postCacheKey = '-' . $this->nextCursor->__toString(); + $postCacheKey = '-'.$this->nextCursor->__toString(); } - return $this->modelClass::$preCacheKey . $this->modelClass::$databaseId . $postCacheKey; + return $this->modelClass::$preCacheKey.$this->modelClass::$databaseId.$postCacheKey; } }