Skip to content

Commit 9656a9c

Browse files
committed
general improvements
1 parent a7d5129 commit 9656a9c

File tree

6 files changed

+40
-36
lines changed

6 files changed

+40
-36
lines changed

src/Exception/ErrorCommandExecutable.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
<?php
2+
23
namespace PHPJasper\Exception;
3-
/**
4-
* Class ErrorCommandExecutable
5-
* @package PHPJasper\Exception
6-
*/
7-
class ErrorCommandExecutable extends \Exception
4+
5+
use Exception;
6+
7+
class ErrorCommandExecutable extends Exception
88
{
9+
/**
10+
* ErrorCommandExecutable constructor.
11+
* @param string $message
12+
* @param int $code
13+
* @param Exception|null $previous
14+
*/
915
public function __construct($message = "", $code = 0, Exception $previous = null)
1016
{
1117
$message = 'Your report has an error and couldn \'t be processed!\ Try to output the command using the function `output();` and run it manually in the console.';

src/Exception/InvalidCommandExecutable.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
2+
23
namespace PHPJasper\Exception;
3-
/**
4-
* Class InvalidCommandExecutable
5-
* @package PHPJasper\Exception
6-
*/
7-
class InvalidCommandExecutable extends \Exception
8-
{
94

5+
use Exception;
6+
7+
class InvalidCommandExecutable extends Exception
8+
{
109
/**
1110
* InvalidCommandExecutable constructor.
1211
* @param string $message

src/Exception/InvalidFormat.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<?php
2+
23
namespace PHPJasper\Exception;
3-
/**
4-
* Class InvalidFormat
5-
* @package PHPJasper\Exception
6-
*/
7-
class InvalidFormat extends \Exception
8-
{
94

5+
use Exception;
6+
7+
class InvalidFormat extends Exception
8+
{
9+
/**
10+
* InvalidFormat constructor.
11+
* @param string $message
12+
* @param int $code
13+
* @param Exception|null $previous
14+
*/
1015
public function __construct($message = "", $code = 0, Exception $previous = null)
1116
{
1217
parent::__construct($message, $code, $previous);

src/Exception/InvalidInputFile.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
2+
23
namespace PHPJasper\Exception;
3-
/**
4-
* Class InvalidInputFile
5-
* @package PHPJasper\Exception
6-
*/
7-
class InvalidInputFile extends \Exception
8-
{
94

5+
use Exception;
6+
7+
class InvalidInputFile extends Exception
8+
{
109
/**
1110
* InvalidInputFile constructor.
1211
* @param string $message

src/Exception/InvalidResourceDirectory.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
2+
23
namespace PHPJasper\Exception;
3-
/**
4-
* Class InvalidResourceDirectory
5-
* @package PHPJasper\Exception
6-
*/
7-
class InvalidResourceDirectory extends \Exception
8-
{
94

5+
use Exception;
6+
7+
class InvalidResourceDirectory extends Exception
8+
{
109
/**
1110
* Invalid Resource Directory constructor.
1211
*

src/PHPJasper.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313

1414
namespace PHPJasper;
1515

16-
/**
17-
* Class PHPJasper
18-
* @package PHPJasper
19-
*/
2016
class PHPJasper
2117
{
2218

@@ -55,6 +51,9 @@ public function __construct()
5551
$this->windows = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? true : false;
5652
}
5753

54+
/**
55+
* @return string
56+
*/
5857
private function checkServer()
5958
{
6059
return $this->command = $this->windows ? $this->executable : './' . $this->executable;
@@ -83,7 +82,6 @@ public function compile(string $input, string $output = '')
8382
return $this;
8483
}
8584

86-
8785
/**
8886
* @param string $input
8987
* @param string $output
@@ -150,7 +148,6 @@ public function process(string $input, string $output, array $options = [])
150148
}
151149

152150
/**
153-
*
154151
* @param array $options
155152
* @return array
156153
*/
@@ -255,6 +252,5 @@ protected function validateExecute()
255252
if (!is_dir($this->pathExecutable)) {
256253
throw new \PHPJasper\Exception\InvalidResourceDirectory();
257254
}
258-
259255
}
260256
}

0 commit comments

Comments
 (0)