Skip to content

Commit 59fdca6

Browse files
author
Bulat Shakirzyanov
committed
update api docs
1 parent ee61b22 commit 59fdca6

19 files changed

+547
-19
lines changed

ext/doc/Cassandra/Bigint.php

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@
2323
*/
2424
final class Bigint implements Numeric
2525
{
26+
/**
27+
* Minimum possible Bigint value
28+
*
29+
* @return Bigint minimum value
30+
*/
31+
public static function min() {}
32+
33+
/**
34+
* Maximim possible Bigint value
35+
*
36+
* @return Bigint maximum value
37+
*/
38+
public static function max() {}
39+
2640
/**
2741
* Creates a new 64bit integer.
2842
*
@@ -43,4 +57,64 @@ public function value() {}
4357
* @return string integer value
4458
*/
4559
public function __toString() {}
60+
61+
/**
62+
* @param Numeric $addend a number to add to this one
63+
*
64+
* @return Numeric sum
65+
*/
66+
public function add(Numeric $addend) {}
67+
68+
/**
69+
* @param Numeric $subtrahend a number to subtract from this one
70+
*
71+
* @return Numeric difference
72+
*/
73+
public function sub(Numeric $subtrahend) {}
74+
75+
/**
76+
* @param Numeric $multiplier a number to multiply this one by
77+
*
78+
* @return Numeric product
79+
*/
80+
public function mul(Numeric $multiplier) {}
81+
82+
/**
83+
* @param Numeric $divisor a number to divide this one by
84+
*
85+
* @return Numeric quotient
86+
*/
87+
public function div(Numeric $divisor) {}
88+
89+
/**
90+
* @param Numeric $divisor a number to divide this one by
91+
*
92+
* @return Numeric remainder
93+
*/
94+
public function mod(Numeric $divisor) {}
95+
96+
/**
97+
* @return Numeric absolute value
98+
*/
99+
public function abs() {}
100+
101+
/**
102+
* @return Numeric negative value
103+
*/
104+
public function neg() {}
105+
106+
/**
107+
* @return Numeric square root
108+
*/
109+
public function sqrt() {}
110+
111+
/**
112+
* @return int this number as int
113+
*/
114+
public function toInt() {}
115+
116+
/**
117+
* @return float this number as float
118+
*/
119+
public function toDouble() {}
46120
}

ext/doc/Cassandra/Collection.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,46 @@ public function get($index) {}
7070
* @return int|null Index
7171
*/
7272
public function find($value) {}
73+
74+
/**
75+
* Total number of elements in this collection
76+
*
77+
* @return int count
78+
*/
79+
public function count() {}
80+
81+
/**
82+
* Current element for iteration
83+
*
84+
* @return mixed current element
85+
*/
86+
public function current() {}
87+
88+
/**
89+
* Current key for iteration
90+
*
91+
* @return int current key
92+
*/
93+
public function key() {}
94+
95+
/**
96+
* Move internal iterator forward
97+
*
98+
* @return void
99+
*/
100+
public function next() {}
101+
102+
/**
103+
* Check whether a current value exists
104+
*
105+
* @return bool
106+
*/
107+
public function valid() {}
108+
109+
/**
110+
* Rewind internal iterator
111+
*
112+
* @return void
113+
*/
114+
public function rewind() {}
73115
}

ext/doc/Cassandra/Decimal.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,64 @@ public function value() {}
6060
* @return int Scale
6161
*/
6262
public function scale() {}
63+
64+
/**
65+
* @param Numeric $addend a number to add to this one
66+
*
67+
* @return Numeric sum
68+
*/
69+
public function add(Numeric $addend) {}
70+
71+
/**
72+
* @param Numeric $subtrahend a number to subtract from this one
73+
*
74+
* @return Numeric difference
75+
*/
76+
public function sub(Numeric $subtrahend) {}
77+
78+
/**
79+
* @param Numeric $multiplier a number to multiply this one by
80+
*
81+
* @return Numeric product
82+
*/
83+
public function mul(Numeric $multiplier) {}
84+
85+
/**
86+
* @param Numeric $divisor a number to divide this one by
87+
*
88+
* @return Numeric quotient
89+
*/
90+
public function div(Numeric $divisor) {}
91+
92+
/**
93+
* @param Numeric $divisor a number to divide this one by
94+
*
95+
* @return Numeric remainder
96+
*/
97+
public function mod(Numeric $divisor) {}
98+
99+
/**
100+
* @return Numeric absolute value
101+
*/
102+
public function abs() {}
103+
104+
/**
105+
* @return Numeric negative value
106+
*/
107+
public function neg() {}
108+
109+
/**
110+
* @return Numeric square root
111+
*/
112+
public function sqrt() {}
113+
114+
/**
115+
* @return int this number as int
116+
*/
117+
public function toInt() {}
118+
119+
/**
120+
* @return float this number as float
121+
*/
122+
public function toDouble() {}
63123
}

ext/doc/Cassandra/Exception/AuthenticationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
* AuthenticationException is raised when client was not configured with valid
2323
* authentication credentials.
2424
*/
25-
class AuthenticationException extends ServerException {}
25+
class AuthenticationException extends RuntimeException {}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
/**
4+
* Copyright 2015 DataStax, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
namespace Cassandra\Exception;
20+
21+
/**
22+
* Cassandra-specific domain exception.
23+
*/
24+
class DivideByZeroException extends RangeException {}

ext/doc/Cassandra/Exception/ExecutionException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
* @see Cassandra\Exception\ReadTimeoutException
2626
* @see Cassandra\Exception\WriteTimeoutException
2727
*/
28-
class ExecutionException extends ServerException {}
28+
class ExecutionException extends RuntimeException {}

ext/doc/Cassandra/Exception/ProtocolException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
* protocol, e.g. sending a QUERY message before STARTUP. Seeing this error can
2424
* be considered a bug.
2525
*/
26-
class ProtocolException extends ServerException {}
26+
class ProtocolException extends RuntimeException {}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
/**
4+
* Copyright 2015 DataStax, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
namespace Cassandra\Exception;
20+
21+
use Cassandra\Exception;
22+
23+
/**
24+
* Cassandra-specific domain exception.
25+
*/
26+
class RangeException extends \RangeException implements Exception {}

ext/doc/Cassandra/Exception/ValidationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
* @see Cassandra\Exception\AlreadyExistsException
2929
* @see Cassandra\Exception\UnpreparedException
3030
*/
31-
class ValidationException extends ServerException {}
31+
class ValidationException extends RuntimeException {}

0 commit comments

Comments
 (0)