@@ -13,8 +13,8 @@ public static function register_routes() {
1313 '/discovery ' ,
1414 array (
1515 array (
16- 'methods ' => WP_REST_Server::READABLE ,
17- 'callback ' => array ( 'Nodeinfo_Endpoint ' , 'render_discovery ' ),
16+ 'methods ' => WP_REST_Server::READABLE ,
17+ 'callback ' => array ( 'Nodeinfo_Endpoint ' , 'render_discovery ' ),
1818 'permission_callback ' => '__return_true ' ,
1919 ),
2020 )
@@ -25,15 +25,15 @@ public static function register_routes() {
2525 '/(?P<version>[\.\d]+) ' ,
2626 array (
2727 array (
28- 'methods ' => WP_REST_Server::READABLE ,
29- 'callback ' => array ( 'Nodeinfo_Endpoint ' , 'render_nodeinfo ' ),
28+ 'methods ' => WP_REST_Server::READABLE ,
29+ 'callback ' => array ( 'Nodeinfo_Endpoint ' , 'render_nodeinfo ' ),
3030 'permission_callback ' => '__return_true ' ,
31- 'args ' => array (
31+ 'args ' => array (
3232 'version ' => array (
33- 'required ' => true ,
34- 'type ' => 'string ' ,
33+ 'required ' => true ,
34+ 'type ' => 'string ' ,
3535 'description ' => __ ( 'The version of the NodeInfo scheme ' , 'nodeinfo ' ),
36- 'enum ' => array (
36+ 'enum ' => array (
3737 '1.0 ' ,
3838 '1.1 ' ,
3939 '2.0 ' ,
@@ -50,15 +50,15 @@ public static function register_routes() {
5050 '/(?P<version>[\.\d]+) ' ,
5151 array (
5252 array (
53- 'methods ' => WP_REST_Server::READABLE ,
54- 'callback ' => array ( 'Nodeinfo_Endpoint ' , 'render_nodeinfo2 ' ),
53+ 'methods ' => WP_REST_Server::READABLE ,
54+ 'callback ' => array ( 'Nodeinfo_Endpoint ' , 'render_nodeinfo2 ' ),
5555 'permission_callback ' => '__return_true ' ,
56- 'args ' => array (
56+ 'args ' => array (
5757 'version ' => array (
58- 'required ' => true ,
59- 'type ' => 'string ' ,
58+ 'required ' => true ,
59+ 'type ' => 'string ' ,
6060 'description ' => __ ( 'The version of the NodeInfo2 scheme ' , 'nodeinfo ' ),
61- 'enum ' => array (
61+ 'enum ' => array (
6262 '1.0 ' ,
6363 ),
6464 ),
@@ -75,22 +75,22 @@ public static function register_routes() {
7575 * @return WP_REST_Response the response object
7676 */
7777 public static function render_discovery ( WP_REST_Request $ request ) {
78- $ discovery = array ();
78+ $ discovery = array ();
7979 $ discovery ['links ' ] = array (
8080 array (
81- 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/2.1 ' ,
81+ 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/2.1 ' ,
8282 'href ' => get_rest_url ( null , '/nodeinfo/2.1 ' ),
8383 ),
8484 array (
85- 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/2.0 ' ,
85+ 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/2.0 ' ,
8686 'href ' => get_rest_url ( null , '/nodeinfo/2.0 ' ),
8787 ),
8888 array (
89- 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/1.1 ' ,
89+ 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/1.1 ' ,
9090 'href ' => get_rest_url ( null , '/nodeinfo/1.1 ' ),
9191 ),
9292 array (
93- 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/1.0 ' ,
93+ 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/1.0 ' ,
9494 'href ' => get_rest_url ( null , '/nodeinfo/1.0 ' ),
9595 ),
9696 );
@@ -111,7 +111,7 @@ public static function render_discovery( WP_REST_Request $request ) {
111111 * @return WP_REST_Response the response object
112112 */
113113 public static function render_nodeinfo ( WP_REST_Request $ request ) {
114- require_once ( 'class-nodeinfo.php ' ) ;
114+ require_once 'class-nodeinfo.php ' ;
115115
116116 $ nodeinfo = new Nodeinfo ( $ request ->get_param ( 'version ' ) );
117117
@@ -126,7 +126,7 @@ public static function render_nodeinfo( WP_REST_Request $request ) {
126126 * @return WP_REST_Response the response object
127127 */
128128 public static function render_nodeinfo2 ( WP_REST_Request $ request ) {
129- require_once ( 'class-nodeinfo2.php ' ) ;
129+ require_once 'class-nodeinfo2.php ' ;
130130
131131 $ nodeinfo2 = new Nodeinfo2 ( $ request ->get_param ( 'version ' ) );
132132
@@ -142,22 +142,22 @@ public static function render_nodeinfo2( WP_REST_Request $request ) {
142142 */
143143 public static function render_jrd ( $ jrd ) {
144144 $ jrd ['links ' ][] = array (
145- 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/2.1 ' ,
145+ 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/2.1 ' ,
146146 'href ' => get_rest_url ( null , '/nodeinfo/2.1 ' ),
147147 );
148148
149149 $ jrd ['links ' ][] = array (
150- 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/2.0 ' ,
150+ 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/2.0 ' ,
151151 'href ' => get_rest_url ( null , '/nodeinfo/2.0 ' ),
152152 );
153153
154154 $ jrd ['links ' ][] = array (
155- 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/1.1 ' ,
155+ 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/1.1 ' ,
156156 'href ' => get_rest_url ( null , '/nodeinfo/1.1 ' ),
157157 );
158158
159159 $ jrd ['links ' ][] = array (
160- 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/1.0 ' ,
160+ 'rel ' => 'http://nodeinfo.diaspora.software/ns/schema/1.0 ' ,
161161 'href ' => get_rest_url ( null , '/nodeinfo/1.0 ' ),
162162 );
163163
0 commit comments