Skip to content

Commit

Permalink
Домашнее задание №4 - приведению к стандарту написания кода в github
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-Shishak committed Apr 8, 2024
1 parent 7e8f5c2 commit 0bbd5e4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions balancer/src/code/Validator.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<?php

Check failure on line 1 in balancer/src/code/Validator.php

View workflow job for this annotation

GitHub Actions / phpcs

Header blocks must be separated by a single blank line
declare(strict_types=1);

namespace Ashishak\Balancer\code;

class Validator
{
public static function ValidateText(string $postVar): bool{
public static function ValidateText(string $postVar): bool

Check failure on line 8 in balancer/src/code/Validator.php

View workflow job for this annotation

GitHub Actions / phpcs

Method name &quot;Validator::ValidateText&quot; is not in camel caps format
{
$counter = 0;

$postVarArray = str_split($postVar);

foreach ($postVarArray as $value){
if ($value == '('){
foreach ($postVarArray as $value) {
if ($value == '(') {
$counter++;
} elseif($value == ')'){
} elseif ($value == ')') {
$counter--;
}
if ($counter < 0){
if ($counter < 0) {
return false;
}
}

if ($counter === 0){
if ($counter === 0) {
return true;
} else {
return false;
}

}

}

Check failure on line 31 in balancer/src/code/Validator.php

View workflow job for this annotation

GitHub Actions / phpcs

Expected 1 newline at end of file; 0 found

0 comments on commit 0bbd5e4

Please sign in to comment.