Skip to content

Commit

Permalink
Merge pull request #8601 from pchapl/fix-docs-syntax
Browse files Browse the repository at this point in the history
Docs: Fix minor php syntax issues in code examples
  • Loading branch information
orklah committed Oct 19, 2022
2 parents e52b712 + 48da834 commit 347a1c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/running_psalm/issues/FalsableReturnStatement.md
Expand Up @@ -18,7 +18,7 @@ You can add a specific check for false:
<?php

function getCommaPosition(string $a) : int {
$pos = return strpos($a, ',');
$pos = strpos($a, ',');

if ($pos === false) {
return -1;
Expand All @@ -34,7 +34,7 @@ Alternatively you may choose to throw an exception:
<?php

function getCommaPosition(string $a) : int {
$pos = return strpos($a, ',');
$pos = strpos($a, ',');

if ($pos === false) {
throw new Exception('This is unexpected');
Expand Down
2 changes: 1 addition & 1 deletion docs/running_psalm/issues/TaintedLdap.md
Expand Up @@ -16,7 +16,7 @@ If LDAP requests like these are used for login purposes, it could result in an a

$ds = ldap_connect('example.com');
$dn = 'o=Psalm, c=US';
$filter = $_GET['filter']);
$filter = $_GET['filter'];
ldap_search($ds, $dn, $filter, []);
```

Expand Down

0 comments on commit 347a1c2

Please sign in to comment.