Skip to content

Commit

Permalink
Fix syntax
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Jul 9, 2020
1 parent 73823f4 commit cd68dca
Show file tree
Hide file tree
Showing 7 changed files with 557 additions and 1,572 deletions.
5 changes: 2 additions & 3 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
*
*/
namespace OCA\Contacts\AppInfo;

use OCP\AppFramework\App;
use OCP\IURLGenerator;
use OCP\IL10N;
use OCP\INavigationManager;

class Application extends App {

const APP_ID = 'contacts';
public const APP_ID = 'contacts';

public function __construct() {
parent::__construct(self::APP_ID);
Expand Down Expand Up @@ -65,6 +65,5 @@ public function register() {
// navigation or on the settings page of your app
'name' => $l10n->t('Contacts'),
]);

}
}
10 changes: 4 additions & 6 deletions lib/ContactsMenu/Providers/DetailsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public function __construct(IURLGenerator $urlGenerator,

/**
* Return a list of the user's addressbooks unique uris
*
*
* @return array
* @since 16.0.0
*/
protected function getAddressBooksUris(): Array {
$result = array();
foreach($this->manager->getUserAddressbooks() as $addressBook) {
protected function getAddressBooksUris(): array {
$result = [];
foreach ($this->manager->getUserAddressbooks() as $addressBook) {
$result[$addressBook->getKey()] = $addressBook->getUri();
}

Expand Down Expand Up @@ -114,7 +114,6 @@ public function process(IEntry $entry) {
// We need $this->manager->getAddressbooksUris() to add this function
$ncVersion = $this->config->getSystemValue('version', '0.0.0');
if (version_compare($ncVersion, '16.0.0', '>=')) {

$addressBookUri = $this->getAddressBookUri($entry->getProperty('addressbook-key'));

$iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/info.svg'));
Expand All @@ -128,5 +127,4 @@ public function process(IEntry $entry) {
$entry->addAction($action);
}
}

}
3 changes: 1 addition & 2 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
use OCP\Util;

class PageController extends Controller {

protected $appName;

/** @var IConfig */
private $config;
private $config;

/** @var IInitialStateService */
private $initialStateService;
Expand Down
Loading

0 comments on commit cd68dca

Please sign in to comment.