diff --git a/lib/Analytics/Analytics.php b/lib/Analytics/Analytics.php index 956df5b06e..0cec95f423 100644 --- a/lib/Analytics/Analytics.php +++ b/lib/Analytics/Analytics.php @@ -27,13 +27,14 @@ class Analytics { $this->wp = new WPFunctions; } - /** @return array */ + /** @return array|null */ function generateAnalytics() { if ($this->shouldSend()) { $data = $this->wp->applyFilters(self::ANALYTICS_FILTER, $this->reporter->getData()); $this->recordDataSent(); return $data; } + return null; } /** @return boolean */ diff --git a/lib/Config/MP2Migrator.php b/lib/Config/MP2Migrator.php index 2898161184..ec6338c5d8 100644 --- a/lib/Config/MP2Migrator.php +++ b/lib/Config/MP2Migrator.php @@ -770,7 +770,7 @@ class MP2Migrator { * Import a subscriber custom field * * @param int $subscriber_id Subscriber ID - * @param int $custom_field Custom field + * @param array $custom_field Custom field * @param string $custom_field_value Custom field value * @return SubscriberCustomField */ diff --git a/lib/Doctrine/MetadataCache.php b/lib/Doctrine/MetadataCache.php index b8491ed9f7..fe0cda7783 100644 --- a/lib/Doctrine/MetadataCache.php +++ b/lib/Doctrine/MetadataCache.php @@ -60,10 +60,12 @@ class MetadataCache extends CacheProvider { if ($result === false) { throw new \RuntimeException("Error while writing to '$filename'"); } + return true; } protected function doDelete($id) { @unlink($this->getFilename($id)); + return true; } protected function doFlush() { @@ -72,6 +74,7 @@ class MetadataCache extends CacheProvider { @unlink($filename); } } + return true; } protected function doGetStats() { diff --git a/lib/Entities/NewsletterEntity.php b/lib/Entities/NewsletterEntity.php index 4ecf5b5303..6dfce83d69 100644 --- a/lib/Entities/NewsletterEntity.php +++ b/lib/Entities/NewsletterEntity.php @@ -342,8 +342,8 @@ class NewsletterEntity { } } catch (EntityNotFoundException $enf) { $this->setParent(null); - return null; } + return null; } /** diff --git a/lib/Models/ScheduledTask.php b/lib/Models/ScheduledTask.php index f4f5abd984..28d42e4328 100644 --- a/lib/Models/ScheduledTask.php +++ b/lib/Models/ScheduledTask.php @@ -126,6 +126,7 @@ class ScheduledTask extends Model { ORM::get_db()->rollBack(); throw $error; } + return null; } function rescheduleProgressively() { diff --git a/lib/Models/Subscriber.php b/lib/Models/Subscriber.php index 1e54378989..0de4eca92b 100644 --- a/lib/Models/Subscriber.php +++ b/lib/Models/Subscriber.php @@ -89,6 +89,7 @@ class Subscriber extends Model { SubscriberCustomField::deleteSubscriberRelations($this); return parent::delete(); } + return null; } function trash() { diff --git a/lib/Tracy/ApiPanel/ApiPanel.php b/lib/Tracy/ApiPanel/ApiPanel.php index a2c35b5f22..66681e9c43 100644 --- a/lib/Tracy/ApiPanel/ApiPanel.php +++ b/lib/Tracy/ApiPanel/ApiPanel.php @@ -42,7 +42,7 @@ class ApiPanel implements IBarPanel { } static function init($endpoint, $request_method, $request_data) { - Debugger::getBar()->addPanel(new static($endpoint, $request_method, $request_data)); + Debugger::getBar()->addPanel(new ApiPanel($endpoint, $request_method, $request_data)); } private function getEndpointName() { diff --git a/lib/Tracy/DIPanel/DIPanel.php b/lib/Tracy/DIPanel/DIPanel.php index e755b2ff21..cf066e8dc9 100644 --- a/lib/Tracy/DIPanel/DIPanel.php +++ b/lib/Tracy/DIPanel/DIPanel.php @@ -38,7 +38,7 @@ class DIPanel implements IBarPanel { } static function init() { - Debugger::getBar()->addPanel(new static()); + Debugger::getBar()->addPanel(new DIPanel()); } private function loadServices() { diff --git a/lib/Tracy/DoctrinePanel/DoctrinePanel.php b/lib/Tracy/DoctrinePanel/DoctrinePanel.php index 0e9883c44e..cd2412a419 100644 --- a/lib/Tracy/DoctrinePanel/DoctrinePanel.php +++ b/lib/Tracy/DoctrinePanel/DoctrinePanel.php @@ -41,7 +41,7 @@ class DoctrinePanel implements IBarPanel { } static function init(EntityManagerInterface $entity_manager) { - Debugger::getBar()->addPanel(new static($entity_manager->getConnection()->getConfiguration())); + Debugger::getBar()->addPanel(new DoctrinePanel($entity_manager->getConnection()->getConfiguration())); } protected function formatSql($sql) {