Skip to content

Commit 4e44efa

Browse files
authored
docs: fix spelling in stubs.rst (GH-18220)
1 parent 13e0fb9 commit 4e44efa

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docs/source/miscellaneous/stubs.rst

+13-13
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ code, but instead contain empty function and method bodies. A very basic stub lo
1313
/** @var float */
1414
const WEIGHT = 6.8;
1515
16-
class Atmopshere {
16+
class Atmosphere {
1717
public function calculateBar(): float {}
1818
}
1919
20-
function fahrenheitToCelcius(float $fahrenheitToCelcius): float {}
20+
function fahrenheitToCelsius(float $fahrenheitToCelsius): float {}
2121
2222
Any kind of symbol can be declared via stubs. Every type can be used, with the exception of
2323
disjunctive normal form (DNF) types. Additional meta information can be added via PHPDoc blocks or
@@ -33,17 +33,17 @@ using namespace blocks:
3333
/** @var float */
3434
const WEIGHT_TON = 6.8;
3535
36-
class Atmopshere {
36+
class Atmosphere {
3737
public function calculateBar(): float {}
3838
}
3939
}
4040
4141
namespace Algorithms {
42-
function fahrenheitToCelcius(float $fahrenheit): float {}
42+
function fahrenheitToCelsius(float $fahrenheit): float {}
4343
}
4444
4545
The above example declares the global constants ``ANIMAL`` and ``WEIGHT_TON``, and the class
46-
``Atmopshere`` in the top-level namespace. The ``fahrenheitToCelcius()`` function is declared to be
46+
``Atmosphere`` in the top-level namespace. The ``fahrenheitToCelsius()`` function is declared to be
4747
in the ``Algorithms`` namespace.
4848

4949
********************
@@ -77,11 +77,11 @@ The arginfo file matching our first example looks like:
7777
/* This is a generated file, edit the .stub.php file instead.
7878
* Stub hash: e4ed788d54a20272a92a3f6618b73d48ec848f97 */
7979
80-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fahrenheitToCelcius, 0, 1, IS_DOUBLE, 0)
81-
ZEND_ARG_TYPE_INFO(0, fahrenheitToCelcius, IS_DOUBLE, 0)
80+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fahrenheitToCelsius, 0, 1, IS_DOUBLE, 0)
81+
ZEND_ARG_TYPE_INFO(0, fahrenheitToCelsius, IS_DOUBLE, 0)
8282
ZEND_END_ARG_INFO()
8383
84-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Atmopshere_calculateBar, 0, 0, IS_DOUBLE, 0)
84+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Atmosphere_calculateBar, 0, 0, IS_DOUBLE, 0)
8585
ZEND_END_ARG_INFO()
8686
8787
The hash that is included in the file makes sure that stub files are not reprocessed unless the stub
@@ -186,24 +186,24 @@ In order to generate these, add the file-level ``@generate-function-entries`` PH
186186
public function calculateBar(): float {}
187187
}
188188
189-
function fahrenheitToCelcius(float $fahrenheit): float {}
189+
function fahrenheitToCelsius(float $fahrenheit): float {}
190190
191191
Now, the following C code is generated:
192192

193193
.. code:: c
194194
195-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fahrenheitToCelcius, 0, 1, IS_DOUBLE, 0)
195+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fahrenheitToCelsius, 0, 1, IS_DOUBLE, 0)
196196
ZEND_ARG_TYPE_INFO(0, fahrenheit, IS_DOUBLE, 0)
197197
ZEND_END_ARG_INFO()
198198
199199
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Atmosphere_calculateBar, 0, 0, IS_DOUBLE, 0)
200200
ZEND_END_ARG_INFO()
201201
202-
ZEND_FUNCTION(fahrenheitToCelcius);
202+
ZEND_FUNCTION(fahrenheitToCelsius);
203203
ZEND_METHOD(Atmosphere, calculateBar);
204204
205205
static const zend_function_entry ext_functions[] = {
206-
ZEND_FE(fahrenheitToCelcius, arginfo_fahrenheitToCelcius)
206+
ZEND_FE(fahrenheitToCelsius, arginfo_fahrenheitToCelsius)
207207
ZEND_FE_END
208208
};
209209
@@ -762,7 +762,7 @@ Running it with the stub examples that are used in this guide, the following war
762762
Warning: Missing class synopsis for Number
763763
Warning: Missing class synopsis for Elephant
764764
Warning: Missing class synopsis for Atmosphere
765-
Warning: Missing method synopsis for fahrenheitToCelcius()
765+
Warning: Missing method synopsis for fahrenheitToCelsius()
766766
Warning: Missing method synopsis for Atmosphere::calculateBar()
767767
768768
**********************

0 commit comments

Comments
 (0)