Skip to content

Commit cabeb40

Browse files
committed
Fix phpDocs
1 parent 1edd031 commit cabeb40

File tree

9 files changed

+43
-40
lines changed

9 files changed

+43
-40
lines changed

src/Client.php

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ class Client
1414
/**
1515
* @var Http
1616
*/
17-
private $_transport = false;
17+
private $_transport = null;
1818

1919
/**
2020
* @var string
2121
*/
22-
private $_connect_username = false;
22+
private $_connect_username = '';
2323

2424
/**
2525
* @var string
2626
*/
27-
private $_connect_password = false;
27+
private $_connect_password = '';
2828

2929
/**
3030
* @var string
3131
*/
32-
private $_connect_host = false;
32+
private $_connect_host = '';
3333

3434
/**
35-
* @var int
35+
* @var string
3636
*/
37-
private $_connect_port = false;
37+
private $_connect_port = '';
3838

3939
/**
4040
* @var bool
@@ -156,7 +156,7 @@ public function enableQueryConditions()
156156
/**
157157
* Set connection host
158158
*
159-
* @param string $host
159+
* @param string|array $host
160160
*/
161161
public function setHost($host)
162162
{
@@ -581,8 +581,8 @@ public function insertAssocBulk($table, array $values)
581581
* insert TabSeparated files
582582
*
583583
* @param string $table_name
584-
* @param $file_names
585-
* @param $columns_array
584+
* @param string|array $file_names
585+
* @param array $columns_array
586586
* @return mixed
587587
* @throws Exception\TransportException
588588
*/
@@ -597,7 +597,7 @@ public function insertBatchTSVFiles($table_name, $file_names, $columns_array)
597597
* @param string $table_name
598598
* @param string|array $file_names
599599
* @param array $columns_array
600-
* @param $format string ['TabSeparated','TabSeparatedWithNames','CSV','CSVWithNames']
600+
* @param string $format ['TabSeparated','TabSeparatedWithNames','CSV','CSVWithNames']
601601
* @return array
602602
* @throws Exception\TransportException
603603
*/
@@ -652,9 +652,9 @@ public function insertBatchFiles($table_name, $file_names, $columns_array,$forma
652652
/**
653653
* insert Batch Stream
654654
*
655-
* @param $table_name
656-
* @param $columns_array
657-
* @param string $format
655+
* @param string $table_name
656+
* @param array $columns_array
657+
* @param string $format ['TabSeparated','TabSeparatedWithNames','CSV','CSVWithNames']
658658
* @return Transport\CurlerRequest
659659
*/
660660
public function insertBatchStream($table_name, $columns_array,$format="CSV")
@@ -705,8 +705,10 @@ public function databaseSize()
705705
/**
706706
* Size of tables
707707
*
708-
* @param $tableName
708+
* @param string $tableName
709709
* @return mixed
710+
* @throws Exception\TransportException
711+
* @throws \Exception
710712
*/
711713
public function tableSize($tableName)
712714
{
@@ -766,8 +768,8 @@ public function tablesSize($flatList=false)
766768
/**
767769
* isExists
768770
*
769-
* @param $database
770-
* @param $table
771+
* @param string $database
772+
* @param string $table
771773
* @return array
772774
* @throws Exception\TransportException
773775
* @throws \Exception
@@ -785,7 +787,7 @@ public function isExists($database,$table)
785787
/**
786788
* List of partitions
787789
*
788-
* @param $table
790+
* @param string $table
789791
* @param int $limit
790792
* @return array
791793
* @throws Exception\TransportException
@@ -804,9 +806,10 @@ public function partitions($table, $limit = -1)
804806
/**
805807
* dropPartition
806808
*
807-
* @param $dataBaseTableName database_name.table_name
808-
* @param $partition_id
809+
* @param string $dataBaseTableName database_name.table_name
810+
* @param string $partition_id
809811
* @return Statement
812+
* @throws Exception\TransportException
810813
*/
811814
public function dropPartition($dataBaseTableName, $partition_id)
812815
{
@@ -823,7 +826,7 @@ public function dropPartition($dataBaseTableName, $partition_id)
823826
/**
824827
* Truncate ( drop all partitions )
825828
*
826-
* @param $tableName
829+
* @param string $tableName
827830
* @return array
828831
* @throws Exception\TransportException
829832
* @throws \Exception
@@ -843,8 +846,8 @@ public function truncateTable($tableName)
843846
/**
844847
* dropOldPartitions by day_ago
845848
*
846-
* @param $table_name
847-
* @param $days_ago
849+
* @param string $table_name
850+
* @param int $days_ago
848851
* @param int $count_partitons_per_one
849852
* @return array
850853
* @throws Exception\TransportException

src/Query/Degeneration/Bindings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private function escapeArray($values)
7575
/**
7676
* Compile Bindings
7777
*
78-
* @param $sql
78+
* @param string $sql
7979
* @return mixed
8080
*/
8181
public function process($sql)

src/Query/Degeneration/Conditions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static function __ifsets($matches,$markers,$else=false)
6363
}
6464

6565
/**
66-
* @param $sql
66+
* @param string $sql
6767
* @return mixed
6868
*/
6969
public function process($sql)

src/Query/Query.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Query
2424

2525
/**
2626
* Query constructor.
27-
* @param $sql
27+
* @param string $sql
2828
* @param array $degenerations
2929
*/
3030
public function __construct($sql,$degenerations=[])
@@ -38,7 +38,7 @@ public function __construct($sql,$degenerations=[])
3838
}
3939

4040
/**
41-
* @param $format
41+
* @param string|null $format
4242
*/
4343
public function setFormat($format)
4444
{

src/Query/WhereInFile.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public function __construct() {}
2626

2727

2828
/**
29-
* @param $file_name
30-
* @param $table_name
31-
* @param $structure
29+
* @param string $file_name
30+
* @param string $table_name
31+
* @param string $structure
3232
* @param string $format
3333
*/
3434
public function attachFile($file_name, $table_name, $structure, $format = 'CSV')
@@ -66,7 +66,7 @@ public function fetchFiles()
6666
}
6767

6868
/**
69-
* @param $table
69+
* @param string $table
7070
* @return string
7171
*/
7272
public function fetchStructure($table)

src/Query/WriteToFile.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class WriteToFile
3030
private $gzip=false;
3131
/**
3232
* WriteToFile constructor.
33-
* @param $file_name
33+
* @param string $file_name
3434
* @param bool $overwrite
3535
* @param null $format
3636
*/
@@ -74,15 +74,15 @@ public function getGzip()
7474
}
7575

7676
/**
77-
* @param $flag
77+
* @param bool $flag
7878
*/
7979
public function setGzip($flag)
8080
{
8181
$this->gzip=$flag;
8282
}
8383

8484
/**
85-
* @param $format
85+
* @param string $format
8686
*/
8787
public function setFormat($format)
8888
{

src/Quote/FormatLine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FormatLine
1313
/**
1414
* Format
1515
*
16-
* @param $format
16+
* @param string $format
1717
* @return StrictQuoteLine
1818
*/
1919
private static function strictQuote($format)

src/Statement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,10 @@ public function rawData()
365365
return $this->response()->rawDataOrJson($this->format);
366366
}
367367
/**
368-
* @param bool $key
368+
* @param string $key
369369
* @return mixed|null
370370
*/
371-
public function fetchOne($key = false)
371+
public function fetchOne($key = '')
372372
{
373373
$this->init();
374374

src/Transport/Http.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ class Http
6565

6666
/**
6767
* Http constructor.
68-
* @param $host
69-
* @param $port
70-
* @param $username
71-
* @param $password
68+
* @param string $host
69+
* @param string $port
70+
* @param string $username
71+
* @param string $password
7272
*/
7373
public function __construct($host, $port, $username, $password)
7474
{

0 commit comments

Comments
 (0)