Skip to content

Zend/*: fix a bunch of typos #16017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Zend/tests/019.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ foreach ($scalar_variables as $scalar_var) {

// destroy the variable using unset
unset( $scalar_var );
// dump and see if its destroyed, expcted: NULL
// dump and see if its destroyed, expected: NULL
var_dump( $scalar_var );

// check using isset to see if unset, expected: bool(false)
Expand Down Expand Up @@ -165,11 +165,11 @@ foreach ($resources as $resource) {
// unset the resource
unset($resource);
// check using isset() and empty()
var_dump( isset($resource) ); // expected: bool(flase)
var_dump( isset($resource) ); // expected: bool(false)
var_dump( empty($resource) ); // expected: bool(true)
// call isset() with two args, but one set
var_dump( isset($resource, $temp_var) ); // expected: bool(false)
// uset the temp_var
// unset the temp_var
unset($temp_var);
// now the isset() with both the args as unset
var_dump( isset($resource, $temp_var) ); // expected: bool(false);
Expand Down Expand Up @@ -211,7 +211,7 @@ var_dump($point1); // dump the object
// check the object and member that is not set
var_dump( isset($point1) ); // expected: bool(true)
var_dump( empty($point1) ); // expected: bool(false)
var_dump( isset($point1->$lable) ); //expected: bool(flase)
var_dump( isset($point1->$lable) ); //expected: bool(false)
var_dump( empty($point1->$lable) ); //expected: bool(true)

//set the member variable lable and check
Expand Down Expand Up @@ -291,7 +291,7 @@ function test_unset1() {
$static_var = 20;
echo "value of static_var after new assignment: $static_var\n";
}
// call the functiont
// call the function
test_unset1();
test_unset1();
test_unset1();
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug27731.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #27731 (error_reporing() call inside @ block does not work correctly)
Bug #27731 (error_reporting() call inside @ block does not work correctly)
--FILE--
<?php
error_reporting(E_ALL ^ E_NOTICE);
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug30162.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #30162 (Catching exception in constructor couses lose of $this)
Bug #30162 (Catching exception in constructor causes lose of $this)
--FILE--
<?php
#[AllowDynamicProperties]
Expand Down
6 changes: 3 additions & 3 deletions Zend/tests/bug30922.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
Bug #30922 (reflective functions crash PHP when interfaces extend themselves)
--FILE--
<?php
interface RecurisiveFooFar extends RecurisiveFooFar {}
class A implements RecurisiveFooFar {}
interface RecursiveFooFar extends RecursiveFooFar {}
class A implements RecursiveFooFar {}

$a = new A();
var_dump($a instanceOf A);
echo "ok\n";
?>
--EXPECTF--
Fatal error: Uncaught Error: Interface "RecurisiveFooFar" not found in %s:%d
Fatal error: Uncaught Error: Interface "RecursiveFooFar" not found in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug32322.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class test
{
echo "Class " . $this -> myname . " destroyed at script end\n";
} else {
echo "Class " . $this -> myname . " destroyed beforce script end\n";
echo "Class " . $this -> myname . " destroyed before script end\n";
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug34467.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #34467 (foreach + __get + __set incosistency)
Bug #34467 (foreach + __get + __set inconsistency)
--FILE--
<?php
class abc {
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug36513.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #36513 (comment will be outputed in last line)
Bug #36513 (comment will be output in last line)
--FILE--
<?php
function test($s) {
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/bug37707.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Bug #37707 (clone without assigning leaks memory)
<?php
class testme {
function __clone() {
echo "clonned\n";
echo "cloned\n";
}
}
clone new testme();
echo "NO LEAK\n";
?>
--EXPECT--
clonned
cloned
NO LEAK
2 changes: 1 addition & 1 deletion Zend/tests/bug39003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ClassName
function test (OtherClassName $object) { }

spl_autoload_register(function ($class) {
var_dump("__autload($class)");
var_dump("__autoload($class)");
});

$obj = new ClassName;
Expand Down
10 changes: 5 additions & 5 deletions Zend/tests/bug39297.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #39297 (Memory corryption because of indirect modification of overloaded array)
Bug #39297 (Memory corruption because of indirect modification of overloaded array)
--FILE--
<?php
function compareByRef(&$first, &$second) {
Expand All @@ -18,15 +18,15 @@ class MyTree implements ArrayAccess {

public function offsetSet($offset, $value): void {
echo "offsetSet()\n";
$cannonicalName = strtolower($offset);
$this->children[$cannonicalName] = $value;
$canonicalName = strtolower($offset);
$this->children[$canonicalName] = $value;
$value->parent = $this;
}

public function offsetGet($offset): mixed {
echo "offsetGet()\n";
$cannonicalName = strtolower($offset);
return $this->children[$cannonicalName];
$canonicalName = strtolower($offset);
return $this->children[$canonicalName];
}

}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug43851.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #43851 (Memory corrution on reuse of assigned value)
Bug #43851 (Memory corruption on reuse of assigned value)
--FILE--
<?php
foo();
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug45742.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #45742 Wrong class array inpretetion using constant indexes
Bug #45742 Wrong class array interpretation using constant indexes
--FILE--
<?php
class Constants {
Expand Down
12 changes: 6 additions & 6 deletions Zend/tests/bug54039.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ $f = test_2(); $f();
function test_3() {
static $v = "";
$v .= 'b';
echo "Outer function catenates 'b' onto \$v to give $v\n";
echo "Outer function concatenates 'b' onto \$v to give $v\n";
$f = function() use($v) {
echo "Inner function reckons \$v is $v\n";
};
$v .= 'a';
echo "Outer function catenates 'a' onto \$v to give $v\n";
echo "Outer function concatenates 'a' onto \$v to give $v\n";
return $f;
}
$f = test_3(); $f();
Expand All @@ -51,9 +51,9 @@ Outer function increments $v to 1
Inner function reckons $v is 0
Outer function increments $v to 2
Inner function reckons $v is 1
Outer function catenates 'b' onto $v to give b
Outer function catenates 'a' onto $v to give ba
Outer function concatenates 'b' onto $v to give b
Outer function concatenates 'a' onto $v to give ba
Inner function reckons $v is b
Outer function catenates 'b' onto $v to give bab
Outer function catenates 'a' onto $v to give baba
Outer function concatenates 'b' onto $v to give bab
Outer function concatenates 'a' onto $v to give baba
Inner function reckons $v is bab
2 changes: 1 addition & 1 deletion Zend/tests/bug54043.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #54043: Remove inconsitency of internal exceptions and user defined exceptions
Bug #54043: Remove inconsistency of internal exceptions and user defined exceptions
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/bug54367.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Bug #54367 (Use of closure causes problem in ArrayAccess)
--FILE--
<?php
class MyObjet implements ArrayAccess
class MyObject implements ArrayAccess
{
public function offsetSet($offset, $value): void { }
public function offsetExists($offset): bool { }
Expand All @@ -16,7 +16,7 @@ class MyObjet implements ArrayAccess
}
}

$a = new MyObjet();
$a = new MyObject();
echo $a['p']('foo');
?>
--EXPECT--
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug60536_005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trait THello1 {
}

// Protected and public are handle more strict with a warning then what is
// expected from normal inheritance since they can have easier coliding semantics
// expected from normal inheritance since they can have easier colliding semantics
echo "PRE-CLASS-GUARD\n";
class SameNameInSubClassProducesNotice extends Base {
use THello1;
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug63219.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #63219 (Segfault when aliasing trait method when autoloader throws excpetion)
Bug #63219 (Segfault when aliasing trait method when autoloader throws exception)
--FILE--
<?php
trait TFoo {
Expand Down
8 changes: 4 additions & 4 deletions Zend/tests/bug70805.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class C {
public function __destruct() {
if (isset($GLOBALS["a"])) {
unset($GLOBALS["array"]);
unset($GLOBALS["a"]); // this will be called in gc_colloct_roots and put $a into gc roots buf
unset($GLOBALS["a"]); // this will be called in gc_collect_roots and put $a into gc roots buf
}
}
}
Expand All @@ -36,11 +36,11 @@ while ($i++ < 9998) {
}
$t = [new C];
$t[] = &$t;
unset($t); // This is used to trigger C::__destruct while doing gc_colloct_roots
unset($t); // This is used to trigger C::__destruct while doing gc_collect_roots

$e = $a;
unset($a); // This one cannot be put into roots buf because it's full, thus gc_colloct_roots will be called,
// but C::__destructor which is called in gc_colloct_roots will put $a into buf
unset($a); // This one cannot be put into roots buf because it's full, thus gc_collect_roots will be called,
// but C::__destructor which is called in gc_collect_roots will put $a into buf
// which will make $a be put into gc roots buf twice
var_dump(gc_collect_cycles());
?>
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug73987_2.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #73987 (Method compatibility check looks to original definition and not parent - nullabilty abstract)
Bug #73987 (Method compatibility check looks to original definition and not parent - nullability abstract)
--FILE--
<?php

Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug80811.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #80811: Function exec without $output but with $restult_code parameter crashes
Bug #80811: Function exec without $output but with $result_code parameter crashes
--FILE--
<?php

Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/class_constants_006.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Ownership of constant expression inhereted from interface should be transfered to class
Ownership of constant expression inherited from interface should be tranferred to class
--FILE--
<?php
interface I {
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/class_constants_007.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Ownership of constant expression inhereted from immutable class should be transfered to class
Ownership of constant expression inherited from immutable class should be tranferred to class
--FILE--
<?php
class A {
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/closure_042.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ $c = function() { var_dump($this); };
$d = $c->bindTo(new stdClass);
$d();
$rm = new ReflectionFunction($d);
var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure
var_dump($rm->getClosureScopeClass()->name); //dummy scope is Closure

//should have the same effect
$d = $c->bindTo(new stdClass, NULL);
$d();
$rm = new ReflectionFunction($d);
var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure
var_dump($rm->getClosureScopeClass()->name); //dummy scope is Closure

echo "Done.\n";
?>
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/closures/closure_from_callable_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ catch (\Throwable $t) {
echo "Wrong exception type thrown: ".get_class($t)." : ".$t->getMessage()."\n";
}

echo 'Subclass cannot closure over parant private static method'."\n";
echo 'Subclass cannot closure over parent private static method'."\n";
try {
$subFoo = new SubFoo;
$fn = $subFoo->closePrivateStaticInvalid();
Expand Down Expand Up @@ -205,7 +205,7 @@ Non-existent method should fail
Non-existent class should fail
Non-existent function should fail
Subclass cannot closure over parent private instance method
Subclass cannot closure over parant private static method
Subclass cannot closure over parent private static method
Function scope cannot closure over protected instance method
Function scope cannot closure over private instance method
Access private instance method of parent object through "self::" to parent method
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/ctor_promotion_mixing.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Constructor promotiong mixed with other properties, parameters and code
Constructor promotion mixed with other properties, parameters and code
--FILE--
<?php

Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/enum/empty-from.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Empty enum with from/tryFrom doens't segfault
Empty enum with from/tryFrom doesn't segfault
--FILE--
<?php

Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/fe_fetch_dtor_exception.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Dtor may throw exception furing FE_FETCH assignment
Dtor may throw exception during FE_FETCH assignment
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Implicit float to int conversions should not warn for literals in combined assingment operetor if float has a fractional part equal to 0
Implicit float to int conversions should not warn for literals in combined assignment operator if float has a fractional part equal to 0
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Implicit float to int conversions should warn for literals in combined assingment operetor
Implicit float to int conversions should warn for literals in combined assignment operator
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Implicit float to int conversions should warn for literals in combined assingment operetor
Implicit float to int conversions should warn for literals in combined assignment operator
--FILE--
<?php

Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/foreach_011.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
sort() functions precerve foreach by reference iterator pointer
sort() functions preserve foreach by reference iterator pointer
--FILE--
<?php
$a = [1,2,3,4,5,0];
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/foreach_012.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
array_walk() function precerve foreach by reference iterator pointer
array_walk() function preserve foreach by reference iterator pointer
--FILE--
<?php
$a = [1,2,3,4,5];
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/foreach_013.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
array_push() function precerve foreach by reference iterator pointer
array_push() function preserve foreach by reference iterator pointer
--FILE--
<?php
$a = [1,2,3];
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/foreach_014.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
array_pop() function precerve foreach by reference iterator pointer
array_pop() function preserve foreach by reference iterator pointer
--FILE--
<?php
$a = [1,2,3];
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/foreach_015.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
array_shift() function precerve foreach by reference iterator pointer
array_shift() function preserve foreach by reference iterator pointer
--FILE--
<?php
$a = [1,2,3,4];
Expand Down
Loading
Loading