Skip to content

Commit 9d0a33f

Browse files
committed
PHP-145 - Add API doc generator system
Generated PHP API docs
1 parent 922e37a commit 9d0a33f

File tree

100 files changed

+2727
-1479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2727
-1479
lines changed

ext/doc/Cassandra.php

Lines changed: 155 additions & 98 deletions
Large diffs are not rendered by default.

ext/doc/Cassandra/Aggregate.php

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Copyright 2015-2016 DataStax, Inc.
4+
* Copyright 2017 DataStax, Inc.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,59 +21,69 @@
2121
/**
2222
* A PHP representation of an aggregate
2323
*/
24-
interface Aggregate
25-
{
24+
interface Aggregate {
25+
2626
/**
2727
* Returns the full name of the aggregate
28+
*
2829
* @return string Full name of the aggregate including name and types
2930
*/
30-
function name();
31+
public function name();
3132

3233
/**
3334
* Returns the simple name of the aggregate
35+
*
3436
* @return string Simple name of the aggregate
3537
*/
36-
function simpleName();
38+
public function simpleName();
3739

3840
/**
3941
* Returns the argument types of the aggregate
42+
*
4043
* @return array Argument types of the aggregate
4144
*/
42-
function argumentTypes();
45+
public function argumentTypes();
4346

4447
/**
4548
* Returns the final function of the aggregate
46-
* @return Cassandra\Function Final function of the aggregate
49+
*
50+
* @return Function Final function of the aggregate
4751
*/
48-
function finalFunction();
52+
public function finalFunction();
4953

5054
/**
5155
* Returns the state function of the aggregate
52-
* @return Cassandra\Function State function of the aggregate
56+
*
57+
* @return Function State function of the aggregate
5358
*/
54-
function stateFunction();
59+
public function stateFunction();
5560

5661
/**
5762
* Returns the initial condition of the aggregate
58-
* @return Cassandra\Value Initial condition of the aggregate
63+
*
64+
* @return Value Initial condition of the aggregate
5965
*/
60-
function initialCondition();
66+
public function initialCondition();
6167

6268
/**
6369
* Returns the return type of the aggregate
64-
* @return Cassandra\Type Return type of the aggregate
70+
*
71+
* @return Type Return type of the aggregate
6572
*/
66-
function returnType();
73+
public function returnType();
6774

6875
/**
6976
* Returns the state type of the aggregate
70-
* @return Cassandra\Type State type of the aggregate
77+
*
78+
* @return Type State type of the aggregate
7179
*/
72-
function stateType();
80+
public function stateType();
7381

7482
/**
7583
* Returns the signature of the aggregate
84+
*
7685
* @return string Signature of the aggregate (same as name())
7786
*/
78-
function signature();
87+
public function signature();
88+
7989
}

ext/doc/Cassandra/BatchStatement.php

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

33
/**
4-
* Copyright 2015-2016 DataStax, Inc.
4+
* Copyright 2017 DataStax, Inc.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -37,24 +37,25 @@
3737
* @see Cassandra::BATCH_UNLOGGED
3838
* @see Cassandra::BATCH_COUNTER
3939
*/
40-
final class BatchStatement implements Statement
41-
{
40+
final class BatchStatement implements Statement {
41+
4242
/**
4343
* Creates a new batch statement.
4444
*
4545
* @param int $type must be one of Cassandra::BATCH_* (default: Cassandra::BATCH_LOGGED).
4646
*/
47-
public function __construct($type = \Cassandra::BATCH_LOGGED) {}
47+
public function __construct($type) { }
4848

4949
/**
5050
* Adds a statement to this batch.
5151
*
5252
* @param string|Statement $statement string or statement to add
53-
* @param array|null $arguments positional or named arguments
53+
* @param array|null $arguments positional or named arguments (optional)
5454
*
5555
* @throws Exception\InvalidArgumentException
5656
*
5757
* @return BatchStatement self
5858
*/
59-
public function add($statement, array $arguments = null) {}
59+
public function add($statement, $arguments) { }
60+
6061
}

ext/doc/Cassandra/Bigint.php

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Copyright 2015-2016 DataStax, Inc.
4+
* Copyright 2017 DataStax, Inc.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,107 +21,103 @@
2121
/**
2222
* A PHP representation of the CQL `bigint` datatype
2323
*/
24-
final class Bigint implements Value, Numeric
25-
{
26-
/**
27-
* Minimum possible Bigint value
28-
*
29-
* @return Bigint minimum value
30-
*/
31-
public static function min() {}
24+
final class Bigint implements Value, Numeric {
3225

3326
/**
34-
* Maximum possible Bigint value
27+
* Creates a new 64bit integer.
3528
*
36-
* @return Bigint maximum value
29+
* @param string $value integer value as a string
3730
*/
38-
public static function max() {}
31+
public function __construct($value) { }
3932

4033
/**
41-
* Creates a new 64bit integer.
34+
* Returns string representation of the integer value.
4235
*
43-
* @param string $value integer value as a string
36+
* @return string integer value
4437
*/
45-
public function __construct($value) {}
38+
public function __toString() { }
4639

4740
/**
4841
* The type of this bigint.
4942
*
5043
* @return Type
5144
*/
52-
public function type() {}
45+
public function type() { }
5346

5447
/**
5548
* Returns the integer value.
5649
*
5750
* @return string integer value
5851
*/
59-
public function value() {}
60-
61-
/**
62-
* Returns string representation of the integer value.
63-
*
64-
* @return string integer value
65-
*/
66-
public function __toString() {}
52+
public function value() { }
6753

6854
/**
69-
* @param Numeric $addend a number to add to this one
70-
*
55+
* @param Numeric $num a number to add to this one
7156
* @return Numeric sum
7257
*/
73-
public function add(Numeric $addend) {}
58+
public function add($num) { }
7459

7560
/**
76-
* @param Numeric $subtrahend a number to subtract from this one
77-
*
61+
* @param Numeric $num a number to subtract from this one
7862
* @return Numeric difference
7963
*/
80-
public function sub(Numeric $subtrahend) {}
64+
public function sub($num) { }
8165

8266
/**
83-
* @param Numeric $multiplier a number to multiply this one by
84-
*
67+
* @param Numeric $num a number to multiply this one by
8568
* @return Numeric product
8669
*/
87-
public function mul(Numeric $multiplier) {}
70+
public function mul($num) { }
8871

8972
/**
90-
* @param Numeric $divisor a number to divide this one by
91-
*
73+
* @param Numeric $num a number to divide this one by
9274
* @return Numeric quotient
9375
*/
94-
public function div(Numeric $divisor) {}
76+
public function div($num) { }
9577

9678
/**
97-
* @param Numeric $divisor a number to divide this one by
98-
*
79+
* @param Numeric $num a number to divide this one by
9980
* @return Numeric remainder
10081
*/
101-
public function mod(Numeric $divisor) {}
82+
public function mod($num) { }
10283

10384
/**
10485
* @return Numeric absolute value
10586
*/
106-
public function abs() {}
87+
public function abs() { }
10788

10889
/**
10990
* @return Numeric negative value
11091
*/
111-
public function neg() {}
92+
public function neg() { }
11293

11394
/**
11495
* @return Numeric square root
11596
*/
116-
public function sqrt() {}
97+
public function sqrt() { }
11798

11899
/**
119100
* @return int this number as int
120101
*/
121-
public function toInt() {}
102+
public function toInt() { }
122103

123104
/**
124105
* @return float this number as float
125106
*/
126-
public function toDouble() {}
107+
public function toDouble() { }
108+
109+
/**
110+
* Minimum possible Bigint value
111+
*
112+
* @return Bigint minimum value
113+
*/
114+
public static function min() { }
115+
116+
/**
117+
* Maximum possible Bigint value
118+
*
119+
* @return Bigint maximum value
120+
*/
121+
public static function max() { }
122+
127123
}

ext/doc/Cassandra/Blob.php

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Copyright 2015-2016 DataStax, Inc.
4+
* Copyright 2017 DataStax, Inc.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,40 +21,41 @@
2121
/**
2222
* A PHP representation of the CQL `blob` datatype
2323
*/
24-
final class Blob implements Value
25-
{
24+
final class Blob implements Value {
25+
2626
/**
2727
* Creates a new bytes array.
2828
*
2929
* @param string $bytes any bytes
3030
*/
31-
public function __construct($bytes) {}
31+
public function __construct($bytes) { }
3232

3333
/**
34-
* The type of this blob.
34+
* Returns bytes as a hex string.
3535
*
36-
* @return Type
36+
* @return string bytes as hexadecimal string
3737
*/
38-
public function type() {}
38+
public function __toString() { }
3939

4040
/**
41-
* Returns bytes as a hex string.
41+
* The type of this blob.
4242
*
43-
* @return string bytes as hexadecimal string
43+
* @return Type
4444
*/
45-
public function bytes() {}
45+
public function type() { }
4646

4747
/**
4848
* Returns bytes as a hex string.
4949
*
5050
* @return string bytes as hexadecimal string
5151
*/
52-
public function __toString() {}
52+
public function bytes() { }
5353

5454
/**
5555
* Returns bytes as a binary string.
5656
*
5757
* @return string bytes as binary string
5858
*/
59-
public function toBinaryString() {}
59+
public function toBinaryString() { }
60+
6061
}

ext/doc/Cassandra/Cluster.php

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

33
/**
4-
* Copyright 2015-2016 DataStax, Inc.
4+
* Copyright 2017 DataStax, Inc.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,16 +21,16 @@
2121
/**
2222
* Cluster object is used to create Sessions.
2323
*/
24-
interface Cluster
25-
{
24+
interface Cluster {
25+
2626
/**
2727
* Creates a new Session instance.
2828
*
2929
* @param string $keyspace Optional keyspace name
3030
*
3131
* @return Session Session instance
3232
*/
33-
function connect($keyspace = null);
33+
public function connect($keyspace);
3434

3535
/**
3636
* Creates a new Session instance.
@@ -39,5 +39,6 @@ function connect($keyspace = null);
3939
*
4040
* @return Future A Future Session instance
4141
*/
42-
function connectAsync($keyspace = null);
42+
public function connectAsync($keyspace);
43+
4344
}

0 commit comments

Comments
 (0)