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: ...@@ -41,12 +41,12 @@ phpunit:
script: script:
- ./bin/phpunit -v --coverage-text --colors=never --stderr - ./bin/phpunit -v --coverage-text --colors=never --stderr
#phpstan-level0: phpstan-level0:
# stage: analyze stage: analyze
# script: script:
# - ./vendor/bin/phpstan analyse src --level=0 - ./vendor/bin/phpstan analyse src --level=0
#phpstan-level1: phpstan-level1:
# stage: analyze stage: analyze
# script: script:
# - ./vendor/bin/phpstan analyse src --level=1 - ./vendor/bin/phpstan analyse src --level=1
\ No newline at end of file \ No newline at end of file
...@@ -71,7 +71,7 @@ class Controller extends AbstractController ...@@ -71,7 +71,7 @@ class Controller extends AbstractController
} catch (Emmet\Exception\FailedExpansion $e) { } catch (Emmet\Exception\FailedExpansion $e) {
return new JsonResponse(['success' => false]); return new JsonResponse(['success' => false]);
} catch (Emmet\Exception\LengthExceeded $e) { } 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]); return new JsonResponse(['success' => true, 'expanded' => $expanded]);
......
...@@ -7,7 +7,7 @@ class Expander ...@@ -7,7 +7,7 @@ class Expander
public function expand(string $abbr): string public function expand(string $abbr): string
{ {
if (($len = strlen($abbr)) > self::ABBR_LENGTH_MAX) { if (($len = strlen($abbr)) > self::ABBR_LENGTH_MAX) {
throw new Exception\LengthException($len); throw new Exception\LengthExceeded($len);
} }
$output = ''; $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