forked from wallabag/wallabag
@ -77,7 +77,7 @@ abstract class BrowserImport extends AbstractImport
|
||||
*/
|
||||
public function parseEntry(array $importedEntry)
|
||||
{
|
||||
if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) {
|
||||
if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && \is_array(reset($importedEntry))) {
|
||||
if ($this->producer) {
|
||||
$this->parseEntriesForProducer($importedEntry);
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ class InstapaperImport extends AbstractImport
|
||||
}
|
||||
|
||||
$entries = [];
|
||||
$handle = fopen($this->filepath, 'r');
|
||||
$handle = fopen($this->filepath, 'rb');
|
||||
while (false !== ($data = fgetcsv($handle, 10240))) {
|
||||
if ('URL' === $data[0]) {
|
||||
continue;
|
||||
@ -72,7 +72,7 @@ class InstapaperImport extends AbstractImport
|
||||
// BUT it can also be the status (since status = folder in Instapaper)
|
||||
// and we don't want archive, unread & starred to become a tag
|
||||
$tags = null;
|
||||
if (false === in_array($data[3], ['Archive', 'Unread', 'Starred'], true)) {
|
||||
if (false === \in_array($data[3], ['Archive', 'Unread', 'Starred'], true)) {
|
||||
$tags = [$data[3]];
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +149,7 @@ class PocketImport extends AbstractImport
|
||||
// - first call get 5k offset 0
|
||||
// - second call get 5k offset 5k
|
||||
// - and so on
|
||||
if (self::NB_ELEMENTS === count($entries['list'])) {
|
||||
if (self::NB_ELEMENTS === \count($entries['list'])) {
|
||||
++$run;
|
||||
|
||||
return $this->import(self::NB_ELEMENTS * $run);
|
||||
|
||||
@ -56,7 +56,7 @@ class WallabagV1Import extends WallabagImport
|
||||
|
||||
// In case of a bad fetch in v1, replace title and content with v2 error strings
|
||||
// If fetching fails again, they will get this instead of the v1 strings
|
||||
if (in_array($entry['title'], $this->untitled, true)) {
|
||||
if (\in_array($entry['title'], $this->untitled, true)) {
|
||||
$data['title'] = $this->fetchingErrorMessageTitle;
|
||||
$data['html'] = $this->fetchingErrorMessage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user