Merge pull request #1109 from nextcloud/warning-fixes

Warning fixes
This commit is contained in:
Roeland Jago Douma
2019-01-03 22:44:35 +01:00
committed by GitHub
6 changed files with 14 additions and 14 deletions

View File

@@ -1,8 +1,8 @@
.. _appclassloader:
===========
Classloader
===========
.. app_classloader:
.. sectionauthor:: Bernhard Posselt <dev@bernhard-posselt.com>
The classloader is provided by Nextcloud and loads all your classes automatically. The only thing left to include by yourself are 3rdparty libraries. Those should be loaded in :file:`lib/AppInfo/Application.php`.

View File

@@ -58,7 +58,7 @@ Using a container
-----------------
.. note:: Please do use automatic dependency injection (see below). For most
apps there is no need to register services manually.
apps there is no need to register services manually.
Passing dependencies into the constructor rather than instantiating them in the
constructor has the following drawback: Every line in the source code where

View File

@@ -28,7 +28,7 @@ To create a controller, simply extend the Controller class and create a method t
Connecting a controller and a route
-----------------------------------
If you use a proper namespace for your app (see :ref:`app_classloader`) Nextcloud
If you use a proper namespace for your app (see :ref:`appclassloader`) Nextcloud
will resolve your controller and its dependencies automatically.
An example route name would look like this::

View File

@@ -138,7 +138,7 @@ can be abbreviated by using the **resources** key:
<?php
return [
'resources' => [
'author' => [url' => '/authors'],
'author' => ['url' => '/authors'],
],
'routes' => [
// your other routes here

View File

@@ -211,9 +211,9 @@ Database
--------
Now that the routes are set up and connected the notes should be saved in the
database. To do that first create a :doc:`database migration <storage/migration>`
by creating a file **ownnotes/lib/Migration/VersionXXYYZZDateYYYYMMDDHHSSAA**,
so for example **ownnotes/lib/Migration/Version000000Date20181224140601**""
database. To do that first create a :doc:`database migration <storage/migrations>`
by creating a file **ownnotes/lib/Migration/VersionXXYYZZDateYYYYMMDDHHSSAA**,
so for example **ownnotes/lib/Migration/Version000000Date20181224140601**""
.. code-block:: php

View File

@@ -9,7 +9,7 @@ Two-factor auth providers apps are used to plug custom second factors into the N
Implementing a simple two-factor auth provider
----------------------------------------------
Two-factor auth providers must implement the ``OCP\Authentication\TwoFactorAuth\IProvider <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IProvider.php>``_ interface. The
Two-factor auth providers must implement the `OCP\\Authentication\\TwoFactorAuth\\IProvider <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IProvider.php>`_ interface. The
example below shows a minimalistic example of such a provider.
.. code-block:: php
@@ -124,7 +124,7 @@ Providing an icon (optional)
----------------------------
To enhance how a provider is shown in the list of selectable providers on the login page, an icon
can be specified. For that the provider class must implement the ``IProvidesIcons <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php>``_
can be specified. For that the provider class must implement the `IProvidesIcons <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php>`_
interface. The light icon will be used on the login page, whereas the dark one will be placed next
to the heading of the optional personal settings (see below).
@@ -134,7 +134,7 @@ Provide personal settings (optional)
Like other Nextcloud apps, two-factor providers often require user configuration to work. In Nextcloud
15 a new, consolidated two-factor settings section was added. To add personal provider settings there,
a provider must implement the ``IProvidesPersonalSettings <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php>``_
a provider must implement the `IProvidesPersonalSettings <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php>`_
interface.
@@ -142,7 +142,7 @@ Make a provider activatable by the admin (optional)
---------------------------------------------------
In order to make it possible for an admin to enable the provider for a given user via the occ
command line tool, it's necessary to implement the ``OCP\Authentication\TwoFactorAuth\IActivatableByAdmin <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php>``_
command line tool, it's necessary to implement the `OCP\\Authentication\\TwoFactorAuth\\IActivatableByAdmin <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php>`_
interface. As described in the linked interface documentation, this should only be implemented
for providers that need no user interaction when activated.
@@ -151,6 +151,6 @@ Make a provider deactivatable by the admin (optional)
-----------------------------------------------------
In order to make it possible for an admin to disable the provider for a given user via the occ
command line tool, it's necessary to implement the ``OCP\Authentication\TwoFactorAuth\IDeactivatableByAdmin <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php>``_
command line tool, it's necessary to implement the `OCP\\Authentication\\TwoFactorAuth\\IDeactivatableByAdmin <https://github.com/nextcloud/server/blob/master/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php>`_
interface. As described in the linked interface documentation, this should only be implemented
for providers that need no user interaction when deactivated.
for providers that need no user interaction when deactivated.