Commit 2c109e60 authored by Matt's avatar Matt

Add phpstan to gitlab CI pipeline

parent 91f6782f
Pipeline #49508726 passed with stages
in 4 minutes
......@@ -41,12 +41,12 @@ phpunit:
script:
- ./bin/phpunit -v --coverage-text --colors=never --stderr
#phpstan-level0:
# stage: analyze
# script:
# - ./vendor/bin/phpstan analyse src --level=0
phpstan-level0:
stage: analyze
script:
- ./vendor/bin/phpstan analyse src --level=0
#phpstan-level1:
# stage: analyze
# script:
# - ./vendor/bin/phpstan analyse src --level=1
\ No newline at end of file
phpstan-level1:
stage: analyze
script:
- ./vendor/bin/phpstan analyse src --level=1
\ No newline at end of file
......@@ -71,7 +71,7 @@ class Controller extends AbstractController
} catch (Emmet\Exception\FailedExpansion $e) {
return new JsonResponse(['success' => false]);
} catch (Emmet\Exception\LengthExceeded $e) {
$expanded_payload = $expander->expand(self::ERROR_BAD_STRING);
$expanded = $expander->expand(self::ERROR_BAD_STRING);
}
return new JsonResponse(['success' => true, 'expanded' => $expanded]);
......
......@@ -7,7 +7,7 @@ class Expander
public function expand(string $abbr): string
{
if (($len = strlen($abbr)) > self::ABBR_LENGTH_MAX) {
throw new Exception\LengthException($len);
throw new Exception\LengthExceeded($len);
}
$output = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment