Skip to content

Commit fbf07f2

Browse files
committed
Does not use lizmapRepository any more
1 parent b787367 commit fbf07f2

File tree

6 files changed

+18
-19
lines changed

6 files changed

+18
-19
lines changed

lizmap/modules/admin_api/controllers/project_rest.classic.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
use Lizmap\App\VersionTools;
13+
use Lizmap\Project\Repository;
1314
use LizmapApi\ApiException;
1415
use LizmapApi\Credentials;
1516
use LizmapApi\Error;
@@ -65,8 +66,8 @@ public function get(): object
6566
/**
6667
* Return a list of available projects and their basic information.
6768
*
68-
* @param jResponseJson $rep response to fill
69-
* @param lizmapRepository $repo repository
69+
* @param jResponseJson $rep response to fill
70+
* @param Repository $repo repository
7071
*
7172
* @return object a JSON response object containing projects
7273
*/
@@ -91,8 +92,8 @@ protected function getProjList($rep, $repo)
9192
/**
9293
* Return detailed information and user rights.
9394
*
94-
* @param jResponseJson $rep response to fill
95-
* @param lizmapRepository $repo repository
95+
* @param jResponseJson $rep response to fill
96+
* @param Repository $repo repository
9697
*
9798
* @return object a JSON response object containing a specific repository with rights
9899
*/

lizmap/modules/lizmap/classes/lizmap.class.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class lizmap
3636
protected static $repositories = array();
3737

3838
/**
39-
* @var lizmapRepository[] list of repository instances. keys are repository names
39+
* @var Repository[] list of repository instances. keys are repository names
4040
*/
4141
protected static $repositoryInstances = array();
4242

@@ -166,8 +166,8 @@ public static function getRepositoryPropertiesOptions()
166166
/**
167167
* Get the jForm for a repository.
168168
*
169-
* @param null|lizmapRepository $rep
170-
* @param jFormsBase $form
169+
* @param null|Repository $rep
170+
* @param jFormsBase $form
171171
*
172172
* @return jFormsBase
173173
*/
@@ -259,7 +259,7 @@ public static function constructRepositoryForm($rep, $form)
259259
*
260260
* @param string $key Key of the repository to get
261261
*
262-
* @return null|lizmapRepository
262+
* @return null|Repository
263263
*/
264264
public static function getRepository($key)
265265
{
@@ -286,7 +286,7 @@ public static function getRepository($key)
286286
* @param string $key the repository name
287287
* @param array $data list of properties for the repository
288288
*
289-
* @return null|lizmapRepository
289+
* @return null|Repository
290290
*/
291291
public static function createRepository($key, $data)
292292
{

lizmap/modules/lizmap/classes/lizmapServices.class.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use Lizmap\Project\Repository;
34
use Lizmap\Server\Server;
45

56
/**
@@ -701,11 +702,11 @@ public function sendNotificationEmail($subject, $body)
701702
}
702703

703704
/**
704-
* This method will create and return a lizmapRepository instance.
705+
* This method will create and return a lizmap repository instance.
705706
*
706707
* @param string $key the name of the repository
707708
*
708-
* @return lizmapRepository The lizmapRepository instance
709+
* @return bool|Repository The lizmap repository instance
709710
*/
710711
public function getLizmapRepository($key)
711712
{
@@ -722,6 +723,6 @@ public function getLizmapRepository($key)
722723
$data = array();
723724
}
724725

725-
return new lizmapRepository($key, $data, $this->varPath, $this, $this->appContext);
726+
return new Repository($key, $data, $this->varPath, $this, $this->appContext);
726727
}
727728
}

lizmap/modules/lizmap/controllers/edition.classic.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use GuzzleHttp\Psr7\Utils as Psr7Utils;
1515
use Lizmap\Form;
1616
use Lizmap\Project\Project;
17+
use Lizmap\Project\Repository;
1718
use Lizmap\Project\UnknownLizmapProjectException;
1819
use Lizmap\Request\WFSRequest;
1920

@@ -22,7 +23,7 @@ class editionCtrl extends jController
2223
/** @var null|Project */
2324
private $project;
2425

25-
/** @var lizmapRepository */
26+
/** @var null|Repository */
2627
private $repository;
2728

2829
/** @var string layer id in the QGIS project file */

lizmap/modules/lizmap/controllers/service.classic.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Lizmap\App\ControllerTools;
66
use Lizmap\Project\Project;
77

8+
use Lizmap\Project\Repository;
89
use Lizmap\Project\UnknownLizmapProjectException;
910
use Lizmap\Request\Proxy;
1011
use Lizmap\Request\WFSRequest;
@@ -30,7 +31,7 @@ class serviceCtrl extends jController
3031
protected $project;
3132

3233
/**
33-
* @var null|lizmapRepository
34+
* @var null|Repository
3435
*/
3536
protected $repository;
3637

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ parameters:
105105
count: 1
106106
path: lizmap/modules/lizmap/classes/lizmapOGCRequest.class.php
107107

108-
-
109-
message: "#^Method lizmapServices\\:\\:getLizmapRepository\\(\\) should return lizmapRepository but returns false\\.$#"
110-
count: 1
111-
path: lizmap/modules/lizmap/classes/lizmapServices.class.php
112-
113108
-
114109
message: "#^Strict comparison using \\=\\=\\= between int\\|false and '1' will always evaluate to false\\.$#"
115110
count: 1

0 commit comments

Comments
 (0)