Skip to content

Commit 3bceaaf

Browse files
committed
Merge and resolved conflicts.
2 parents e481633 + de1cb64 commit 3bceaaf

4 files changed

Lines changed: 29 additions & 23 deletions

File tree

src/FMDataAPI.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace INTERMediator\FileMakerServer\RESTAPI;
44

5-
use INTERMediator\FileMakerServer\RESTAPI\Supporting\CommunicationProvider;
65
use INTERMediator\FileMakerServer\RESTAPI\Supporting\FileMakerLayout;
76
use INTERMediator\FileMakerServer\RESTAPI\Supporting\FileMakerRelation;
7+
use INTERMediator\FileMakerServer\RESTAPI\Supporting\CommunicationProvider;
88
use Exception;
99

1010
/**
@@ -27,12 +27,13 @@ class FMDataAPI
2727
*/
2828

2929
/**
30-
* Keeping the FileMakerLayout object for each layout
30+
* @var FileMakerLayout[] Keeping the FileMakerLayout object for each layout.
3131
* @ignore
3232
*/
33-
private array $layoutTable = [];
33+
private $layoutTable = [];
34+
3435
/**
35-
* Keeping the CommunicationProvider object
36+
* @var null|CommunicationProvider Keeping the CommunicationProvider object.
3637
* @ignore
3738
*/
3839
private CommunicationProvider|null $provider;
@@ -48,12 +49,12 @@ class FMDataAPI
4849
* If you’re going to call useOAuth method, you have to specify the data for X-FM-Data-OAuth-Identifier.
4950
* @param ?string $host FileMaker Server's host name or IP address. If omitted, 'localhost' is chosen.
5051
* The value "localserver" tries to connect directory 127.0.0.1, and you don't have to set $port and $protocol.
51-
* @param ?int $port FileMaker Server's port number. If omitted, 443 is chosen.
52-
* @param ?string $protocol FileMaker Server's protocol name. If omitted, 'https' is chosen.
53-
* @param ?array $fmDataSource Authentication information for external data sources.
54-
* Ex. [{"database"=>"<databaseName>", "username"=>"<username>", "password"=>"<password>"}].
55-
* If you use OAuth, "oAuthRequestId" and "oAuthIdentifier" keys have to be specified.
56-
* @param bool $isUnitTest If it's set to true, the communication provider just works locally.
52+
* @param int $port FileMaker Server's port number. If omitted, 443 is chosen.
53+
* @param string $protocol FileMaker Server's protocol name. If omitted, 'https' is chosen.
54+
* @param array $fmDataSource Authentication information for external data sources.
55+
* Ex. [{"database"=>"<databaseName>", "username"=>"<username>", "password"=>"<password>"].
56+
* If you use OAuth, "oAuthRequestId" and "oAuthIdentifier" keys have to be spedified.
57+
* @param boolean $isUnitTest If it's set to true, the communication provider just works locally.
5758
*/
5859
public function __construct(
5960
string $solution, string $user, string $password,

src/Supporting/CommunicationProvider.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class CommunicationProvider
117117
*/
118118
public null|int $foundCount = null;
119119
/**
120-
* @varint
120+
* @var int
121121
* @ignore
122122
*/
123123
public null|int $returnedCount = null;
@@ -222,6 +222,12 @@ class CommunicationProvider
222222
* @param string|null $port
223223
* @param string|null $protocol
224224
* @param array|null $fmDataSource
225+
* @param string $solution
226+
* @param string $user
227+
* @param string $password
228+
* @param null|string $host
229+
* @param null|int $port
230+
* @param null|string $protocol
225231
* @ignore
226232
*/
227233
public function __construct(string $solution, string $user, string $password, ?string $host = null,
@@ -251,11 +257,11 @@ public function __construct(string $solution, string $user, string $password, ?
251257
}
252258

253259
/**
254-
* @param array $params
255-
* @param string|array|null $request
256-
* @param string $methodLower
257-
* @param bool $isSystem
258-
* @param bool $directPath
260+
* @param array $params Array to build the API path. Ex: `["layouts" => null]` or `["sessions" => $this->accessToken]`.
261+
* @param null|array $request The query parameters as `"key" => "value"`.
262+
* @param string $methodLower The method in lowercase. Ex: `"get"`, `"delete"`, etc.
263+
* @param bool $isSystem If the query is for the system (sessions, databases, etc) or for a database.
264+
* @param false|string $directPath If we don't want to build the path with the other parameters, you can provide the direct path.
259265
* @return string
260266
* @ignore
261267
*/

src/Supporting/FileMakerLayout.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ class FileMakerLayout
2222
*/
2323
private $restAPI = null;
2424
/**
25-
* @var null
25+
* @var null|string
2626
* @ignore
2727
*/
2828
private $layout = null;
2929

3030
/**
3131
* FileMakerLayout constructor.
32-
* @param $restAPI
33-
* @param $layout
32+
* @param CommunicationProvider $restAPI
33+
* @param string $layout
3434
* @ignore
3535
*/
3636
public function __construct($restAPI, $layout)
@@ -86,7 +86,7 @@ private function buildPortalParameters($param, $shortKey = false, $method = "GET
8686
}
8787

8888
/**
89-
* @param $param
89+
* @param array $param
9090
* @return array
9191
* @ignore
9292
*/

src/Supporting/FileMakerRelation.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace INTERMediator\FileMakerServer\RESTAPI\Supporting;
44

5-
use Exception;
65
use Iterator;
76

87
/**
@@ -17,12 +16,12 @@
1716
* The table occurrence name of the portal can be the 'portal_name,' and also the object name of the portal.
1817
* Ver * @version 31
1918
* @author Masayuki Nii <nii@msyk.net>
20-
* @copyright 2017-2024 Masayuki Nii (Claris FileMaker is registered trademarks of Claris International Inc. in the U.S. and other countries.)
19+
* @copyright 2017-2023 Masayuki Nii (Claris FileMaker is registered trademarks of Claris International Inc. in the U.S. and other countries.)
2120
*/
2221
class FileMakerRelation implements Iterator
2322
{
2423
/**
25-
* @var null|array
24+
* @var null|object
2625
* @ignore
2726
*/
2827
private null|array|object $data;

0 commit comments

Comments
 (0)