paths:
'^/api/':
allow_origin: ['*']
- allow_headers: ['X-Custom-Auth']
+ allow_headers: ['Authorization','content-type']
allow_methods: ['POST', 'PUT', 'PATCH','GET', 'DELETE']
max_age: 3600
'^/oauth/':
allow_origin: ['*']
- allow_headers: ['X-Custom-Auth']
+ allow_headers: ['Authorization','content-type']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
max_age: 3600
'^/':
#origin_regex: true
- allow_origin: ['^http://localhost:[0-9]+']
- allow_headers: ['X-Custom-Auth']
+ allow_origin: ['*']
+ allow_headers: ['Authorization','content-type']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
max_age: 3600
hosts: ['^api\.']
->add('httpStatus', TextFilterType::class, [
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
$value = $values['value'];
- if (false === array_key_exists($value, Response::$statusTexts)) {
+ if (false === \array_key_exists($value, Response::$statusTexts)) {
return;
}
* @param AdapterInterface $adapter
* @param User $user If user isn't logged in, we can force it (like for rss)
*
- * @return null|Pagerfanta
+ * @return Pagerfanta|null
*/
public function prepare(AdapterInterface $adapter, User $user = null)
{
* @param string $host
* @param int $userId
*
- * @return null|array
+ * @return array|null
*/
public function findOneByHostAndUser($host, $userId)
{
*/
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);
return;
}
- if (array_key_exists('children', $importedEntry)) {
+ if (\array_key_exists('children', $importedEntry)) {
if ($this->producer) {
$this->parseEntriesForProducer($importedEntry['children']);
return;
}
- if (!array_key_exists('uri', $importedEntry) && !array_key_exists('url', $importedEntry)) {
+ if (!\array_key_exists('uri', $importedEntry) && !\array_key_exists('url', $importedEntry)) {
return;
}
- $url = array_key_exists('uri', $importedEntry) ? $importedEntry['uri'] : $importedEntry['url'];
+ $url = \array_key_exists('uri', $importedEntry) ? $importedEntry['uri'] : $importedEntry['url'];
$existingEntry = $this->em
->getRepository('WallabagCoreBundle:Entry')
// update entry with content (in case fetching failed, the given entry will be return)
$this->fetchContent($entry, $data['url'], $data);
- if (array_key_exists('tags', $data)) {
+ if (\array_key_exists('tags', $data)) {
$this->tagsAssigner->assignTagsToEntry(
$entry,
$data['tags']
'created_at' => substr($entry['date_added'], 0, 10),
];
- if (array_key_exists('tags', $entry) && '' !== $entry['tags']) {
+ if (\array_key_exists('tags', $entry) && '' !== $entry['tags']) {
$data['tags'] = $entry['tags'];
}
'created_at' => substr($entry['dateAdded'], 0, 10),
];
- if (array_key_exists('tags', $entry) && '' !== $entry['tags']) {
+ if (\array_key_exists('tags', $entry) && '' !== $entry['tags']) {
$data['tags'] = $entry['tags'];
}
// update entry with content (in case fetching failed, the given entry will be return)
$this->fetchContent($entry, $data['url'], $data);
- if (array_key_exists('tags', $data)) {
+ if (\array_key_exists('tags', $data)) {
$this->tagsAssigner->assignTagsToEntry(
$entry,
$data['tags'],
$data['html'] = $this->fetchingErrorMessage;
}
- if (array_key_exists('tags', $entry) && '' !== $entry['tags']) {
+ if (\array_key_exists('tags', $entry) && '' !== $entry['tags']) {
$data['tags'] = $entry['tags'];
}