Skip to content

Commit

Permalink
🐛 Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Mar 5, 2021
1 parent 8d48a88 commit 9e86c98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Classes/Fusion/Implementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public function getThreshold()
return $this->fusionValue('threshold');
}

public function getThrowExeption()
public function getThrowException()
{
return $this->fusionValue('throwExeption');
return $this->fusionValue('throwException');
}

public function texFileExists(string $language): bool
Expand Down Expand Up @@ -87,13 +87,13 @@ public function evaluate()
if (!$this->texFileExists($language)) {
$firstPartOfLanguage = explode('-', $language)[0];
if ($firstPartOfLanguage === $language) {
if ($this->getThrowExeption()) {
if ($this->getThrowException()) {
throw new \Exception("Hyphen definition for '$language' is not available", 1614949800);
}
return $this->getContent();
}
if (!$this->texFileExists($firstPartOfLanguage)) {
if ($this->getThrowExeption()) {
if ($this->getThrowException()) {
throw new \Exception("Hyphen definition for '$firstPartOfLanguage' is not available", 1614949900);
}
return $this->getContent();
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ prototype(Foo.Bar:Component) {

**threshold** (integer, default = `0`) : Minimum amount characters a word needs to have, before it is being hyphenated.

**throwExeption** (boolean, default = `true`) : Throw Exeption if no hyphen definition is found
**throwException** (boolean, default = `true`) : Throw exception if no hyphen definition is found

## Credits

Expand Down
6 changes: 3 additions & 3 deletions Resources/Private/Fusion/Root.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ prototype(Carbon.Hyphen:Component) < prototype(Neos.Fusion:Component) {
locale = null
threshold = 0

// Throw Exeption if no hyphen definition is found
throwExeption = true
// Throw exception if no hyphen definition is found
throwException = true

inBackend = ${documentNode.context.inBackend}

Expand All @@ -16,7 +16,7 @@ prototype(Carbon.Hyphen:Component) < prototype(Neos.Fusion:Component) {
type={props.type}
locale={props.locale}
threshold={props.threshold}
throwExeption={props.throwExeption}
throwException={props.throwException}
content={props.content}
/>
`
Expand Down

0 comments on commit 9e86c98

Please sign in to comment.