Skip to content
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

Fix typos #1021

Merged
merged 1 commit into from
Aug 19, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
562 changes: 281 additions & 281 deletions CHANGELOG

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ that will check the source code.
Using multiple source files and folders
```````````````````````````````````````

PHPMD also allowes you to specify multiple source directories in case you want
PHPMD also allows you to specify multiple source directories in case you want
to create one output for certain parts of your code ::

~ $ phpmd /path/to/code,index.php,/another/place/with/code text codesize
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/PHPMD/Renderer/HTMLRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ protected function writeTable($title, $itemsTitle, $items)
$sum = array_sum($items);

foreach ($items as $name => $count) {
// Calculate chart/bar's percentage width relative to the highest occuring item.
// Calculate chart/bar's percentage width relative to the highest occurring item.
$width = $max !== 0 ? $count / $max * 100 : 0; // Avoid division by zero.

$bar = sprintf(
Expand Down
8 changes: 4 additions & 4 deletions src/main/php/PHPMD/Rule/Design/DepthOfInheritance.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ public function apply(AbstractNode $node)
{
try {
$threshold = $this->getIntProperty('maximum');
$comparision = 1;
$comparison = 1;
} catch (\OutOfBoundsException $e) {
$threshold = $this->getIntProperty('minimum');
$comparision = 2;
$comparison = 2;
}

$dit = $node->getMetric('dit');
if (($comparision === 1 && $dit > $threshold) ||
($comparision === 2 && $dit >= $threshold)
if (($comparison === 1 && $dit > $threshold) ||
($comparison === 2 && $dit >= $threshold)
) {
$this->addViolation(
$node,
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/PHPMD/Rule/Design/LongMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LongMethod extends AbstractRule implements FunctionAware, MethodAware
{
/**
* This method checks the lines of code length for the given function or
* methode node against a configured threshold.
* method node against a configured threshold.
*
* @param \PHPMD\AbstractNode $node
* @return void
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/PHPMD/Rule/UnusedFormalParameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ protected function removeCompoundVariables(AbstractNode $node)
*
* If the given method calls func_get_args() then all parameters are automatically referenced.
*
* @param \PHPMD\AbstractNode $node The node to remove the referneced variables from.
* @param \PHPMD\AbstractNode $node The node to remove the referenced variables from.
* @return void
*/
protected function removeVariablesUsedByFuncGetArgs(AbstractNode $node)
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/rulesets/codesize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ lines of code that are split are counted as one.
<example>
<![CDATA[
public class Foo extends Bar {
public int methd() {
super.methd();
public int method() {
super.method();



Expand Down
10 changes: 5 additions & 5 deletions src/site/docx/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
Remove the leading blank line from the TextRenderer
</action>
<action date="9f71d98" dev="jaymoulin" type="add" system="github" issue="380">
add --ignore-exit-violations CLI flag to allow exit code 0 event if violation is found (will allow successfull build for CI)
add --ignore-exit-violations CLI flag to allow exit code 0 event if violation is found (will allow successful build for CI)
</action>
<action date="2a31103" dev="Tristian" type="fix" system="github" issue="386">
English language fixes
Expand Down Expand Up @@ -456,7 +456,7 @@
Fixing namespace issue for OutOfBoundsException
</action>
<action date="0d4bed1" dev="tvking" issue="80" system="github" type="fix" due-to="DannyvdSluijs">
Out ot the box usage in combination with composer of all rules failes throws error Property $exceptions does not exist.
Out of the box usage in combination with composer of all rules fails throws error Property $exceptions does not exist.
</action>
</release>
<release version="2.2.1"
Expand Down Expand Up @@ -801,7 +801,7 @@
if a source node contains the @SuppressWarnings
annotation.">
<action date="0e60fb9" dev="francisbesset" system="pivotaltracker" due-to="francisbesset" due-to-email="francis.besset@gmail.com" type="add">
Controverial PHPMD rule that checks if the project under
Controversial PHPMD rule that checks if the project under
test does not utilize PHP's super globals.
</action>
<action type="add" issue="18462127" dev="mapi" date="b066b44">
Expand Down Expand Up @@ -886,7 +886,7 @@

<release version="0.2.7" date="2010/09/01">
<action type="fix" issue="36" date="284">
@SupressWarnings annotation does not work for
@SuppressWarnings annotation does not work for
UnusedPrivateMethod rule.
</action>
<action type="fix" issue="35" date="286">
Expand Down Expand Up @@ -979,7 +979,7 @@
<release version="0.2.2" date="2010/01/20">
<action type="fix">
Small change to the command line interface, which did not return
an exit code != 0 when an exception occured.
an exit code != 0 when an exception occurred.
</action>
</release>

Expand Down
2 changes: 1 addition & 1 deletion src/site/resources/config/authors.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name[pichler] = Manuel Pichler
name[mapi] = Manuel Pichler
name[manu] = Manuel Pichler

# It is possible to assiciate a mail address to the author name which may be
# It is possible to associate a mail address to the author name which may be
# used by some display handlers.
mail[pichler] = mapi@pdepend.org
mail[mapi] = mapi@pdepend.org
Expand Down
4 changes: 2 additions & 2 deletions src/site/resources/config/binaries.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# is available in your $PATH. If the binary is only available at another
# location, or even has another name, you may specify an option for this here.
#
# You may of course specify the full absolute path to the binary, isntead of
# You may of course specify the full absolute path to the binary, instead of
# just its name, if it is not in $PATH.

[core]
Expand All @@ -24,7 +24,7 @@ rst2xml=rst2xml

[search]

# The default search uses glimspe as an indexer and search tool. Nearly each
# The default search uses glimpse as an indexer and search tool. Nearly each
# distribution offers glimpse as a package, and you need two binaries from this
# package.
glimpse=glimpse
Expand Down
8 changes: 4 additions & 4 deletions src/site/resources/config/content/blog.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entries=10
# You may get one signing up on wordpress.com
akismet_key=

# Absolut path to page notifying the user, that his comment has been rated as
# Absolute path to page notifying the user, that his comment has been rated as
# spam
spamUrl=/spam.html

Expand All @@ -19,9 +19,9 @@ spamUrl=/spam.html
# supported by WCV and defined at: !URL!
#xmlrpc=http://norro.de/Spam/Pot1

# Absolut path to page containing XML repsonse for trackback spammers
# Absolute path to page containing XML response for trackback spammers
trackbackSpamUrl=/trackback_spam.xml
# Absolut path to page containing XML repsonse for trackback spammers
# Absolute path to page containing XML response for trackback spammers
trackbackErrorUrl=/trackback_error.xml
# Absolut path to page containing XML repsonse for trackback spammers
# Absolute path to page containing XML response for trackback spammers
trackbackSuccessUrl=/trackback_success.xml
4 changes: 2 additions & 2 deletions src/site/resources/config/display/sitemap.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ changefreq=false

[priorities]

# Flag wheather to include priority flags in the generated sitemap. Either
# Flag whether to include priority flags in the generated sitemap. Either
# "true" or "false". Defaults to "false".
include=true

Expand All @@ -24,7 +24,7 @@ format[sitemap]=0

# Node priorities
#
# You may specify a higher priority for some spcial nodes, which should gain
# You may specify a higher priority for some special nodes, which should gain
# more importance. You may use factors bigger then 1 here.
node[/description]=2
node[/spam]=0
Expand Down
6 changes: 3 additions & 3 deletions src/site/resources/config/handlers.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ handler[]=wcvIndexerDirectory
[file]

# The file handlers describe how to handle a file. The top most handler has
# the highest priotity.
# the highest priority.

handler[]=wcvIndexerFileHtml
handler[]=wcvIndexerFileRst
Expand All @@ -21,7 +21,7 @@ handler[]=wcvIndexerFileStatic
[metadata]

# The metadata handlers describe how to receive metadata associated with
# files. The top most handler has the highest priotity.
# files. The top most handler has the highest priority.

handler[]=wcvMetadataSvn
handler[]=wcvMetadataFilesystem
Expand All @@ -44,7 +44,7 @@ handler[sitemap]=wcvDisplaySitemap

handler[dyn]=wcvDisplayRedirect

# Deafult to binary handeler which will just passthru the content with setting
# Default to binary handler which will just passthru the content with setting
# the correct mime type.

default=wcvDisplayBinary
6 changes: 3 additions & 3 deletions src/site/resources/config/site.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ debug = 1
# a autoload function in this init script, or just include your required
# classes.
#
# All pathes must be given relative to the WCV installation base
# All paths must be given relative to the WCV installation base
#scripts[]=external/myModule/init.php

[cache]

# Cache settings
#
# The cache setting is a bitmask of the single cache entries below. -1 will
# always cache everything. To explicitely cache tree and content you may use 3:
# always cache everything. To explicitly cache tree and content you may use 3:
# 1 | 2 = 3
#
# 1 = Cache content tree
Expand All @@ -61,7 +61,7 @@ exclude[]=images

[mail]

# General flag indicating wheather to send mail. May be ignored by modules of
# General flag indicating whether to send mail. May be ignored by modules of
# course.
send=yes

Expand Down
2 changes: 1 addition & 1 deletion src/site/rst/download/releases/1.0.0/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Release 1.0.0
:Keywords: Release, Version, Features, Bugfixes

Version 1.0.0 of PHPMD was released on Februrary the 05th 2011. This release
closes a bug in PHPMD and introduces a completly new directory layout and
closes a bug in PHPMD and introduces a completely new directory layout and
build process for PHPMD.

Bugfixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ public function testLocalVariableUsedInDoubleQuoteStringGetsNotReported()

$inputs = self::createCodeResourceUriForTest();
$rules = 'unusedcode';
$renderes = array($renderer);
$renderers = array($renderer);
$factory = new RuleSetFactory();


$phpmd = new PHPMD();
$phpmd->processFiles(
$inputs,
$factory->getIgnorePattern($rules),
$renderes,
$renderers,
$factory->createRuleSets($rules),
new Report()
);
Expand Down
4 changes: 2 additions & 2 deletions src/test/php/PHPMD/RuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ public function testGetStringPropertyReturnsString()
{
/** @var AbstractRule $rule */
$rule = $this->getMockForAbstractClass('PHPMD\\AbstractRule');
$rule->addProperty(__FUNCTION__, 'Fourty Two');
$rule->addProperty(__FUNCTION__, 'Forty Two');

$this->assertSame('Fourty Two', $rule->getStringProperty(__FUNCTION__));
$this->assertSame('Forty Two', $rule->getStringProperty(__FUNCTION__));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

class testRuleDoesApplyForInparameterNameWithUnderscore
{
public function invalidParameterNameWithUnderscore($ivalid_parameter)
public function invalidParameterNameWithUnderscore($invalid_parameter)
{
$foo = $ivalid_parameter;
$foo = $invalid_parameter;
}
}