Skip to content
Snippets Groups Projects
Commit 785de67d authored by Vadim Justus's avatar Vadim Justus
Browse files

#17 Remove return types and type hints for factory generation

parent f375cfbe
No related branches found
No related tags found
1 merge request!21#17 Fix type hint issues in Magento 2.1 and 2.2
......@@ -14,50 +14,50 @@ interface EntryInterface
/**
* @return string
*/
public function getKey(): string;
public function getKey();
/**
* @param string $key
*/
public function setKey(string $key): void;
public function setKey($key);
/**
* @return bool
*/
public function isMaintained(): bool;
public function isMaintained();
/**
* @param bool $isMaintained
*/
public function setIsMaintained(bool $isMaintained): void;
public function setIsMaintained($isMaintained);
/**
* @return array
*/
public function getStores(): array;
public function getStores();
/**
* @param array $stores
*/
public function setStores(array $stores): void;
public function setStores(array $stores);
/**
* @return string
*/
public function getMediaDirectory(): string;
public function getMediaDirectory();
/**
* @param string $path
*/
public function setMediaDirectory(string $path): void;
public function setMediaDirectory($path);
/**
* @return array
*/
public function getMediaFiles(): array;
public function getMediaFiles();
/**
* @param array $files
*/
public function setMediaFiles(array $files): void;
public function setMediaFiles(array $files);
}
......@@ -11,7 +11,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @return string
*/
public function getKey(): string
public function getKey()
{
return (string)$this->getData(BlockEntryInterface::KEY);
}
......@@ -19,7 +19,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @param string $key
*/
public function setKey(string $key): void
public function setKey($key)
{
$this->setData(BlockEntryInterface::KEY, $key);
}
......@@ -27,7 +27,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @return bool
*/
public function isMaintained(): bool
public function isMaintained()
{
return (bool)$this->getData(BlockEntryInterface::IS_MAINTAINED);
}
......@@ -35,7 +35,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @param bool $isMaintained
*/
public function setIsMaintained(bool $isMaintained): void
public function setIsMaintained($isMaintained)
{
$this->setData(BlockEntryInterface::IS_MAINTAINED, $isMaintained);
}
......@@ -43,7 +43,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @return array
*/
public function getStores(): array
public function getStores()
{
return (array)$this->getData(BlockEntryInterface::STORES);
}
......@@ -51,7 +51,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @param array $stores
*/
public function setStores(array $stores): void
public function setStores(array $stores)
{
$this->setData(BlockEntryInterface::STORES, $stores);
}
......@@ -59,7 +59,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @return string
*/
public function getMediaDirectory(): string
public function getMediaDirectory()
{
return (string)$this->getData(BlockEntryInterface::MEDIA_DIRECTORY);
}
......@@ -67,7 +67,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @param string $path
*/
public function setMediaDirectory(string $path): void
public function setMediaDirectory($path)
{
$this->setData(BlockEntryInterface::MEDIA_DIRECTORY, $path);
}
......@@ -75,7 +75,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @return array
*/
public function getMediaFiles(): array
public function getMediaFiles()
{
return (array)$this->getData(BlockEntryInterface::MEDIA_FILES);
}
......@@ -83,7 +83,7 @@ class BlockEntry extends Block implements BlockEntryInterface
/**
* @param array $files
*/
public function setMediaFiles(array $files): void
public function setMediaFiles(array $files)
{
$this->setData(BlockEntryInterface::MEDIA_FILES, $files);
}
......
......@@ -11,7 +11,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @return string
*/
public function getKey(): string
public function getKey()
{
return (string)$this->getData(PageEntryInterface::KEY);
}
......@@ -19,7 +19,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @param string $key
*/
public function setKey(string $key): void
public function setKey($key)
{
$this->setData(PageEntryInterface::KEY, $key);
}
......@@ -27,7 +27,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @return bool
*/
public function isMaintained(): bool
public function isMaintained()
{
return (bool)$this->getData(PageEntryInterface::IS_MAINTAINED);
}
......@@ -35,7 +35,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @param bool $isMaintained
*/
public function setIsMaintained(bool $isMaintained): void
public function setIsMaintained($isMaintained)
{
$this->setData(PageEntryInterface::IS_MAINTAINED, $isMaintained);
}
......@@ -43,7 +43,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @return array
*/
public function getStores(): array
public function getStores()
{
return (array)$this->getData(PageEntryInterface::STORES);
}
......@@ -51,7 +51,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @param array $stores
*/
public function setStores(array $stores): void
public function setStores(array $stores)
{
$this->setData(PageEntryInterface::STORES, $stores);
}
......@@ -59,7 +59,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @return string
*/
public function getMediaDirectory(): string
public function getMediaDirectory()
{
return (string)$this->getData(PageEntryInterface::MEDIA_DIRECTORY);
}
......@@ -67,7 +67,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @param string $path
*/
public function setMediaDirectory(string $path): void
public function setMediaDirectory(string $path)
{
$this->setData(PageEntryInterface::MEDIA_DIRECTORY, $path);
}
......@@ -75,7 +75,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @return array
*/
public function getMediaFiles(): array
public function getMediaFiles()
{
return (array)$this->getData(PageEntryInterface::MEDIA_FILES);
}
......@@ -83,7 +83,7 @@ class PageEntry extends Page implements PageEntryInterface
/**
* @param array $files
*/
public function setMediaFiles(array $files): void
public function setMediaFiles(array $files)
{
$this->setData(PageEntryInterface::MEDIA_FILES, $files);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment