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 10, 2024
1 parent f345265 commit 2c2d70c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions balancer/src/code/Validator.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

declare(strict_types=1);

namespace Ashishak\Balancer\code;

class Validator
{
public static function ValidateText(string $postVar): bool
public static function validateText(string $postVar): bool
{
$counter = 0;

Expand All @@ -28,4 +29,4 @@ public static function ValidateText(string $postVar): bool
return false;
}
}
}
}
2 changes: 1 addition & 1 deletion balancer/src/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

if (isset($_POST['validator'])) {
if (!empty($_POST['validator'])) {
$result = \Ashishak\Balancer\code\Validator::ValidateText($_POST['validator']);
$result = \Ashishak\Balancer\code\Validator::validateText($_POST['validator']);
if ($result === true) {
$message = '"'. $_POST['validator'] .'" - Строка корректна';

Check failure on line 8 in balancer/src/public/index.php

View workflow job for this annotation

GitHub Actions / phpcs

Expected at least 1 space before &quot;.&quot;; 0 found

Check failure on line 8 in balancer/src/public/index.php

View workflow job for this annotation

GitHub Actions / phpcs

Expected at least 1 space after &quot;.&quot;; 0 found
http_response_code(200);
Expand Down

0 comments on commit 2c2d70c

Please sign in to comment.