Skip to content

Commit 64fbb41

Browse files
authored
chore: fix typos
1 parent 59721e4 commit 64fbb41

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

allowed_bindings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ bind! {
4545
// ext_php_rs_zend_object_release,
4646
// ext_php_rs_zend_string_init,
4747
// ext_php_rs_zend_string_release,
48-
// ext_php_rs_is_kown_valid_utf8,
49-
// ext_php_rs_set_kown_valid_utf8,
48+
// ext_php_rs_is_known_valid_utf8,
49+
// ext_php_rs_set_known_valid_utf8,
5050
object_properties_init,
5151
php_error_docref,
5252
php_info_print_table_end,

guide/src/macros/function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub fn greet(name: String, age: Option<i32>, description: Option<String>) -> Str
9999
## Variadic Functions
100100

101101
Variadic functions can be implemented by specifying the last argument in the Rust
102-
function to the type `&[&Zval]`. This is the equivelant of a PHP function using
102+
function to the type `&[&Zval]`. This is the equivalent of a PHP function using
103103
the `...$args` syntax.
104104

105105
```rust,no_run

src/embed/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Embed {
5454
/// # Returns
5555
///
5656
/// * `Ok(())` - The script was executed successfully
57-
/// * `Err(EmbedError)` - An error occured during the execution of the
57+
/// * `Err(EmbedError)` - An error occurred during the execution of the
5858
/// script
5959
///
6060
/// # Example
@@ -154,7 +154,7 @@ impl Embed {
154154
match unsafe { *Box::from_raw(panic as *mut std::thread::Result<R>) } {
155155
Ok(r) => r,
156156
Err(err) => {
157-
// we resume the panic here so it can be catched correctly by the test framework
157+
// we resume the panic here so it can be caught correctly by the test framework
158158
resume_unwind(err);
159159
}
160160
}
@@ -168,7 +168,7 @@ impl Embed {
168168
/// # Returns
169169
///
170170
/// * `Ok(Zval)` - The result of the evaluation
171-
/// * `Err(EmbedError)` - An error occured during the evaluation
171+
/// * `Err(EmbedError)` - An error occurred during the evaluation
172172
///
173173
/// # Example
174174
///

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Macros for interacting with PHP, mainly when the function takes variadic
2-
//! arguments. Unforutunately, this is the best way to handle these.
2+
//! arguments. Unfortunately, this is the best way to handle these.
33
//! Note that most of these will introduce unsafe into your code base.
44
55
/// Starts the PHP extension information table displayed when running

src/types/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl ZendHashTable {
9191
/// Panics if memory for the hashtable could not be allocated.
9292
pub fn with_capacity(size: u32) -> ZBox<Self> {
9393
unsafe {
94-
// SAFETY: PHP allocater handles the creation of the array.
94+
// SAFETY: PHP allocator handles the creation of the array.
9595
let ptr = _zend_new_array(size);
9696

9797
// SAFETY: `as_mut()` checks if the pointer is null, and panics if it is not.

src/zend/globals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ impl ProcessGlobals {
286286
///
287287
/// # Panics
288288
/// There is an outstanding issue with the implementation of this function.
289-
/// Untill resolved, this function will allways panic.
289+
/// Until resolved, this function will always panic.
290290
///
291291
/// - <https://github.com/davidcole1340/ext-php-rs/issues/331>
292292
/// - <https://github.com/php/php-src/issues/16541>

src/zend/try_catch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn do_try_catch<R, F: FnMut() -> R + RefUnwindSafe>(func: F, first: bool) -> Res
7979
match unsafe { *Box::from_raw(panic as *mut std::thread::Result<R>) } {
8080
Ok(r) => Ok(r),
8181
Err(err) => {
82-
// we resume the panic here so it can be catched correctly by the test framework
82+
// we resume the panic here so it can be caught correctly by the test framework
8383
resume_unwind(err);
8484
}
8585
}

tests/src/integration/_utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ function assert_exception_thrown(callable $callback): void
77
} catch (\Throwable $th) {
88
return;
99
}
10-
throw new Exception("Excption was not thrown", 255);
10+
throw new Exception("Exception was not thrown", 255);
1111
}

0 commit comments

Comments
 (0)